/* * components.css 
 * Styling für spezifische UI-Elemente wie Countdowns, Badges und Tracks
 * Maximale Zeilenzahl: ~150
 */

/* COUNTDOWN WRAPPER */
.countdown-container {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.countdown-block {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    padding: 10px;
    border-radius: 8px;
    min-width: 65px;
    text-align: center;
}

.countdown-value {
    display: block;
    font-family: 'Orbitron', sans-serif; /* Digitaler Look */
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.countdown-label {
    display: block;
    font-size: 0.6rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

/* TRACK IMAGE GLOW */
.track-image {
    position: relative;
    text-align: right;
    margin-top: -20px; /* Zieht das Bild leicht nach oben für mehr Dynamik */
}

.track-image img {
    max-width: 280px;
    filter: drop-shadow(0 0 15px rgba(0, 123, 255, 0.4)); /* Der Track-Glow */
    transition: filter 0.5s ease;
}

.tile-hero:hover .track-image img {
    filter: drop-shadow(0 0 25px rgba(0, 123, 255, 0.7)); /* Verstärkt den Glow beim Hover */
}

/* STATUS BADGES */
.badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.badge-live {
    background-color: #ff0000;
    color: white;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

/* STANDINGS LIST */
.podium-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.podium-item {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.podium-item:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateX(5px); /* Kleiner Slide-Effekt */
    border-color: rgba(255, 255, 255, 0.1);
}

/* Die Platzierung (1, 2, 3) */
.rank {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 900;
    width: 35px;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(0, 123, 255, 0.3);
}

/* Der Fahrername */
.driver-name {
    flex-grow: 1;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* Die Punkte */
.points {
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Gold, Silber, Bronze Akzente für die Ränge - angepasst für Link-Wrapper */
/* Platz 1 */
a:nth-child(1) .podium-item .rank { 
    color: #FFD700 !important; 
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.4); 
}

/* Platz 2 */
a:nth-child(2) .podium-item .rank { 
    color: #C0C0C0 !important; 
}

/* Platz 3 */
a:nth-child(3) .podium-item .rank { 
    color: #CD7F32 !important; 
}

/* Optional: Alle anderen ab Platz 4 explizit weiß/grau machen, 
   falls sie durch globale Link-Styles (gold) überschrieben werden */
a:nth-child(n+4) .podium-item .rank {
    color: #ffffff !important;
}

/* VIDEO KACHEL SPECIFICS */
.tile-media {
    position: relative;
    padding: 0 !important; /* Bild soll bis zum Rand gehen */
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.video-preview-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.play-button {
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.5);
    transition: all 0.3s ease;
}

.tile-media:hover .play-button {
    transform: scale(1.15);
    background: #fff;
    color: var(--accent-color);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
}

.tile-media:hover .video-thumbnail {
    transform: scale(1.05);
}

/* Label muss hier absolut über dem Bild liegen */
.tile-media .tile-label {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    margin: 0;
}

/* LAST RESULT SPECIFICS */
.winner-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding-top: 10px;
}

.winner-meta {
    font-size: 0.7rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.winner-name {
    font-family: 'Exo 2', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.2;
}

.last-track-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.last-track-info i {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.last-track-name {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Ein kleiner Pokal-Effekt im Hintergrund */
.tile-history::after {
    content: '\f091'; /* FontAwesome Trophy */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    bottom: -10px;
    right: -10px;
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.03);
    transform: rotate(-15deg);
    pointer-events: none;
}

.header-actions {
    display: flex;
    align-items: center;
}

.season-switcher {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 8px 15px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.season-switcher:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}

.season-switcher option {
    background: #1a1a1a; /* Dunkler Hintergrund für die Liste im Dropdown */
    color: #fff;
}

/* ==========================================================================
   BENTO GRID SYSTEM (Dashboard & Archiv)
   ========================================================================== */

/* Das Hauptgitter für die Kacheln */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 Spalten Layout */
    grid-auto-rows: minmax(160px, auto);
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 20px;
    width: 100%;
}

/* Basis-Kachel (Glassmorphism) */
.tile {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Hero-Kachel (Groß: 2 Spalten, 2 Zeilen) */
.tile-hero {
    display: flex;
    flex-direction: column;
    grid-column: span 2;
    grid-row: span 2;
    min-height: 350px;
}

.hero-content {
    flex: 1; /* Nimmt den restlichen Platz unter dem Label ein */
    display: flex;
    flex-direction: column;
}

.track-meta {
    /* Text bleibt oben */
    margin-bottom: 20px; 
    z-index: 2;
}

.track-image {
    flex: 1; /* Nimmt den gesamten restlichen Platz ein */
    display: flex;
    align-items: center;    /* Vertikale Zentrierung des Icons */
    justify-content: center;/* Horizontale Zentrierung des Icons */
    z-index: 1;
}

/* Falls das Icon als Wasserzeichen im Hintergrund liegen soll */
.track-image i {
    pointer-events: none;
}

/* Statistik-Kachel (Lang: 1 Spalte, 3 Zeilen) */
.tile-stats {
    grid-row: span 3;
}

/* Labels innerhalb der Kacheln */
.tile-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* RESPONSIVE: Anpassung für kleinere Bildschirme */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr 1fr; /* Wechsel auf 2 Spalten */
    }
    .tile-hero {
        grid-column: span 2;
    }
}

@media (max-width: 600px) {
    .bento-grid {
        grid-template-columns: 1fr; /* Alles untereinander */
    }
    .tile-hero {
        grid-column: span 1;
    }
}

.no-data {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.news-full-text p {
    margin-bottom: 1.5rem;
}

/* Falls Bilder im Text vorkommen, sollen sie sich anpassen */
.news-full-text img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
}