/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-x: hidden;
    position: relative;
    color: #fff;
}

/* ===== OCEAN BACKGROUND ===== */
.ocean-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, 
        #0a1628 0%, 
        #0d1f3c 20%, 
        #0f2b5c 40%, 
        #1a4a7a 60%, 
        #2d7ba0 80%, 
        #5ab4d4 100%
    );
    z-index: -2;
    overflow: hidden;
}

.ocean-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(100, 200, 255, 0.12) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 80%, rgba(0, 100, 200, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 30% 30%, rgba(255, 200, 100, 0.05) 0%, transparent 30%);
    animation: lightShift 8s ease-in-out infinite alternate;
}

@keyframes lightShift {
    0% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
    100% { opacity: 0.8; transform: scale(0.98); }
}

/* Animated light rays from above water */
.ocean-bg .light-rays {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(180deg, 
        rgba(255, 255, 200, 0.03) 0%, 
        transparent 100%
    );
    clip-path: polygon(10% 0, 20% 40%, 30% 0, 40% 30%, 50% 0, 60% 35%, 70% 0, 80% 25%, 90% 0, 100% 40%);
    animation: lightRays 6s ease-in-out infinite alternate;
}

@keyframes lightRays {
    0% { transform: translateX(-5%) skewX(-2deg); opacity: 0.3; }
    50% { transform: translateX(0) skewX(0deg); opacity: 0.6; }
    100% { transform: translateX(5%) skewX(2deg); opacity: 0.3; }
}

/* Waves */
.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 120px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath d='M0,60 C150,20 350,100 600,60 C850,20 1050,100 1200,60 L1200,120 L0,120 Z' fill='rgba(255,255,255,0.04)'/%3E%3C/svg%3E") repeat-x;
    background-size: 1200px 120px;
    animation: waveMove 8s linear infinite;
}

.wave1 { bottom: 0; opacity: 0.4; animation-duration: 7s; }
.wave2 { bottom: 15px; opacity: 0.3; animation-duration: 10s; animation-delay: -3s; }
.wave3 { bottom: 30px; opacity: 0.15; animation-duration: 13s; animation-delay: -6s; }
.wave4 { bottom: 45px; opacity: 0.1; animation-duration: 16s; animation-delay: -9s; }

@keyframes waveMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== BUBBLES ===== */
.bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.15), transparent);
    animation: bubbleFloat linear infinite;
}

@keyframes bubbleFloat {
    0% { 
        transform: translateY(100vh) translateX(0) scale(0.5);
        opacity: 0;
    }
    10% { opacity: 0.4; transform: scale(1); }
    90% { opacity: 0.15; }
    100% { 
        transform: translateY(-10vh) translateX(80px) scale(0.8);
        opacity: 0;
    }
}

/* ===== STARS ===== */
.ocean-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background-image: 
        radial-gradient(2px 2px at 10% 10%, rgba(255,255,255,0.4), transparent),
        radial-gradient(2px 2px at 20% 40%, rgba(255,255,255,0.3), transparent),
        radial-gradient(3px 3px at 30% 20%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 40% 60%, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 50% 15%, rgba(255,255,255,0.3), transparent),
        radial-gradient(3px 3px at 60% 45%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 70% 25%, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 80% 55%, rgba(255,255,255,0.3), transparent),
        radial-gradient(3px 3px at 90% 35%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 15% 75%, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 45% 85%, rgba(255,255,255,0.5), transparent),
        radial-gradient(3px 3px at 75% 65%, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 5% 50%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 95% 30%, rgba(255,255,255,0.5), transparent),
        radial-gradient(2px 2px at 55% 5%, rgba(255,255,255,0.3), transparent);
    animation: twinkle 3s ease-in-out infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.4; }
    25% { opacity: 0.7; }
    50% { opacity: 0.5; }
    75% { opacity: 0.8; }
    100% { opacity: 0.6; }
}

/* Shooting star */
.shooting-star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.3);
    animation: shootingStar 12s linear infinite;
    opacity: 0;
}

.shooting-star::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0.4), transparent);
    right: 100%;
}

@keyframes shootingStar {
    0% { transform: translate(0, 0); opacity: 0; }
    2% { transform: translate(100px, 100px); opacity: 1; }
    5% { transform: translate(300px, 300px); opacity: 0; }
    100% { transform: translate(300px, 300px); opacity: 0; }
}

/* ===== CONTAINER ===== */
.container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 700px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}

/* ===== BILINGUAL STYLES ===== */
.lang-vi {
    display: inline;
}

