/* Contest Game-Like UI Styles */
:root {
    --contest-primary: #d29fee;
    --contest-dark: #3d1540;
    --contest-accent: #c77dff;
    --contest-gold: #ffd700;
    --contest-silver: #c0c0c0;
    --contest-bronze: #cd7f32;
    --contest-success: #10b981;
    --contest-danger: #ef4444;
}

/* Hero Section */
.contest-hero {
    background: linear-gradient(135deg, var(--contest-primary) 0%, var(--contest-accent) 100%);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px rgba(210, 159, 238, 0.3);
    position: relative;
    overflow: hidden;
}

.contest-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.contest-title {
    font-size: 2rem;
    font-weight: 900;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.contest-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    margin: 0.25rem;
    position: relative;
    z-index: 1;
}

.contest-badge i {
    font-size: 1.2rem;
}

/* Status Pills */
.status-pill {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-live {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    animation: glow 2s ease-in-out infinite;
}

.status-upcoming {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.status-ended {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 30px rgba(16, 185, 129, 0.8); }
}

/* CTA Button */
.contest-cta {
    background: linear-gradient(135deg, #3d1540 0%, #5d1f60 100%);
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(61, 21, 64, 0.3);
    position: relative;
    overflow: hidden;
}

.contest-cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.contest-cta:hover::before {
    width: 300px;
    height: 300px;
}

.contest-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(61, 21, 64, 0.5);
}

.contest-cta:active {
    transform: translateY(-1px);
}

.contest-cta span {
    position: relative;
    z-index: 1;
}

/* Game Stats Grid */
.game-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--contest-primary) 0%, var(--contest-accent) 100%);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(210, 159, 238, 0.3);
    border-color: var(--contest-primary);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--contest-primary) 0%, var(--contest-accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--contest-dark);
}

/* Countdown Timer */
.countdown-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: center;
}

.countdown-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--contest-dark);
    margin-bottom: 1.5rem;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.countdown-item {
    background: linear-gradient(135deg, var(--contest-primary) 0%, var(--contest-accent) 100%);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    min-width: 80px;
    box-shadow: 0 4px 15px rgba(210, 159, 238, 0.3);
}

.countdown-value {
    font-size: 2rem;
    font-weight: 900;
    color: white;
    display: block;
}

.countdown-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Prize Pool Section */
.prize-pool-section {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.prize-pool-section::before {
    content: '🏆';
    position: absolute;
    font-size: 15rem;
    opacity: 0.05;
    top: 50%;
    right: -5rem;
    transform: translateY(-50%);
}

.prize-pool-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
    text-align: center;
    margin-bottom: 1.5rem;
}

.prize-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.prize-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.prize-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    border-radius: 16px 16px 0 0;
}

