/* Base Styles */
:root {
    --cny-red: #E62E2E;
    --cny-gold: #FFD700;
    --cny-dark-red: #8B0000;
    --cny-light-gold: #FFE55C;
    --text-light: #FFFFFF;
    --text-dark: #18181B;
    --envelope-red: #FF4D4F;
    /* Define font families as CSS variables */
    --font-decorative: 'Ma Shan Zheng', cursive;
    --font-text: 'Noto Serif TC', serif; /* Changed from sans-serif to serif */
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-text);
    font-weight: 400;
    background-color: transparent;
    overflow: hidden;
    color: var(--text-light);
}

/* OBS Container */
.obs-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.overlay-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

.floating-element {
    position: absolute;
    width: 30px;
    height: 30px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6;
    animation: floatUp 15s linear forwards;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0.2;
    }
    20% {
        opacity: 0.2;
    }
    80% {
        opacity: 0.2;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Wheel Section */
.wheel-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    position: relative;
}

.lantern {
    width: 60px;
    height: 80px;
    background-image: url('../assets/lantern.svg');
    background-size: contain;
    background-repeat: no-repeat;
    animation: sway 3s ease-in-out infinite alternate;
}

.lantern.left { transform-origin: top center; }
.lantern.right { transform-origin: top center; }

@keyframes sway {
    from { transform: rotate(-5deg); }
    to { transform: rotate(5deg); }
}

/* Wheel Container */
.wheel-container {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 0 auto;
}

#wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.wheel-pointer {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background-image: url('../assets/coin.svg');
    background-size: contain;
    background-repeat: no-repeat;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

/* Controls Section */
.controls-section {
    background: rgba(139, 0, 0, 0.65);
    border: 2px solid var(--cny-gold);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

/* Title Banner */
.title-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.title-banner h1 {
    font-family: var(--font-decorative);
    color: var(--cny-gold);
    font-size: 3rem;
    margin: 0;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.firecracker {
    width: 40px;
    height: 60px;
    background-image: url('../assets/firecracker.svg');
    background-size: contain;
    background-repeat: no-repeat;
}

/* Mode Selector */
.mode-selector {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* Button Styles */
.cny-button {
    background: var(--cny-red);
    color: var(--cny-gold);
    border: 2px solid var(--cny-gold);
    border-radius: 10px;
    padding: 0.8rem 1.5rem;
    font-family: var(--font-text);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cny-button:hover {
    background: var(--cny-dark-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

.cny-button.active {
    background: var(--cny-dark-red);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.cny-button.primary {
    font-size: 1.2rem;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, var(--cny-red), var(--cny-dark-red));
}

.cny-button.small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Special styling for the spin button */
#spinWheel {
    font-family: var(--font-decorative);
    font-size: 1.5rem;
}

/* Panel Styles */
.panel {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

input[type="text"], textarea {
    flex: 1;
    padding: 0.8rem;
    border: 2px solid var(--cny-gold);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-family: var(--font-text);
}

.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Winner Display */
.winner-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    pointer-events: none;
}

.red-envelope {
    background: var(--envelope-red);
    padding: 2rem;
    border-radius: 15px;
    border: 3px solid var(--cny-gold);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
    text-align: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.5s ease;
}

.red-envelope.show {
    opacity: 1;
    transform: scale(1);
}

.envelope-front h2 {
    font-family: var(--font-decorative);
    color: var(--cny-gold);
    font-size: 2.5rem;
    margin: 0 0 1rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.winner-name {
    font-family: var(--font-text);
    font-size: 1.5rem;
    color: var(--cny-gold);
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

/* Icons */
.icon {
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
}

.icon.twitch {
    background-image: url('data:image/svg+xml,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="%23FFD700" d="M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714z"/></svg>');
}

.icon.list {
    background-image: url('data:image/svg+xml,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="%23FFD700" d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"/></svg>');
}

.icon.envelope {
    background-image: url('data:image/svg+xml,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="%23FFD700" d="M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>');
}

/* Firework Animation */
@keyframes firework {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

.firework {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--cny-gold), transparent);
    animation: firework 1s ease-out forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wheel-container {
        width: 300px;
        height: 300px;
    }

    .title-banner h1 {
        font-size: 2rem;
    }

    .controls-section {
        padding: 1rem;
    }

    .lantern {
        width: 40px;
        height: 60px;
    }
} 