.lang-ko {
    display: inline;
}

.lang-sep {
    display: inline;
    opacity: 0.4;
    font-size: 0.8em;
    margin: 0 4px;
    color: rgba(255, 255, 255, 0.5);
}

/* Language Indicator */
.lang-indicator {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    animation: slideDown 0.6s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.lang-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    animation: badgePulse 3s ease-in-out infinite;
}

.lang-badge.vi {
    background: linear-gradient(135deg, rgba(218, 37, 29, 0.3), rgba(255, 200, 0, 0.3));
    border: 1px solid rgba(255, 200, 0, 0.4);
    color: #ffcc00;
}

.lang-badge.ko {
    background: linear-gradient(135deg, rgba(0, 86, 156, 0.3), rgba(237, 27, 36, 0.3));
    border: 1px solid rgba(237, 27, 36, 0.4);
    color: #ff6b6b;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* For preset buttons and other elements, stack vertically on small screens */
.preset-btn .lang-vi,
.preset-btn .lang-ko,
.start-game-btn .lang-vi,
.start-game-btn .lang-ko {
    display: inline;
}

/* ===== TITLE ===== */
.title {
    font-size: 2.5em;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #f7ff00, #00b4db, #f5576c, #f7ff00);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 4s ease-in-out infinite alternate, shimmer 3s linear infinite;
    letter-spacing: 3px;
    text-shadow: none;
    filter: drop-shadow(0 0 20px rgba(0, 180, 219, 0.4));
}

@keyframes titleGlow {
    0% { filter: drop-shadow(0 0 15px rgba(0, 180, 219, 0.3)); }
    50% { filter: drop-shadow(0 0 30px rgba(247, 255, 0, 0.4)); }
    100% { filter: drop-shadow(0 0 25px rgba(245, 87, 108, 0.5)); }
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating sparkles around title */
.title::before {
    content: '✦';
    position: absolute;
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #f7ff00;
    -webkit-text-fill-color: #f7ff00;
    animation: sparkleFloat 2s ease-in-out infinite;
    opacity: 0.6;
}

.title::after {
    content: '✦';
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #00b4db;
    -webkit-text-fill-color: #00b4db;
    animation: sparkleFloat 2s ease-in-out 1s infinite;
    opacity: 0.6;
}

@keyframes sparkleFloat {
    0%, 100% { transform: translateY(-50%) scale(1); opacity: 0.4; }
    50% { transform: translateY(-70%) scale(1.3); opacity: 1; }
}

/* Floating sparkle particles container */
.sparkle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: sparkleAnim 3s ease-in-out infinite;
}

.sparkle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.sparkle:nth-child(2) { left: 30%; top: 40%; animation-delay: 0.5s; }
.sparkle:nth-child(3) { left: 50%; top: 10%; animation-delay: 1s; }
.sparkle:nth-child(4) { left: 70%; top: 50%; animation-delay: 1.5s; }
.sparkle:nth-child(5) { left: 90%; top: 30%; animation-delay: 2s; }
.sparkle:nth-child(6) { left: 20%; top: 70%; animation-delay: 2.5s; }
.sparkle:nth-child(7) { left: 60%; top: 80%; animation-delay: 0.8s; }
.sparkle:nth-child(8) { left: 80%; top: 15%; animation-delay: 1.8s; }

@keyframes sparkleAnim {
    0%, 100% { 
        transform: scale(0) rotate(0deg); 
        opacity: 0;
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
    50% { 
        transform: scale(1) rotate(180deg); 
        opacity: 1;
        box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.3);
    }
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
    margin-bottom: 30px;
    color: #a8d8ea;
    animation: subtitleFloat 3s ease-in-out infinite;
    letter-spacing: 2px;
}

@keyframes subtitleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* ===== SETUP MODE ===== */
.setup-mode {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.5s ease;
    position: relative;
    overflow: hidden;
}

.setup-mode::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent, 
        rgba(0, 180, 219, 0.03), 
        transparent 30%, 
        rgba(240, 147, 251, 0.03), 
        transparent 60%, 
        rgba(0, 180, 219, 0.03), 
        transparent
    );
    animation: rotateBg 10s linear infinite;
}

@keyframes rotateBg {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.setup-mode h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #a8d8ea;
    position: relative;
    z-index: 1;
}

.prize-input-area {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.prize-input-area input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
}

.prize-input-area input[type="text"]:focus {
    border-color: #00b4db;
    box-shadow: 0 0 15px rgba(0, 180, 219, 0.3);
    transform: scale(1.02);
}