.prize-card.first::before {
    background: linear-gradient(90deg, #ffd700 0%, #ffed4e 100%);
}

.prize-card.second::before {
    background: linear-gradient(90deg, #c0c0c0 0%, #e5e5e5 100%);
}

.prize-card.third::before {
    background: linear-gradient(90deg, #cd7f32 0%, #e89451 100%);
}

.prize-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.prize-position {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 900;
    color: white;
    margin: 0 auto 1rem;
    position: relative;
}

.prize-position.first {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.4);
}

.prize-position.second {
    background: linear-gradient(135deg, #c0c0c0 0%, #e5e5e5 100%);
    box-shadow: 0 8px 20px rgba(192, 192, 192, 0.4);
}

.prize-position.third {
    background: linear-gradient(135deg, #cd7f32 0%, #e89451 100%);
    box-shadow: 0 8px 20px rgba(205, 127, 50, 0.4);
}

.prize-position.other {
    background: linear-gradient(135deg, var(--contest-primary) 0%, var(--contest-accent) 100%);
    box-shadow: 0 8px 20px rgba(210, 159, 238, 0.4);
}

.prize-amount {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--contest-dark);
    text-align: center;
    margin-bottom: 0.5rem;
}

.prize-share {
    text-align: center;
    color: #6b7280;
    font-weight: 600;
}

.prize-share .percentage {
    color: var(--contest-success);
    font-weight: 700;
}

/* Winners Section */
.winners-section {
    margin: 3rem 0;
}

.winners-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.winners-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.winners-title {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--contest-dark);
}

.winner-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.winner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
}

.winner-card.first::before {
    background: linear-gradient(180deg, #ffd700 0%, #ffed4e 100%);
}

.winner-card.second::before {
    background: linear-gradient(180deg, #c0c0c0 0%, #e5e5e5 100%);
}

.winner-card.third::before {
    background: linear-gradient(180deg, #cd7f32 0%, #e89451 100%);
}

.winner-card:hover {
    transform: translateX(10px);
    box-shadow: 0 8px 25px rgba(210, 159, 238, 0.3);
}

.winner-position-badge {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 900;
    color: white;
    flex-shrink: 0;
}

.winner-info {
    flex: 1;
    min-width: 0;
}

.winner-username {
    font-weight: 700;
    color: var(--contest-dark);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.winner-prize {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--contest-success);
}

/* Participants Dropdown */
.participants-section {
    margin: 3rem 0;
}

.participants-toggle {
    background: white;
    border: 2px solid var(--contest-primary);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.participants-toggle:hover {
    background: linear-gradient(135deg, rgba(210, 159, 238, 0.1) 0%, rgba(199, 125, 255, 0.1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(210, 159, 238, 0.3);
}

.participants-toggle-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--contest-dark);
}

.participants-count {
    background: linear-gradient(135deg, var(--contest-primary) 0%, var(--contest-accent) 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 700;
}

.participants-list {
    margin-top: 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.participants-list.show {
    max-height: 5000px;
}

.participant-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.participant-card:hover {
    box-shadow: 0 4px 15px rgba(210, 159, 238, 0.2);
    transform: translateX(5px);
}

.participant-position {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #6b7280;
    flex-shrink: 0;
}

.participant-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--contest-primary);
}

.participant-name {
    font-weight: 600;
    color: var(--contest-dark);
}

/* Responsive Design */
@media (max-width: 768px) {
    .contest-title {
        font-size: 1.5rem;
    }

    .game-stats {
        grid-template-columns: 1fr;
    }

    .countdown-item {
        min-width: 60px;
        padding: 0.75rem 1rem;
    }

    .countdown-value {
        font-size: 1.5rem;
    }

    .prize-cards {
        grid-template-columns: 1fr;
    }

    .contest-cta {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
}

/* Loading Animation */
.loading-participants {
    text-align: center;
    padding: 2rem;
    color: var(--contest-primary);
}

.loading-spinner {
    border: 4px solid rgba(210, 159, 238, 0.2);
    border-top: 4px solid var(--contest-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Confetti Animation for Winners */
@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--contest-primary);
    top: -10px;
    animation: confetti-fall 3s linear;
    pointer-events: none;
    z-index: 9999;
}



/* Contest Landing Page Styles */
.contest-landing-hero {
    background: linear-gradient(135deg, var(--contest-primary) 0%, var(--contest-accent) 100%);
    border-radius: 24px;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.contest-landing-hero::before {
    content: '🏆';
    position: absolute;
    font-size: 20rem;
    opacity: 0.05;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50% { transform: translate(-50%, -50%) translateY(-20px); }
}

.contest-landing-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.contest-landing-subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.95);
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    line-height: 1.6;
}

.contest-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.contest-feature-badge {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 150px;
    transition: all 0.3s ease;
}

.contest-feature-badge:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-5px);
}

.contest-feature-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--contest-primary);
}

.contest-feature-text {
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Contest Card in List */
.contest-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.contest-item.faded-in {
    opacity: 1;
    transform: translateY(0);
}

.contest-list-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    position: relative;
    margin-bottom: 1.5em;
}

.contest-list-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    /* background: linear-gradient(90deg, var(--contest-primary) 0%, var(--contest-accent) 100%); */
}

.contest-list-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(210, 159, 238, 0.3);
    border-color: var(--contest-primary);
}

.contest-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem 0.5rem;
}

.contest-creator-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.contest-creator-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid var(--contest-primary);
    object-fit: cover;
}

.contest-creator-details {
    display: flex;
    flex-direction: column;
}

