/*
 * Š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á */
    --primary-color-dark: #b30500;
    --accent-color: #00bcd4; /* Azúrová modrá pre akcenty */
    --text-color: #f0f0f0;
    --text-color-light: #aaaaaa;
    --bg-color: #0f0f0f; /* Tmavšie pozadie */
    --card-bg-color: #1a1a1a; /* Tmavšia karta */
    --border-color: #303030;
    --link-color: #fff;
    --box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    --box-shadow-hover: 0 0 20px rgba(225, 6, 0, 0.4);
}

body {
    font-family: 'Roboto Condensed', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ------------------------------------------------------------------ */
/* HLAVIČKA PROFILU (sekcia POD hlavnou hlavičkou) */
/* ------------------------------------------------------------------ */
.driver-profile-header {
    height: 400px; /* Zvýšená výška pre dramatickejší efekt */
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
    display: flex;
    align-items: flex-end;
    padding: 40px;
    background-color: #1a1a1a;
}

.driver-profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.1));
    z-index: 1;
}

.driver-profile-info {
    display: flex;
    align-items: flex-end; /* Zmena pre lepšie zarovnanie s textom */
    gap: 30px;
    position: relative;
    z-index: 2;
    color: #fff;
    flex-wrap: wrap;
}

.profile-photo {
    width: 180px; /* Zväčšená fotka */
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid #fff; /* Hrubší biely okraj */
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease;
}

.profile-photo:hover {
    transform: scale(1.05);
}

.driver-name-details {
    display: flex;
    flex-direction: column;
}

.driver-name-details h1 {
    font-size: 4em; /* Väčší nadpis */
    margin: 0;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    line-height: 1.1;
}

.nickname {
    font-size: 1.5em;
    color: var(--text-color-light);
    margin: 5px 0 15px;
    font-style: italic;
    font-weight: 300;
}

.team-name {
    font-size: 1.3em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 5px solid;
    padding-left: 15px;
    animation: fadeIn 1s ease-in-out;
}

.team-name a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.team-name a:hover {
    color: var(--primary-color);
}

.team-name span {
    color: var(--text-color-light);
}