.prize-input-area input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.prize-input-area input[type="color"] {
    width: 50px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    cursor: pointer;
    background: transparent;
    padding: 2px;
}

.prize-input-area button {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #00b4db, #0083b0);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.prize-input-area button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.prize-input-area button:hover::after {
    opacity: 1;
}

.prize-input-area button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 180, 219, 0.4);
}

.prize-input-area button:active {
    transform: scale(0.95);
}

.prize-list-container {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 20px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    position: relative;
    z-index: 1;
}

.prize-list-container::-webkit-scrollbar {
    width: 8px;
}

.prize-list-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.prize-list-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.prize-list-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.prize-list {
    list-style: none;
    padding: 0;
}

.prize-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    animation: slideIn 0.3s ease;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.prize-list li:hover {
    background: rgba(255, 255, 255, 0.15);
    border-left-color: #00b4db;
    transform: translateX(5px);
}

.prize-list .prize-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s;
}

.prize-list li:hover .prize-color {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.prize-list .prize-name {
    flex: 1;
    text-align: left;
    font-size: 15px;
}

.prize-list .prize-index {
    color: rgba(255, 255, 255, 0.5);
    margin-right: 10px;
    font-size: 12px;
}

.prize-list .delete-btn {
    background: none;
    border: none;
    color: #ff6b6b;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    transition: all 0.3s;
    border-radius: 50%;
}

.prize-list .delete-btn:hover {
    background: rgba(255, 107, 107, 0.2);
    transform: scale(1.2) rotate(90deg);
}

@keyframes slideIn {
    from { 
        opacity: 0; 
        transform: translateX(-20px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

/* Preset Buttons */
.preset-prizes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.preset-btn {
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #a8d8ea;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.preset-btn::before {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.5s;
}

.preset-btn:hover::before {
    left: 100%;
}

.preset-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(5px);
    border-color: #00b4db;
    box-shadow: 0 0 15px rgba(0, 180, 219, 0.2);
}

/* Start Game Button */
.start-game-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 15px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(245, 87, 108, 0.4);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.start-game-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #f093fb, #f5576c, #00b4db, #f093fb);
    background-size: 400% 400%;
    border-radius: 16px;
    z-index: -1;
    animation: gradientBorder 3s ease infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

.start-game-btn:hover::before {
    opacity: 1;
}

.start-game-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    border-radius: 15px;
    z-index: -1;
}

@keyframes gradientBorder {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.start-game-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 30px rgba(245, 87, 108, 0.6);
}

.start-game-btn:active {
    transform: scale(0.98);
}

/* ===== GAME MODE ===== */
.game-mode {
    animation: fadeIn 0.5s ease;
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Wheel Container */
.wheel-container {
    position: relative;
    width: 500px;
    height: 500px;
    margin: 0 auto 20px;
    animation: wheelAppear 0.8s ease;
}

@keyframes wheelAppear {
    0% { transform: scale(0.3) rotate(-180deg); opacity: 0; }
    60% { transform: scale(1.1) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Outer glow ring */
.wheel-container::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border-radius: 50%;
    background: conic-gradient(
        #00b4db, #0083b0, #00b4db, #f5576c, #00b4db, 
        #0083b0, #f093fb, #00b4db, #0083b0, #00b4db
    );
    animation: spinGlow 4s linear infinite;
    opacity: 0.4;
    filter: blur(10px);
}

@keyframes spinGlow {
    0% { transform: rotate(0deg); opacity: 0.3; }
    50% { opacity: 0.5; }
    100% { transform: rotate(360deg); opacity: 0.3; }
}

#wheelCanvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(0, 180, 219, 0.3),
                0 0 80px rgba(0, 180, 219, 0.1),
                inset 0 0 30px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s;
    position: relative;
    z-index: 2;
}

#wheelCanvas.spinning {
    box-shadow: 0 0 60px rgba(0, 180, 219, 0.5),
                0 0 120px rgba(0, 180, 219, 0.2),
                0 0 180px rgba(245, 87, 108, 0.1);
}

/* Spin Button */
.spin-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 4px 20px rgba(245, 87, 108, 0.5);
    transition: all 0.15s ease;
    user-select: none;
    z-index: 20;
    border: 4px solid rgba(255, 255, 255, 0.3);
    animation: spinBtnPulse 2s ease-in-out infinite;
}

@keyframes spinBtnPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(245, 87, 108, 0.5); }
    50% { box-shadow: 0 4px 30px rgba(245, 87, 108, 0.7), 0 0 50px rgba(245, 87, 108, 0.2); }
}