.contest-creator-name {
    font-weight: 700;
    color: var(--contest-dark);
    font-size: 1rem;
}

.contest-creator-time {
    font-size: 0.85rem;
    color: #6b7280;
}

.contest-status-badge {
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contest-status-live {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

.contest-status-upcoming {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.contest-status-completed {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
}

.contest-card-body {
    padding: 0 1.5rem 1rem;
}

.contest-card-title {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--contest-dark);
    margin-bottom: 0.75rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.contest-card-description {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.contest-card-image {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.contest-list-card:hover .contest-card-image {
    transform: scale(1.02);
}

.contest-card-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.contest-stat-item {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 0.75rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.contest-stat-item:hover {
    background: linear-gradient(135deg, var(--contest-primary) 0%, var(--contest-accent) 100%);
    color: white;
    transform: translateY(-2px);
}

.contest-stat-icon {
    font-size: 1.2rem;
    color: var(--contest-primary);
}

.contest-stat-item:hover .contest-stat-icon {
    color: white;
}

.contest-stat-value {
    font-weight: 700;
    font-size: 1rem;
}

.contest-stat-label {
    font-size: 0.8rem;
    color: #6b7280;
}

.contest-stat-item:hover .contest-stat-label {
    color: rgba(255,255,255,0.9);
}

.contest-card-footer {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contest-prize-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contest-prize-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--contest-success) 0%, #4eff89 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 255, 4, 0.3);
}

.contest-prize-text {
    display: flex;
    flex-direction: column;
}

.contest-prize-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contest-prize-amount {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--contest-dark);
}

.contest-join-btn {
    background: linear-gradient(135deg, var(--contest-primary) 0%, var(--contest-accent) 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.contest-join-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(210, 159, 238, 0.4);
    color: white;
}

.contest-view-btn {
    background: white;
    color: var(--contest-primary);
    border: 2px solid var(--contest-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.contest-view-btn:hover {
    background: var(--contest-primary);
    color: white;
    transform: translateY(-2px);
}

/* Empty State */
.contest-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.contest-empty-icon {
    font-size: 5rem;
    color: var(--contest-primary);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.contest-empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--contest-dark);
    margin-bottom: 0.5rem;
}

.contest-empty-text {
    color: #6b7280;
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* Loading States */
.contest-loading {
    text-align: center;
    padding: 2rem;
}

.contest-loading-spinner {
    border: 4px solid rgba(210, 159, 238, 0.2);
    border-top: 4px solid var(--contest-primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .contest-landing-title {
        font-size: 1.8rem;
    }

    .contest-landing-subtitle {
        font-size: 1rem;
    }

    .contest-features {
        gap: 1rem;
    }

    .contest-feature-badge {
        min-width: 120px;
        padding: 0.75rem 1rem;
    }

    .contest-card-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .contest-card-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .contest-join-btn,
    .contest-view-btn {
        width: 100%;
        text-align: center;
    }
}

/* Fade-in animation for cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contest-item {
    animation: fadeInUp 0.6s ease-out forwards;
}

.contest-item:nth-child(1) { animation-delay: 0.1s; }
.contest-item:nth-child(2) { animation-delay: 0.2s; }
.contest-item:nth-child(3) { animation-delay: 0.3s; }
.contest-item:nth-child(4) { animation-delay: 0.4s; }
.contest-item:nth-child(5) { animation-delay: 0.5s; }



/* Quiz Attempt Page - Game Experience */
.quiz-game-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

/* Quiz Header with Contest Info */
.quiz-header {
    background: linear-gradient(135deg, var(--contest-primary) 0%, var(--contest-accent) 100%);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 30px rgba(210, 159, 238, 0.3);
    position: relative;
    overflow: hidden;
}

.quiz-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

.quiz-creator-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.quiz-creator-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.quiz-creator-info {
    flex: 1;
}

.quiz-creator-name {
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    display: block;
}

.quiz-creator-name:hover {
    color: rgba(255,255,255,0.9);
}

.quiz-creator-time {
    color: rgba(255,255,255,0.85);
    font-size: 0.85rem;
}

.quiz-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 900;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* Timer Section */
.timer-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.timer-box {
    background: white;
    border-radius: 16px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    min-width: 180px;
    position: relative;
    overflow: hidden;
}

.timer-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--contest-primary) 0%, var(--contest-accent) 100%);
}

.timer-label {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.timer-value {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--contest-dark);
    font-family: 'Courier New', monospace;
}

.timer-value.warning {
    color: #f59e0b;
    animation: pulse-warning 1s ease-in-out infinite;
}

.timer-value.danger {
    color: #ef4444;
    animation: pulse-danger 0.5s ease-in-out infinite;
}

@keyframes pulse-warning {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes pulse-danger {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.timer-hint {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}

/* Question Image */
.question-image-container {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    max-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
}

.question-image {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.question-image:hover {
    transform: scale(1.02);
}

/* Question Card */
.quiz-question-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.quiz-question-card:hover {
    border-color: var(--contest-primary);
    box-shadow: 0 12px 40px rgba(210, 159, 238, 0.2);
}

.question-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--contest-dark);
    margin-bottom: 2rem;
    line-height: 1.6;
    padding-left: 1rem;
    border-left: 4px solid var(--contest-primary);
}

/* Answer Options */
.answer-options {
    display: grid;
    gap: 1rem;
}

.answer-option {
    position: relative;
    cursor: pointer;
}

.answer-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.answer-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.answer-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--contest-primary);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.answer-option:hover .answer-label {
    background: linear-gradient(135deg, rgba(210, 159, 238, 0.1) 0%, rgba(199, 125, 255, 0.1) 100%);
    border-color: var(--contest-primary);
    transform: translateX(8px);
}

.answer-option input[type="radio"]:checked + .answer-label {
    background: linear-gradient(135deg, var(--contest-primary) 0%, var(--contest-accent) 100%);
    border-color: var(--contest-primary);
    color: white;
    transform: translateX(8px);
    box-shadow: 0 8px 25px rgba(210, 159, 238, 0.4);
}

.answer-option input[type="radio"]:checked + .answer-label::before {
    transform: scaleY(1);
}

.answer-option input[type="radio"]:checked + .answer-label .option-letter {
    background: white;
    color: var(--contest-primary);
}

.option-letter {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--contest-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.option-text {
    flex: 1;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.5;
}

/* Feedback Messages */
.feedback-container {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feedback-correct {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.feedback-incorrect {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.feedback-icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

/* Submit Button */
.submit-answer-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--contest-primary) 0%, var(--contest-accent) 100%);
    color: white;
    border: none;
    padding: 1.25rem 2rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(210, 159, 238, 0.3);
    position: relative;
    overflow: hidden;
}

.submit-answer-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.submit-answer-btn:hover::before {
    width: 300px;
    height: 300px;
}

.submit-answer-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(210, 159, 238, 0.5);
}

.submit-answer-btn:active {
    transform: translateY(-1px);
}

.submit-answer-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.submit-answer-btn span {
    position: relative;
    z-index: 1;
}

/* Progress Indicator */
.progress-container {
    background: white;
    border-radius: 16px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.progress-bar-wrapper {
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--contest-primary) 0%, var(--contest-accent) 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    text-align: center;
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 600;
}

/* No-select for quiz content */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Celebration Animation */
@keyframes celebrate {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(5deg); }
}

.celebrate {
    animation: celebrate 0.5s ease;
}

/* Loading State */
.quiz-loading {
    text-align: center;
    padding: 3rem;
}

.quiz-loading-spinner {
    border: 4px solid rgba(210, 159, 238, 0.2);
    border-top: 4px solid var(--contest-primary);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

.quiz-loading-text {
    font-size: 1.1rem;
    color: #6b7280;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiz-header {
        padding: 1rem;
    }

    .quiz-title {
        font-size: 1.2rem;
    }

    .timer-container {
        flex-direction: column;
        gap: 0.75rem;
    }

    .timer-box {
        min-width: 100%;
    }

    .quiz-question-card {
        padding: 1.5rem;
    }

    .question-text {
        font-size: 1.1rem;
    }

    .answer-label {
        padding: 1rem;
    }

    .option-text {
        font-size: 0.95rem;
    }

    .submit-answer-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
}

/* Smooth transitions for all interactive elements */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}