/* ============================================
   CYBER ESPORTS AWARD CEREMONY
   黑客松AI编程比赛 - 赛博电竞风格颁奖页面
   ============================================ */

/* Google Fonts - 独特字体组合 */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@400;500;600;700&display=swap');

/* CSS Variables */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --gold-primary: #ffd700;
    --gold-glow: rgba(255, 215, 0, 0.6);
    --silver-primary: #c0c0c0;
    --silver-glow: rgba(192, 192, 192, 0.5);
    --bronze-primary: #cd7f32;
    --bronze-glow: rgba(205, 127, 50, 0.5);
    --neon-cyan: #00fff7;
    --neon-pink: #ff00ff;
    --neon-purple: #bf00ff;
    --text-primary: #ffffff;
    --text-secondary: #8a8a9a;
    --card-bg: rgba(18, 18, 26, 0.85);
    --grid-color: rgba(0, 255, 247, 0.08);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Rajdhani', 'PingFang SC', sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

/* Animated Grid Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Scanline Effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
    );
    pointer-events: none;
    z-index: 1000;
    animation: scanline 8s linear infinite;
}

@keyframes scanline {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 30px;
}

/* ============================================
   HEADER STYLES
   ============================================ */
.header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
}

.main-title {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 900;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    color: var(--text-primary);
    text-shadow:
        0 0 10px var(--neon-cyan),
        0 0 20px var(--neon-cyan),
        0 0 40px var(--neon-cyan);
    animation: glitchText 3s infinite;
}

@keyframes glitchText {
    0%, 90%, 100% {
        text-shadow:
            0 0 10px var(--neon-cyan),
            0 0 20px var(--neon-cyan),
            0 0 40px var(--neon-cyan);
        transform: translate(0);
    }
    92% {
        text-shadow:
            -2px 0 var(--neon-pink),
            2px 0 var(--neon-cyan);
        transform: translate(-2px, 1px);
    }
    94% {
        text-shadow:
            2px 0 var(--neon-pink),
            -2px 0 var(--neon-cyan);
        transform: translate(2px, -1px);
    }
    96% {
        text-shadow:
            0 0 10px var(--neon-cyan),
            0 0 20px var(--neon-cyan);
        transform: translate(0);
    }
}

.main-title::before,
.main-title::after {
    content: '';
    position: absolute;
    left: -40px;
    right: -40px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    animation: lineGlow 2s ease-in-out infinite;
}

.main-title::before { top: -15px; }
.main-title::after { bottom: -15px; animation-delay: 1s; }

@keyframes lineGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.sub-title {
    font-family: 'Orbitron', monospace;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--neon-cyan);
    letter-spacing: 0.3em;
    margin-bottom: 25px;
    text-transform: uppercase;
    animation: fadeInUp 0.8s ease-out;
}

.description {
    font-size: 1.3rem;
    color: var(--text-secondary);
    font-weight: 500;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   AWARDS CONTAINER
   ============================================ */
.awards-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 80px;
    perspective: 1000px;
}

/* Award Card */
.award-card {
    position: relative;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 0;
    padding: 50px 40px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    min-width: 320px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    animation: cardFloat 3s ease-in-out infinite;
    clip-path: polygon(
        0 15px,
        15px 0,
        calc(100% - 15px) 0,
        100% 15px,
        100% calc(100% - 15px),
        calc(100% - 15px) 100%,
        15px 100%,
        0 calc(100% - 15px)
    );
}

.award-card:nth-child(1) { animation-delay: 0s; }
.award-card:nth-child(2) { animation-delay: 0.5s; }
.award-card:nth-child(3) { animation-delay: 1s; }

@keyframes cardFloat {
    0%, 100% { transform: translateY(0) rotateX(0); }
    50% { transform: translateY(-8px) rotateX(2deg); }
}

