/* ============================================================
   Stopáž – Hodnocení filmů  |  Global Stylesheet
   ============================================================ */

@font-face {
    font-family: 'Pixelify Sans';
    src: url('fonts/PixelifySans-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-display: swap;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-primary:   #0e0e12;
    --bg-secondary: #16161d;
    --bg-card:      #1c1c26;
    --bg-card-hover:#222230;

    --text-primary: #f0eef8;
    --text-muted:   #8e8aa8;
    --text-subtle:  #4e4a62;

    --accent-red:   #e0284a;
    --accent-purple:#9b5de5;
    --accent-gold:  #f0c040;
    --accent-teal:  #34d3a0;

    --border:       #2a2a3a;
    --border-focus: #9b5de5;

    --radius-sm:    6px;
    --radius-md:    12px;
    --radius-lg:    18px;

    --shadow-sm:    0 1px 4px rgba(0,0,0,.4);
    --shadow-md:    0 4px 16px rgba(0,0,0,.5);
    --shadow-lg:    0 8px 32px rgba(0,0,0,.6);

    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'Consolas', 'Courier New', monospace;

    --transition: 180ms ease;
}

/* ── Base ─────────────────────────────────────────────────── */
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--accent-purple);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--accent-gold); }

/* ── Layout helpers ───────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.page-center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: background var(--transition), box-shadow var(--transition);
}
.card:hover {
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-lg);
}

.card-sm { padding: 1.25rem 1.5rem; }
.card-lg { padding: 2.5rem; }

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.25;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

.text-muted  { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }

/* Gradient brand title */
.brand-title {
    font-family: 'Pixelify Sans', sans-serif;
    background: linear-gradient(135deg, var(--accent-red) 0%, var(--accent-purple) 55%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Forms ────────────────────────────────────────────────── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    margin-bottom: 1.25rem;
}

label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: .04em;
    text-transform: uppercase;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 1rem;
    padding: .65rem 1rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
input:focus,
select:focus,
textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(155, 93, 229, .2);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .7rem 1.6rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font);
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .02em;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    text-decoration: none;
}
.btn:active { transform: scale(.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-red));
    color: #fff;
    box-shadow: 0 2px 12px rgba(155, 93, 229, .35);
}
.btn-primary:hover {
    box-shadow: 0 4px 20px rgba(155, 93, 229, .5);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.btn-ghost:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.btn-full { width: 100%; }

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
    padding: .75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    margin-bottom: 1rem;
}
.alert-error {
    background: rgba(224, 40, 74, .12);
    border: 1px solid rgba(224, 40, 74, .4);
    color: #ff8099;
}
.alert-success {
    background: rgba(52, 211, 153, .1);
    border: 1px solid rgba(52, 211, 153, .3);
    color: #6ee7b7;
}

/* ── Top navigation ───────────────────────────────────────── */
.topbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: .9rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.topbar-brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: .55rem;
}
.topbar-brand:hover { color: var(--text-primary); }

.topbar-logo-img {
    height: 26px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: .875rem;
    color: var(--text-muted);
}

/* ── Dashboard grid ───────────────────────────────────────── */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem 1.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transition: background var(--transition), border-color var(--transition),
                box-shadow var(--transition), transform var(--transition);
}
.dash-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 1px var(--accent-purple), var(--shadow-md);
    transform: translateY(-3px);
    color: var(--text-primary);
}

.dash-card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    line-height: 1;
}
.dash-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .35rem;
}
.dash-card-desc {
    font-size: .8rem;
    color: var(--text-muted);
}

/* Accent colour variants for dash cards */
.dash-card.accent-red:hover   { border-color: var(--accent-red);    box-shadow: 0 0 0 1px var(--accent-red),    var(--shadow-md); }
.dash-card.accent-purple:hover{ border-color: var(--accent-purple); box-shadow: 0 0 0 1px var(--accent-purple), var(--shadow-md); }
.dash-card.accent-gold:hover  { border-color: var(--accent-gold);   box-shadow: 0 0 0 1px var(--accent-gold),   var(--shadow-md); }
.dash-card.accent-blue:hover  { border-color: var(--accent-teal);   box-shadow: 0 0 0 1px var(--accent-teal),   var(--shadow-md); }

/* ── Page header ──────────────────────────────────────────── */
.page-header {
    padding: 2.5rem 0 1.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}
.page-header h1 { margin-bottom: .4rem; }

/* ── Login page ───────────────────────────────────────────── */
.login-wrap { width: 100%; max-width: 400px; }

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo-img {
    width: 100px;
    height: auto;
    display: block;
    margin: 0 auto .75rem;
}

.film-title {
    font-family: 'Pixelify Sans', sans-serif;
    font-size: 36px;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.2;
}

.stopaz-wordmark {
    font-family: 'Pixelify Sans', sans-serif;
    font-size: 3.8rem;
    font-weight: 700;
    color: #fff;
    text-shadow: -4px -3px 0 #00e5ff, 4px 3px 0 #ff00cc;
    letter-spacing: .03em;
    line-height: 1;
    margin: .5rem 0 .4rem;
}

/* ── Utilities ────────────────────────────────────────────── */
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* ── Scrollbar (Webkit) ───────────────────────────────────── */
::-webkit-scrollbar       { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-subtle); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 600px) {
    h1 { font-size: 1.5rem; }
    .card { padding: 1.25rem; }
    .dashboard-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}
