/*
 * Hlavné štýly pre celú aplikáciu
 * Súbor: css/main.css
 */

/* ==========================================================================
   Základné nastavenia a kontajner pre rozloženie
   ========================================================================== */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #0f0f0f;
    color: #e0e0e0;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/*
 * Špecifické štýly pre stránku profilu jazdca
 * Súbor: driver_profile.css
 */
:root {
    /* Farby - prispôsob si podľa tvojej témy */
    --primary-color: #e10600; /* Formula 1 červená */
    --secondary-color: #00bcd4; /* Nová accent farba */
    --text-color: #f0f0f0;
    --text-color-light: #aaaaaa;
    --bg-color: #121212;
    --card-bg-color: #1e1e1e;
    --border-color: #333;
    --link-color: #f0f0f0;
    --box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
    --box-shadow-hover: 0 0 15px rgba(225, 6, 0, 0.3);
}

body {
    font-family: 'Roboto Condensed', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

/* ==========================================================================
   Štýly pre hlavičku (HEADER)
   ========================================================================== */

.main-header {
    background-color: #101010;
    padding: 10px 0;
    border-bottom: 3px solid #e10600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    position: sticky; top: 0; z-index: 1000;
    transition: transform 0.3s ease-in-out;
    overflow: visible;
}
.main-header.header-hidden { transform: translateY(-100%); }

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 25px;
}

/* --- Časti hlavičky --- */
.header-left, .header-center, .header-right {
    display: flex;
    align-items: center;
}
.header-right { gap: 20px; }
.header-left, .header-right {
    flex-shrink: 0;
}

/* --- Logo --- */
.logo-link { display: flex; align-items: center; text-decoration: none; }
.header-logo { height: 40px; }
.header-year { color: #888; font-size: 1.1em; font-weight: bold; margin-left: 15px; }

/* --- Navigácia --- */
.main-nav { 
    list-style: none; 
    margin: 0; 
    padding: 0; 
    display: flex;
    gap: 20px; /* Použitie medzery, aby bolo menu prehľadnejšie */
}
.main-nav a { 
    color: #ddd; 
    text-decoration: none; 
    font-weight: bold; 
    font-size: 1.1em; 
    padding: 10px 20px; 
    position: relative; /* Pre efekt linky */
    transition: color 0.2s ease; 
    white-space: nowrap; 
}

/* Moderný hover a active efekt s linkou */
.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    background-color: #e10600;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.main-nav a:hover, .main-nav a.active { 
    color: #e10600; 
}
.main-nav a:hover::after, .main-nav a.active::after {
    width: 100%;
}

/* --- Pravá strana: Akcie --- */
.season-selector-form select {
    background-color: #252525;
    color: #eee;
    border: 1px solid #444;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
}
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

.login-button {
    background-color: #e10600;
    color: #fff;
    padding: 9px 18px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}
.login-button:hover { background-color: #c00500; }

/* --- Dropdown Menu (pôvodný kód, ktorý funguje) --- */
.dropdown { position: relative; }
.dropdown-button {
    background-color: #252525;
    color: #eee;
    border: 1px solid #444;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    display: flex; align-items: center; gap: 10px;
    font-size: 1em;
}
.dropdown-button .fa-caret-down { transition: transform 0.2s ease; }

.dropdown-content {
    display: block;
    position: absolute;
    top: calc(100% + 8px); right: 0; z-index: 1001;
    background-color: #252525;
    border: 1px solid #555;
    border-radius: 5px;
    min-width: 220px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.6);
    padding: 5px 0;
    opacity: 0; transform: translateY(-10px);
    visibility: hidden; pointer-events: none;
    transition: all 0.2s ease;
}
.dropdown.active .dropdown-content {
    opacity: 1; transform: translateY(0);
    visibility: visible; pointer-events: auto;
}
.dropdown.active .dropdown-button .fa-caret-down { transform: rotate(180deg); }

.dropdown-content a {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 15px; color: #ddd;
    text-decoration: none; font-size: 0.95em;
}
.dropdown-content a:hover { background-color: #e10600; color: #fff; }
.dropdown-content a .fas { width: 18px; text-align: center; }

/* ==========================================================================
   Responzívne úpravy (pre Header)
   ========================================================================== */

/* Pre tablety a mobily na šírku (do 900px) */
@media (max-width: 900px) {
    .main-nav a {
        padding: 10px 12px;
        font-size: 1em;
    }
    .header-right {
        gap: 15px;
    }
    .header-container {
        padding: 0 15px;
    }
}

/* Pre mobily na výšku (do 768px) */
@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .header-center {
        order: 3;
        width: 100%;
        margin-top: 10px;
    }
    .main-nav {
        width: 100%;
        justify-content: center;
    }
    .main-nav a {
        font-size: 1.1em;
    }
}