/* Card Glow Border */
.award-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    clip-path: polygon(
        0 15px,
        15px 0,
        calc(100% - 15px) 0,
        100% 15px,
        100% calc(100% - 15px),
        calc(100% - 15px) 100%,
        15px 100%,
        0 calc(100% - 15px)
    );
}

.award-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 60%
    );
    transform: rotate(45deg);
    animation: cardShine 4s ease-in-out infinite;
}

@keyframes cardShine {
    0%, 100% { transform: rotate(45deg) translate(-100%, -100%); }
    50% { transform: rotate(45deg) translate(100%, 100%); }
}

.award-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.award-card:hover::before {
    border-color: currentColor;
    box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.1);
}

/* Award Icon */
.award-icon {
    font-size: 5rem;
    margin-bottom: 25px;
    display: block;
    animation: iconPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px currentColor);
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

.award-card h3 {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.award-count {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.view-btn {
    display: inline-block;
    padding: 15px 35px;
    background: transparent;
    border: 2px solid currentColor;
    font-family: 'Orbitron', monospace;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.view-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: currentColor;
    transition: all 0.3s ease;
    z-index: -1;
    opacity: 0.2;
}

.award-card:hover .view-btn::before {
    left: 0;
}

.award-card:hover .view-btn {
    color: var(--text-primary);
    text-shadow: 0 0 10px currentColor;
}

/* Prize Colors */
.first-prize {
    color: var(--gold-primary);
}
.first-prize::before {
    border-color: var(--gold-primary);
}
.first-prize:hover {
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.5),
        0 0 40px var(--gold-glow),
        inset 0 0 60px rgba(255, 215, 0, 0.1);
}

.second-prize {
    color: var(--silver-primary);
}
.second-prize::before {
    border-color: var(--silver-primary);
}
.second-prize:hover {
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.5),
        0 0 40px var(--silver-glow),
        inset 0 0 60px rgba(192, 192, 192, 0.1);
}

.third-prize {
    color: var(--bronze-primary);
}
.third-prize::before {
    border-color: var(--bronze-primary);
}
.third-prize:hover {
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.5),
        0 0 40px var(--bronze-glow),
        inset 0 0 60px rgba(205, 127, 50, 0.1);
}

/* ============================================
   WINNER CARDS
   ============================================ */
.winners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    padding: 20px;
}

.winner-card {
    position: relative;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    padding: 40px 30px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    clip-path: polygon(
        0 20px,
        20px 0,
        calc(100% - 20px) 0,
        100% 20px,
        100% calc(100% - 20px),
        calc(100% - 20px) 100%,
        20px 100%,
        0 calc(100% - 20px)
    );
    animation: winnerAppear 0.6s ease-out both;
}

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

@keyframes winnerAppear {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.winner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink));
}

.winner-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-purple), var(--neon-cyan));
}

.winner-card:hover {
    transform: translateY(-10px);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(0, 255, 247, 0.2);
}

/* Avatar */
.avatar {
    width: 140px;
    height: 140px;
    margin: 0 auto 25px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: conic-gradient(
        from 0deg,
        var(--neon-cyan),
        var(--neon-purple),
        var(--neon-pink),
        var(--neon-cyan)
    );
    border-radius: 50%;
    animation: avatarRotate 4s linear infinite;
    z-index: -1;
}

@keyframes avatarRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-secondary);
    transition: all 0.3s ease;
}

.winner-card:hover .avatar img {
    transform: scale(1.05);
    border-color: var(--neon-cyan);
}

