/* =========================================
   HOME PAGE STYLES
   ========================================= */

/* --- LIVE BANNER --- */
.live-banner {
    background: linear-gradient(90deg, #9146FF 0%, #ff0000 100%);
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    position: static; 
    z-index: 2000;
    flex-wrap: wrap;
    width: 100%;
    animation: slideDown 0.5s ease-out;
}

.live-banner-content {
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-indicator {
    background: #ff0000;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 800;
    animation: pulseRed 1.5s infinite;
}

.live-banner-btn {
    background: white;
    color: var(--twitch-purple) !important;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: transform 0.2s;
}
.live-banner-btn:hover {
    transform: scale(1.05);
}

@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
@keyframes pulseRed { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }


/* --- HERO & GENERAL --- */
header.hero {
    text-align: center;
    padding: 60px 20px 80px 20px;
    background: linear-gradient(180deg, rgba(145,70,255,0.15) 0%, rgba(14,14,16,0) 100%);
    overflow: hidden; 
}

header.hero img {
    max-width: 450px; 
    width: 90%;        
    height: auto;
    margin-bottom: 25px;
    display: inline-block;
    filter: drop-shadow(0 0 10px rgba(145, 70, 255, 0.3));
    
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    cursor: pointer; 
    transform-origin: center;
}

header.hero p.lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

/* --- COUNTDOWN STYLES --- */
#countdown-container {
    margin-top: 30px;
    animation: fadeIn 1s ease-in;
}

.countdown-box {
    margin: 20px auto;
    padding: 20px 40px;
    background: var(--bg-card);
    border: 2px solid var(--twitch-purple);
    border-radius: 12px;
    display: inline-block;
    min-width: 320px;
    max-width: 90vw; 
    box-shadow: 0 0 30px rgba(145, 70, 255, 0.15);
}

.countdown-timer {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-main);
    font-variant-numeric: tabular-nums; 
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(145, 70, 255, 0.5);
}

/* --- LIVE MODE STYLES --- */
#live-container {
    margin-top: 30px;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.live-badge {
    background: #ff0000;
    color: white;
    padding: 10px 30px;
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 50px;
    display: inline-block;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(255, 0, 0, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }

/* --- VIDEO WRAPPER --- */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; 
    height: 0;
    overflow: hidden; 
    width: 100%;
    background: #000;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin: 0 auto 30px auto;
    border: 1px solid var(--border-color);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- GRID LAYOUT --- */
.home-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; 
    gap: 40px;
    align-items: start; 
}

.sidebar {
    position: sticky;
    top: 90px; 
}

/* --- AVATAR ANIMATION --- */
.avatar-float-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none; 
    overflow: hidden; 
}

/* BLURRED MODE */
.avatar-float-container.heavily-blurred .floating-avatar {
    filter: blur(8px) grayscale(50%);
    opacity: 0.4;
}

.avatar-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(24,24,27,0.7) 0%, rgba(24,24,27,0.95) 100%);
    z-index: 1;
}

.floating-avatar {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    opacity: 0.6;
    border: 2px solid var(--twitch-purple);
    animation-name: floatAround;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-direction: alternate;
}

@keyframes floatAround {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(15px, -20px) scale(1.1); }
}

/* --- PREDICTION BOX STYLES --- */
.prediction-card {
    background: radial-gradient(circle at top right, rgba(145, 70, 255, 0.08), var(--bg-card));
}

.prediction-locked {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(14, 14, 16, 0.6); 
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* View: "Bereits getippt" */
.prediction-members {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.pred-member {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.05);
    padding: 5px 15px 5px 5px; 
    border-radius: 50px; 
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.2s;
}

.pred-member:hover {
    background: rgba(145, 70, 255, 0.15);
    border-color: var(--twitch-purple);
    transform: translateY(-2px);
}

.pred-member img {
    width: 35px;
    height: 35px;
    min-width: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--twitch-purple);
    display: block;
}

.pred-member span {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

/* --- GEWINNER VIEW --- */
.winner-lineup {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap; 
}

.winner-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--twitch-yellow);
    object-fit: cover;
    transition: transform 0.2s;
    background: var(--bg-card);
}
.winner-avatar:hover { transform: scale(1.2); z-index: 10; }

.all-winners-list {
    max-height: 300px;
    overflow-y: auto;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
    text-align: left;
}

.winner-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.winner-row:last-child { border-bottom: none; }
.winner-row img { width: 25px; height: 25px; border-radius: 50%; object-fit:cover; }

.all-winners-list::-webkit-scrollbar { width: 6px; }
.all-winners-list::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
.all-winners-list::-webkit-scrollbar-thumb { background: var(--twitch-purple); border-radius: 3px; }

@keyframes pulseGold {
    0% { box-shadow: 0 0 0 0 rgba(241, 196, 15, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(241, 196, 15, 0); }
    100% { box-shadow: 0 0 0 0 rgba(241, 196, 15, 0); }
}

/* --- PREDICTION SELECTION GRID (NEU) --- */
.pred-grid-container {
    display: grid;
    /* Responsive Columns: Min 140px breit */
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.pred-grid-container::-webkit-scrollbar { width: 6px; }
.pred-grid-container::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
.pred-grid-container::-webkit-scrollbar-thumb { background: var(--twitch-purple); border-radius: 3px; }

.pred-select-card {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pred-select-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-color: var(--twitch-purple);
}

/* Selected State */
.pred-select-card.selected {
    border-color: var(--twitch-yellow);
    background: rgba(241, 196, 15, 0.05);
    box-shadow: 0 0 0 2px var(--twitch-yellow);
}

.pred-card-header {
    padding: 8px 10px;
    background: rgba(0,0,0,0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.85rem;
}

/* Check Circle Visual */
.check-circle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.pred-select-card.selected .check-circle {
    background: var(--twitch-yellow);
    border-color: var(--twitch-yellow);
}

.pred-select-card.selected .check-circle::after {
    content: '\f00c'; /* FontAwesome Check */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: black;
    font-size: 10px;
}

.pred-card-members {
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    justify-content: center;
    min-height: 50px;
}

.pred-mini-member {
    position: relative;
    transition: transform 0.2s;
}

.pred-mini-member:hover {
    transform: scale(1.2);
    z-index: 5;
}

.pred-mini-member img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    object-fit: cover;
    background: var(--bg-card);
    display: block;
}

/* Mobile Adjustments */
@media (max-width: 900px) {
    header.hero img { max-width: 300px; }
    .countdown-timer { font-size: 2rem; }
    
    .home-grid {
        grid-template-columns: 1fr; 
        gap: 20px;
    }
    
    .sidebar {
        position: static; 
    }
}

@media (max-width: 400px) {
    .countdown-box {
        padding: 15px;
        min-width: 0;
        width: 100%;
    }
    .countdown-timer {
        font-size: 1.8rem;
    }
}