/* Pre veľmi úzke mobily */
@media (max-width: 400px) {
    .main-nav {
        flex-direction: column;
        gap: 5px;
    }
    .header-logo {
        height: 35px;
    }
}

/* ==========================================================================
   Štýly pre neaktívny odkaz
   ========================================================================== */

.nav-link-disabled {
    text-align: center;
    line-height: 1.2;
    color: #6c757d !important;
    cursor: not-allowed;
}

/* Podtitulok "(pripravuje sa)" */
.nav-link-disabled .subtitle {
    font-size: 0.65em;
    font-weight: normal;
    color: #5a6268;
}

/* Zabráníme hover efektom */
.nav-link-disabled:hover {
    color: #6c757d !important;
}

/* ==========================================================================
   Štýly pre pätičku (FOOTER)
   ========================================================================== */

.main-footer {
    background-color: #1a1a1a;
    padding: 20px 0;
    text-align: center;
    color: #999;
    margin-top: 40px;
}

.main-footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* ================================================================== */
/* SEKCIA PRE PRIHLASOVANIE A REGISTRACIU */
/* ================================================================== */

:root {
    /* Premenné farieb pre konzistenciu */
    --primary-color: #e10600; /* F1 červená */
    --primary-color-dark: #b30500;
    --accent-color: #00bcd4; /* Azúrová modrá */
    --text-color: #f0f0f0;
    --text-color-light: #aaaaaa;
    --bg-color: #0d0d0d;
    --card-bg-color: #1a1a1a;
    --input-bg-color: #2a2a2a;
    --border-color: #383838;
    --link-color: #fff;
    --error-color: #ff4136;
    --success-color: #2ecc40;
}

/* ------------------------------------------------------------------ */
/* GLOBALNÉ ŠTÝLY PRE TELO STRÁNKY */
/* ------------------------------------------------------------------ */
.login-page-body {
    font-family: 'Roboto Condensed', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
    position: relative;
}

/* ------------------------------------------------------------------ */
/* POZADIE */
/* ------------------------------------------------------------------ */
.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../assets/images/f1_racetrack_login.jpg') no-repeat center center/cover;
    filter: blur(8px) brightness(0.6);
    transform: scale(1.1);
    z-index: 0;
    animation: fadeInBackground 2s ease-in-out;
}

@keyframes fadeInBackground {
    from {
        filter: blur(20px) brightness(0.4);
    }
    to {
        filter: blur(8px) brightness(0.6);
    }
}

/* ------------------------------------------------------------------ */
/* PRIHLASOVACÍ FORMULÁR A KARTY */
/* ------------------------------------------------------------------ */
.login-container {
    position: relative;
    z-index: 1;
    background-color: rgba(26, 26, 26, 0.9);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 450px;
    text-align: center;
    animation: slideInUp 0.8s ease-out;
}

@keyframes slideInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.login-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.logo-f1 {
    font-size: 3em;
    font-weight: bold;
    color: var(--primary-color);
    position: relative;
}

.logo-f1:after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    height: 3px;
    width: 100%;
    background-color: var(--primary-color);
    transform-origin: left;
    transform: scaleX(0);
    animation: underlineGrow 1s ease-in-out forwards;
}

@keyframes underlineGrow {
    to {
        transform: scaleX(1);
    }
}

.logo-text {
    font-size: 1.8em;
    font-weight: 300;
    color: var(--text-color);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.login-subtitle {
    font-size: 1.2em;
    color: var(--text-color-light);
    margin: 0 0 30px;
    font-weight: 300;
}

/* ------------------------------------------------------------------ */
/* FORMULÁROVÉ PRVKY */
/* ------------------------------------------------------------------ */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 1em;
    color: var(--text-color-light);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--input-bg-color);
    color: var(--text-color);
    font-size: 1em;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(225, 6, 0, 0.3);
}

/* ------------------------------------------------------------------ */
/* TLAČIDLÁ A ODKAZY */
/* ------------------------------------------------------------------ */
.btn.btn-primary.btn-large {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: #fff;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.btn.btn-primary.btn-large:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(225, 6, 0, 0.4);
}

.register-link,
.forgot-password-link {
    display: block;
    margin-top: 20px;
    font-size: 0.9em;
    color: var(--text-color-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.register-link:hover,
.forgot-password-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ------------------------------------------------------------------ */
/* SPRÁVY PRE POUŽÍVATEĽA */
/* ------------------------------------------------------------------ */
.message {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: bold;
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
}

.error-message {
    background-color: rgba(255, 65, 54, 0.2);
    border: 1px solid var(--error-color);
    color: var(--error-color);
}

.success-message {
    background-color: rgba(46, 204, 64, 0.2);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

/* Animácia pre plynulé zobrazovanie */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}