.winner-name {
    font-family: 'Orbitron', monospace;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.winner-title {
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.first-prize-page .winner-title { color: var(--gold-primary); text-shadow: 0 0 15px var(--gold-glow); }
.second-prize-page .winner-title { color: var(--silver-primary); text-shadow: 0 0 15px var(--silver-glow); }
.third-prize-page .winner-title { color: var(--bronze-primary); text-shadow: 0 0 15px var(--bronze-glow); }

.winner-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    font-weight: 500;
}

/* ============================================
   PRIZE PAGE SPECIFIC
   ============================================ */
.prize-header {
    text-align: center;
    margin-bottom: 60px;
    animation: prizeHeaderAppear 0.8s ease-out;
}

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

.prize-icon {
    font-size: 6rem;
    margin-bottom: 25px;
    display: inline-block;
    animation: prizeIconFloat 3s ease-in-out infinite;
}

@keyframes prizeIconFloat {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

.prize-title {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.first-prize-page .prize-title {
    color: var(--gold-primary);
    text-shadow: 0 0 30px var(--gold-glow);
}
.second-prize-page .prize-title {
    color: var(--silver-primary);
    text-shadow: 0 0 30px var(--silver-glow);
}
.third-prize-page .prize-title {
    color: var(--bronze-primary);
    text-shadow: 0 0 30px var(--bronze-glow);
}

.prize-subtitle {
    font-size: 1.4rem;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.1em;
}

/* Winner Highlight (First Prize) */
.winner-highlight {
    max-width: 550px;
    margin: 0 auto;
    padding: 60px 40px;
}

.winner-highlight::before {
    background: linear-gradient(90deg, var(--gold-primary), var(--neon-cyan), var(--gold-primary));
    height: 4px;
}

.winner-highlight::after {
    background: linear-gradient(90deg, var(--gold-primary), var(--neon-cyan), var(--gold-primary));
    height: 4px;
}

.winner-highlight .avatar {
    width: 200px;
    height: 200px;
}

.winner-highlight .winner-name {
    font-size: 2.5rem;
    text-shadow:
        0 0 20px var(--gold-glow),
        0 0 40px var(--gold-glow);
}

/* ============================================
   BACK BUTTON
   ============================================ */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 40px;
    background: transparent;
    border: 2px solid var(--neon-cyan);
    border-radius: 0;
    text-decoration: none;
    color: var(--neon-cyan);
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 50px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    clip-path: polygon(
        0 10px,
        10px 0,
        calc(100% - 10px) 0,
        100% 10px,
        100% calc(100% - 10px),
        calc(100% - 10px) 100%,
        10px 100%,
        0 calc(100% - 10px)
    );
}

.back-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--neon-cyan);
    transform: translateX(-100%);
    transition: all 0.3s ease;
    z-index: -1;
    opacity: 0.15;
}

.back-btn:hover {
    color: var(--text-primary);
    box-shadow:
        0 0 20px rgba(0, 255, 247, 0.4),
        inset 0 0 20px rgba(0, 255, 247, 0.1);
}

.back-btn:hover::before {
    transform: translateX(0);
    opacity: 0.25;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    text-align: center;
    padding: 50px 20px;
    margin-top: 40px;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.1em;
}

/* ============================================
   PARTICLES / DECORATIVE ELEMENTS
   ============================================ */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--neon-cyan);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 8s ease-in-out infinite;
}

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-100vh) scale(1);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 40px 20px;
    }

    .header {
        margin-bottom: 50px;
    }

    .awards-container {
        gap: 25px;
    }

    .award-card {
        min-width: 280px;
        padding: 35px 25px;
    }

    .award-icon {
        font-size: 4rem;
    }

    .winners-grid {
        gap: 25px;
    }

    .winner-card {
        padding: 30px 20px;
    }

    .winner-highlight {
        padding: 40px 25px;
    }

    .winner-highlight .avatar {
        width: 150px;
        height: 150px;
    }

    .winner-highlight .winner-name {
        font-size: 1.8rem;
    }
}

/* ============================================
   PAGE SPECIFIC BODY CLASSES
   ============================================ */
.first-prize-page {
    --accent-color: var(--gold-primary);
    --accent-glow: var(--gold-glow);
}

.second-prize-page {
    --accent-color: var(--silver-primary);
    --accent-glow: var(--silver-glow);
}

.third-prize-page {
    --accent-color: var(--bronze-primary);
    --accent-glow: var(--bronze-glow);
}
