:root {
    --white: #ffffff;
    --gold: #bf934d;
    --gold-light: #d4b57a;
    --gold-dark: #9a763d;
    --blue: #1d4f91;
    --blue-light: #2d6fbc;
    --blue-dark: #153a6b;
    --gray-light: #f5f5f5;
    --gray: #e0e0e0;
    --gray-dark: #999999;
    --text-main: #1d4f91;
    --text-muted: #666666;
    --shadow: rgba(29, 79, 145, 0.15);
    --success: #4caf50;
    --error: #d32f2f;
}

body {
    background: var(--white);
    color: var(--text-main);
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    margin: 0;
}

.event-detail-container { max-width: 900px; margin: 0 auto; padding: 20px; }
    
.event-detail-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Gallery Section */
.gallery-section {
    margin-bottom: 40px;
}

.gallery-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: var(--gray-light);
    border: 2px solid var(--gray);
    aspect-ratio: 16/9;
}

.gallery-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

.gallery-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    display: none;
}

.gallery-slide.active {
    display: block;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--white);
}

.img-caption {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(29, 79, 145, 0.9);
    color: var(--white);
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
}

.no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 1.3rem;
    color: var(--text-muted);
    background: var(--gray-light);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: var(--white);
    border: 2px solid var(--gray);
    color: var(--blue);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    border-radius: 50%;
}

.gallery-nav:hover {
    background: var(--blue);
    border-color: var(--blue);
    color: var(--white);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav svg {
    width: 24px;
    height: 24px;
}

.gallery-nav.prev { left: 20px; }
.gallery-nav.next { right: 20px; }

.gallery-counter {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(29, 79, 145, 0.9);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Event Info Section */
.event-info-section {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    border: 2px solid var(--gray);
    box-shadow: 0 10px 40px var(--shadow);
}

.event-header h1 {
    margin: 0 0 15px;
    font-size: 2.5rem;
    color: var(--blue);
    font-weight: 800;
    line-height: 1.2;
}

.team-bonus-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--white);
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 25px;
}

/* Meta Grid */
.event-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
    padding: 25px;
    background: var(--gray-light);
    border-radius: 15px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.meta-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.meta-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.meta-value {
    display: block;
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 700;
}

.meta-item.xp-highlight .meta-value {
    color: var(--gold);
    font-size: 1.3rem;
}

/* Description */
.event-description {
    margin-bottom: 35px;
    padding: 25px;
    background: var(--gray-light);
    border-radius: 15px;
    border-left: 4px solid var(--gold);
}

.event-description h3 {
    margin: 0 0 15px;
    color: var(--blue);
    font-size: 1.3rem;
}

.event-description div {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 1rem;
}

/* Actions */
.event-actions {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
}

.btn-event {
    padding: 14px 35px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(191, 147, 77, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(191, 147, 77, 0.5);
}

.btn-large {
    padding: 18px 45px;
    font-size: 1.1rem;
}

.btn-cancel {
    background: var(--white);
    color: var(--error);
    border: 2px solid var(--error);
}

.btn-cancel:hover {
    background: var(--error);
    color: var(--white);
}

.btn-outline {
    background: var(--white);
    color: var(--blue);
    border: 2px solid var(--blue);
}

.btn-outline:hover {
    background: var(--blue);
    color: var(--white);
}

/* Status Cards */
.status-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 15px;
    width: 100%;
    box-sizing: border-box;
}

.status-card .status-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.status-card strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.status-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.status-card.registered {
    background: rgba(76, 175, 80, 0.1);
    border: 2px solid var(--success);
}

.status-card.registered strong {
    color: var(--success);
}

.status-card.attended {
    background: rgba(191, 147, 77, 0.1);
    border: 2px solid var(--gold);
}

.status-card.attended strong {
    color: var(--gold);
}

.status-card.cancelled {
    background: rgba(211, 47, 47, 0.1);
    border: 2px solid var(--error);
}

.status-card.cancelled strong {
    color: var(--error);
}

.status-card.closed {
    background: var(--gray-light);
    border: 2px solid var(--gray);
}

.status-card.closed strong {
    color: var(--text-muted);
}

/* Register Box */
.register-box {
    width: 100%;
    padding: 30px;
    background: linear-gradient(135deg, rgba(191, 147, 77, 0.1), rgba(29, 79, 145, 0.1));
    border-radius: 15px;
    border: 2px solid var(--gold);
    text-align: center;
}

.spots-info {
    color: var(--error);
    font-size: 1.1rem;
    margin: 0 0 20px;
    font-weight: 600;
}

.register-note {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 15px 0 0;
}

/* Login Prompt */
.login-prompt {
    width: 100%;
    padding: 30px;
    background: var(--gray-light);
    border-radius: 15px;
    text-align: center;
    border: 2px dashed var(--gray);
}

.login-prompt p {
    color: var(--text-muted);
    margin: 0 0 20px;
    font-size: 1.1rem;
}

.login-prompt .btn {
    margin: 5px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .event-detail-wrapper {
        padding: 20px 15px;
    }
    
    .gallery-container {
        aspect-ratio: 4/3;
    }
    
    .event-info-section {
        padding: 25px;
    }
    
    .event-header h1 {
        font-size: 1.8rem;
    }
    
    .event-meta-grid {
        grid-template-columns: 1fr 1fr;
        padding: 15px;
    }
    
    .meta-icon {
        font-size: 1.5rem;
    }
    
    .meta-value {
        font-size: 1rem;
    }
    
    .status-card {
        flex-direction: column;
        text-align: center;
    }
    
    .btn {
        width: 100%;
        padding: 14px 25px;
    }
    
    .gallery-nav {
        width: 40px;
        height: 40px;
    }
    
    .gallery-nav svg {
        width: 20px;
        height: 20px;
    }
}

/* winners-announce */
.winners-announce {
    background: linear-gradient(135deg, rgba(191, 147, 77, 0.1), rgba(29, 79, 145, 0.1));
    border: 2px solid var(--gold);
    border-radius: 16px;
    padding: 30px;
    margin: 30px 0;
    text-align: center;
}

.winners-announce h3 {
    color: var(--gold);
    font-size: 1.8rem;
    margin: 0 0 25px;
}

.winners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.winner-card {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid var(--gold);
    box-shadow: 0 4px 20px rgba(191, 147, 77, 0.3);
}

.winner-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.winner-name {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--blue);
    margin-bottom: 8px;
}

.winner-team {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.winner-score {
    font-weight: 700;
    color: var(--gold);
    font-size: 1.3rem;
}

.winners-note {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.6;
}

/* Leaderboard item */
.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--gray-light);
    border-radius: 10px;
    margin-bottom: 10px;
}

.leaderboard-item.winner {
    background: linear-gradient(90deg, rgba(191, 147, 77, 0.2), rgba(191, 147, 77, 0.05));
    border: 1px solid var(--gold);
}

.leaderboard-item.current-user {
    border: 2px solid var(--blue);
}

.rank {
    font-weight: 700;
    font-size: 1.2rem;
    min-width: 30px;
}

.username {
    font-weight: 600;
    flex: 1;
}

.team-icon {
    font-size: 1.2rem;
}

.score {
    font-weight: 700;
    color: var(--gold);
}

.winner-mark {
    font-size: 1.3rem;
}

.your-score {
    margin-top: 20px;
    padding: 20px;
    background: var(--blue);
    color: var(--white);
    border-radius: 12px;
    text-align: center;
    font-size: 1.1rem;
}

.congrats {
    display: block;
    margin-top: 10px;
    font-weight: 700;
    color: var(--gold);
}