/* ========================================
   Kéo Búa Bao Game - Premium CSS Styles
   ======================================== */

/* CSS Variables */
:root {
    --primary-gradient: linear-gradient(135deg, #FFD700 0%, #FF8C00 50%, #FF0000 100%);
    /* Gold to Red */
    --secondary-gradient: linear-gradient(135deg, #1c2033 0%, #2a2f4c 100%);
    --win-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --lose-gradient: linear-gradient(135deg, #eb5757 0%, #ff6b6b 100%);
    --tie-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-primary: #ffffff;
    --text-gold: #FFD700;
    --text-secondary: #EFC87E;
    --bg-dark: #1c2033;
    --shadow-glow: 0 0 30px rgba(239, 200, 126, 0.3);
}

/* Happy New Year Banner */
.hny-banner {
    text-align: center;
    margin: 10px 0 20px;
    position: relative;
    z-index: 5;
}

.fire-text {
    font-size: 3.5rem;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    text-shadow:
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 20px #ff00de,
        0 0 30px #ff00de,
        0 0 40px #ff00de,
        0 0 50px #ff00de,
        0 0 75px #ff00de;
    animation: neon-pulse 1.5s infinite alternate;
    font-family: 'Segoe UI', sans-serif;
    /* Or a more decorative font if available */
}

@keyframes neon-pulse {
    from {
        text-shadow:
            0 0 5px #fff,
            0 0 10px #fff,
            0 0 20px #FFD700,
            0 0 30px #FFD700,
            0 0 40px #FFD700;
    }

    to {
        text-shadow:
            0 0 2px #fff,
            0 0 5px #fff,
            0 0 10px #FFD700,
            0 0 20px #FFD700,
            0 0 30px #FF8C00;
    }
}

/* Game Container */
.game-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

/* Navigation */
.game-nav {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Header & Logo */
header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 20px 0;
    width: 100%;
    z-index: 10;
    position: relative;
}

header a {
    display: block;
}

.logo {
    max-width: 280px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(239, 200, 126, 0.3));
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo:hover {
    transform: scale(1.05) rotate(-2deg);
    filter: drop-shadow(0 0 20px rgba(239, 200, 126, 0.6));
}

/* Footer */
footer {
    width: 100%;
    padding: 30px 20px;
    margin-top: 40px;
    text-align: center;
    background: linear-gradient(to top, rgba(28, 32, 51, 0.95), rgba(28, 32, 51, 0.6));
    border-top: 1px solid var(--glass-border);
    position: relative;
    z-index: 10;
}

footer p {
    margin: 8px 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

footer p:first-child {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

/* Game Header */
.game-header {
    text-align: center;
    margin-bottom: 10px;
}

.game-title {
    font-size: 2.8rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    text-shadow: none;
}

.game-title .emoji {
    font-size: 2.5rem;
    -webkit-text-fill-color: initial;
    animation: bounce 2s infinite;
}

.game-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 10px;
    opacity: 0.9;
}

/* Scoreboard */
.scoreboard {
    display: flex;
    justify-content: center;
    gap: 30px;
    width: 100%;
    max-width: 500px;
}

.score-item {
    flex: 1;
    text-align: center;
    padding: 15px 20px;
    background: var(--glass-bg);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.score-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

.player-score {
    border-color: #38ef7d;
}

.tie-score {
    border-color: #f5576c;
}

.computer-score {
    border-color: #667eea;
}

.score-icon {
    font-size: 2rem;
    margin-bottom: 5px;
}

.score-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.score-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-primary);
}

/* Battle Arena */
.battle-arena {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    width: 100%;
    padding: 30px;
    background: var(--glass-bg);
    border-radius: 25px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.player-side,
.computer-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.choice-display {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border-radius: 50%;
    border: 3px solid var(--glass-border);
    transition: all 0.3s ease;
}

.player-choice {
    border-color: #38ef7d;
}

.computer-choice {
    border-color: #667eea;
}

.choice-display .choice-emoji {
    font-size: 4rem;
}

.side-label {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

/* VS Container */
.vs-container {
    position: relative;
}

.vs-text {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-secondary);
    text-shadow: 0 0 20px rgba(239, 200, 126, 0.5);
    animation: pulse 1.5s infinite;
}

/* Result Container */
.result-container {
    text-align: center;
    padding: 20px 40px;
    border-radius: 15px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    min-width: 300px;
    transition: all 0.3s ease;
}

.result-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
}

.result-container.win {
    background: var(--win-gradient);
    border-color: #38ef7d;
    animation: celebrate 0.5s ease;
}

.result-container.lose {
    background: var(--lose-gradient);
    border-color: #eb5757;
    animation: shake 0.5s ease;
}

.result-container.tie {
    background: var(--tie-gradient);
    border-color: #f5576c;
    animation: pulse 0.5s ease;
}

/* Choice Buttons */
.choices-container {
    display: flex;
    gap: 25px;
    justify-content: center;
    flex-wrap: wrap;
}

.choice-btn {
    position: relative;
    width: 140px;
    height: 140px;
    border: none;
    border-radius: 20px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.choice-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.choice-btn:hover::before {
    opacity: 1;
}

.choice-btn:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(255, 107, 53, 0.3);
    border-color: #ff6b35;
}

.choice-btn:active {
    transform: translateY(-5px) scale(0.98);
}

.btn-emoji {
    font-size: 3.5rem;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.choice-btn:hover .btn-emoji {
    transform: scale(1.2);
}

.btn-label {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.btn-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 204, 0, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.choice-btn:hover .btn-glow {
    opacity: 1;
    animation: glow-pulse 1s infinite;
}

/* Specific button colors */
#btn-rock:hover {
    border-color: #eb5757;
    box-shadow: 0 20px 40px rgba(235, 87, 87, 0.3);
}

#btn-rock:hover::before {
    background: linear-gradient(135deg, #eb5757 0%, #ff6b6b 100%);
}

#btn-paper:hover {
    border-color: #38ef7d;
    box-shadow: 0 20px 40px rgba(56, 239, 125, 0.3);
}

#btn-paper:hover::before {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

#btn-scissors:hover {
    border-color: #667eea;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

#btn-scissors:hover::before {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Game Controls */
.game-controls {
    display: flex;
    gap: 15px;
}

.control-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.reset-btn {
    background: var(--secondary-gradient);
    color: white;
}

.reset-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* Game Rules */
.game-rules {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 20px 30px;
    backdrop-filter: blur(10px);
    max-width: 400px;
}

.game-rules h3 {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 1.2rem;
    background: none;
    -webkit-text-fill-color: var(--text-secondary);
}

.game-rules ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.game-rules li {
    color: var(--text-primary);
    padding: 8px 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.game-rules li:last-child {
    border-bottom: none;
}

/* Confetti Container */
#confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ff6b35;
    top: -10px;
    animation: confetti-fall 3s linear forwards;
}

/* Animations */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-15px);
    }

    60% {
        transform: translateY(-7px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

@keyframes celebrate {
    0% {
        transform: scale(0.8);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes glow-pulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

@keyframes confetti-fall {
    0% {
        top: -10px;
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        top: 100vh;
        transform: translateX(100px) rotate(720deg);
        opacity: 0;
    }
}

@keyframes thinking {

    0%,
    100% {
        content: '🤔';
    }

    20% {
        content: '✊';
    }

    40% {
        content: '🖐️';
    }

    60% {
        content: '✌️';
    }

    80% {
        content: '🤔';
    }
}

.thinking .choice-emoji {
    animation: thinking-emoji 0.5s infinite;
}

@keyframes thinking-emoji {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}


/* Mouse Trail */
#mouse-trail-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.trail-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    background: white;
    box-shadow: 0 0 10px white;
}

/* Background Particles (Falling Flowers) */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.petal {
    position: absolute;
    top: -20px;
    background: radial-gradient(circle, #FFD700 0%, #FFA500 100%);
    border-radius: 50% 0 50% 50%;
    opacity: 0.8;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
}

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

    .game-title .emoji {
        font-size: 1.8rem;
    }

    .battle-arena {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .vs-container {
        transform: rotate(90deg);
    }

    .choice-display {
        width: 100px;
        height: 100px;
    }

    .choice-display .choice-emoji {
        font-size: 3rem;
    }

    .choices-container {
        gap: 15px;
    }

    .choice-btn {
        width: 100px;
        height: 100px;
    }

    .btn-emoji {
        font-size: 2.5rem;
    }

    .btn-label {
        font-size: 0.9rem;
    }

    .scoreboard {
        gap: 15px;
    }

    .score-item {
        padding: 10px 15px;
    }

    .score-icon {
        font-size: 1.5rem;
    }

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

    .result-container {
        min-width: auto;
        width: 90%;
    }

    .result-text {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 15px;
        gap: 20px;
    }

    .game-title {
        font-size: 1.6rem;
        flex-wrap: wrap;
    }

    .game-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-link {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .logo {
        max-width: 200px;
    }

    footer {
        padding: 20px 15px;
        margin-top: 30px;
    }

    footer p:first-child {
        font-size: 1rem;
    }

    .choice-btn {
        width: 85px;
        height: 85px;
    }

    .btn-emoji {
        font-size: 2rem;
    }

    .btn-label {
        font-size: 0.8rem;
    }

    .game-rules {
        padding: 15px 20px;
    }

    .game-rules li {
        font-size: 0.9rem;
    }
}

/* Dark mode optimizations (already dark, but adding subtle enhancements) */
@media (prefers-color-scheme: dark) {
    .choice-btn {
        background: rgba(30, 30, 50, 0.8);
    }

    .score-item {
        background: rgba(30, 30, 50, 0.8);
    }
}