.spin-btn:active {
    transform: translate(-50%, -50%) scale(0.9);
    box-shadow: 0 2px 10px rgba(245, 87, 108, 0.3);
}

.spin-btn.spinning-active {
    background: linear-gradient(135deg, #00b4db, #0083b0);
    box-shadow: 0 0 30px rgba(0, 180, 219, 0.6);
    animation: pulse 0.5s ease-in-out infinite alternate;
    border-color: rgba(255, 255, 255, 0.5);
}

@keyframes pulse {
    from { 
        box-shadow: 0 0 20px rgba(0, 180, 219, 0.4), 0 0 40px rgba(0, 180, 219, 0.2); 
        transform: translate(-50%, -50%) scale(1);
    }
    to { 
        box-shadow: 0 0 40px rgba(0, 180, 219, 0.8), 0 0 80px rgba(0, 180, 219, 0.3); 
        transform: translate(-50%, -50%) scale(1.05);
    }
}

/* Info Panel */
.info-panel {
    margin-top: 20px;
    animation: fadeIn 0.8s ease 0.3s both;
}

.result-display {
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 15px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
}

.result-display span {
    font-size: 1.2em;
    font-weight: bold;
}

.result-display.winner {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.3), rgba(245, 87, 108, 0.3));
    border-color: #f5576c;
    animation: winPulse 0.5s ease;
    box-shadow: 0 0 30px rgba(245, 87, 108, 0.2);
}

@keyframes winPulse {
    0% { transform: scale(1); }
    30% { transform: scale(1.03); }
    60% { transform: scale(0.98); }
    100% { transform: scale(1); }
}

.back-btn {
    padding: 12px 25px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.back-btn:active {
    transform: scale(0.95);
}

/* ===== FIREWORKS CANVAS ===== */
#fireworksCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: fadeIn 0.3s ease;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalBounce 0.5s ease;
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent,
        rgba(247, 255, 0, 0.05),
        transparent 30%,
        rgba(245, 87, 108, 0.05),
        transparent 60%,
        rgba(0, 180, 219, 0.05),
        transparent
    );
    animation: rotateBg 8s linear infinite;
}

@keyframes modalBounce {
    0% { transform: scale(0.3) rotate(-10deg); opacity: 0; }
    50% { transform: scale(1.1) rotate(3deg); }
    70% { transform: scale(0.95); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.modal-content h2 {
    font-size: 2em;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #f7ff00, #f5576c, #00b4db);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 2s linear infinite;
    position: relative;
    z-index: 1;
}

.modal-content p {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #a8d8ea;
    position: relative;
    z-index: 1;
    animation: textPop 0.5s ease 0.3s both;
}

@keyframes textPop {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.fireworks-icon {
    font-size: 3em;
    margin-bottom: 20px;
    animation: iconBounce 0.6s ease infinite;
    position: relative;
    z-index: 1;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    25% { transform: translateY(-10px) scale(1.1); }
    50% { transform: translateY(0) scale(1); }
    75% { transform: translateY(-5px) scale(1.05); }
}

.modal-btn {
    padding: 14px 40px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #00b4db, #0083b0);
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.modal-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.modal-btn:hover::before {
    left: 100%;
}

.modal-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 180, 219, 0.4);
}

.modal-btn:active {
    transform: scale(0.95);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .container {
        padding: 15px;
        margin-top: 10px;
    }

    .title {
        font-size: 1.5em;
        letter-spacing: 1px;
    }

    .title::before,
    .title::after {
        display: none;
    }

    .wheel-container {
        width: 320px;
        height: 320px;
    }

    .wheel-container::before {
        top: -8px;
        left: -8px;
        right: -8px;
        bottom: -8px;
    }

    #wheelCanvas {
        width: 320px;
        height: 320px;
    }

    .spin-btn {
        width: 70px;
        height: 70px;
        font-size: 14px;
    }

    .setup-mode {
        padding: 20px;
    }

    .prize-input-area input[type="text"] {
        min-width: 150px;
    }

    .modal-content {
        padding: 30px 20px;
    }

    .modal-content h2 {
        font-size: 1.5em;
    }

    .modal-content p {
        font-size: 1.2em;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .wheel-container {
        width: 400px;
        height: 400px;
    }

    #wheelCanvas {
        width: 400px;
        height: 400px;
    }

    .spin-btn {
        width: 85px;
        height: 85px;
        font-size: 16px;
    }
}