/* ------------------------------------------------------------------ */
/* ROZLOŽENIE STRÁNKY (GRID) A KARTY */
/* ------------------------------------------------------------------ */
.profile-grid-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.profile-card {
    background-color: var(--card-bg-color);
    padding: 30px; /* Väčší padding */
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.profile-card:hover {
    transform: translateY(-5px);
}

.profile-card h2 {
    font-size: 2em; /* Väčší nadpis v kartách */
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px; /* Väčší rozostup */
    text-align: center;
}

.stat-item {
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 20px 10px; /* Väčší padding */
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.stat-item .value {
    font-size: 2.5em; /* Väčšia hodnota */
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
}

.stat-item .label {
    font-size: 0.9em;
    color: var(--text-color-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rank-gold { border-color: #ffd700; }
.rank-silver { border-color: #c0c0c0; }
.rank-bronze { border-color: #cd7f32; }
.rank-gold .value { color: #ffd700; }
.rank-silver .value { color: #c0c0c0; }
.rank-bronze .value { color: #cd7f32; }

.f1-red { color: var(--primary-color); }

.driver-details-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.driver-details-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.1em;
}

.driver-details-list li:last-child {
    border-bottom: none;
}

.driver-details-list li strong {
    color: var(--text-color-light);
}

.social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.social-link {
    width: 55px; /* Väčšie ikony */
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--bg-color);
    color: #fff;
    font-size: 1.6em;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.social-link:hover {
    transform: translateY(-5px) scale(1.1);
}

.twitch:hover { background-color: #9146ff; }
.youtube:hover { background-color: #ff0000; }
.twitter:hover { background-color: #1da1f2; }
.instagram:hover { background-color: #c13584; }
.facebook:hover { background-color: #1877f2; }

/* ------------------------------------------------------------------ */
/* TABS A TABUĽKY HISTÓRIE PRETEKOV */
/* ------------------------------------------------------------------ */
.tabs-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
    border-bottom: 2px solid var(--border-color);
}

.tabs-nav .tab-link {
    padding: 12px 25px; /* Väčší padding */
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    color: var(--text-color-light);
    transition: color 0.3s ease, background-color 0.3s ease;
    border-radius: 8px 8px 0 0;
    position: relative;
    top: 2px;
}

.tabs-nav .tab-link:hover {
    color: var(--primary-color);
}

.tabs-nav .tab-link.active {
    color: var(--primary-color);
    background-color: var(--card-bg-color);
    border: 2px solid var(--border-color);
    border-bottom-color: var(--card-bg-color);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.tab-pane.active {
    display: block;
}

.tabs-content {
    background-color: var(--card-bg-color);
    padding: 20px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.7);
    margin-top: -2px;
}

/* Tabuľky - Vylepšenie dizajnu */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    table-layout: fixed;
}

.data-table thead th {
    background-color: var(--bg-color);
    color: var(--primary-color);
    padding: 15px;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 1px;
    border-bottom: 3px solid var(--primary-color);
}

.data-table thead th:first-child { text-align: left; }
.data-table thead th:last-child { text-align: center; }

.data-table tbody tr {
    transition: background-color 0.3s ease, transform 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr:hover {
    background-color: rgba(225, 6, 0, 0.1);
    transform: scale(1.01);
}

.data-table tbody tr:last-child { border-bottom: none; }

.data-table td {
    padding: 15px;
    vertical-align: middle;
    text-align: center;
}

.data-table td:first-child { text-align: left; }
.data-table td:last-child { text-align: center; }

.data-table a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.data-table a:hover {
    color: var(--primary-color);
}

.position-cell {
    font-weight: bold;
    font-size: 1.2em;
}

.podium-position {
    background-color: var(--bg-color);
    border-radius: 5px;
    padding: 5px 10px;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    display: inline-block;
    min-width: 40px;
}

.podium-1 {
    color: #fff;
    background-color: #ffd700;
    border: 2px solid #a87d00;
}

.podium-2 {
    color: #fff;
    background-color: #c0c0c0;
    border: 2px solid #7a7a7a;
}

.podium-3 {
    color: #fff;
    background-color: #cd7f32;
    border: 2px solid #8b4513;
}

.podium-position .fas {
    font-size: 0.8em;
    margin-left: 5px;
}

/* Animácia pre plynulé zobrazovanie */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responzívne úpravy pre mobilné zariadenia */
@media (max-width: 992px) {
    .profile-grid-container {
        grid-template-columns: 1fr;
    }

    .driver-profile-header {
        height: 300px;
        padding: 20px;
        align-items: flex-end;
    }

    .driver-profile-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profile-photo {
        width: 140px;
        height: 140px;
        border: 4px solid #fff;
        margin-bottom: 10px;
    }
    
    .driver-name-details h1 {
        font-size: 2.8em;
    }
    
    .nickname {
        font-size: 1.2em;
    }
    
    .team-name {
        font-size: 1em;
        padding-left: 10px;
        border-width: 4px;
        margin-top: 10px;
    }

    .tabs-nav {
        flex-wrap: wrap;
    }

    .profile-card {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .data-table thead {
        display: none;
    }

    .data-table tbody, .data-table tr, .data-table td {
        display: block;
        width: 100%;
    }

    .data-table tr {
        margin-bottom: 15px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 10px;
    }

    .data-table td {
        text-align: right;
        padding: 5px 15px;
        border-bottom: none;
        position: relative;
    }

    .data-table td:before {
        content: attr(data-label);
        font-weight: bold;
        text-transform: uppercase;
        position: absolute;
        left: 15px;
        color: var(--text-color-light);
    }

    .data-table .position-cell, .data-table .points-cell {
        font-size: 1.1em;
        padding-top: 15px;
        padding-bottom: 15px;
    }

    .data-table .hide-mobile {
        display: none;
    }
}

/* Widget pre OBS */
.widget-link-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.widget-link-container input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--input-bg-color);
    color: var(--text-color);
    border-radius: 5px;
}

.widget-link-container button {
    padding: 8px 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.widget-link-container button:hover {
    background-color: var(--primary-color-dark);
}

/* Náhľad widgetu */
.widget-preview-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.widget-preview-container h3 {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.widget-preview {
    width: 100%;
    /* Nastav pevnú výšku, ktorá sa zhoduje s výškou widgetu */
    height: 100px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background-color: var(--card-bg-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}