* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #07b49f 0%, #0a9d8a 100%);
    overflow: hidden;
}

.home-container {
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.home-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    width: 100%;
    max-width: 1600px;
    height: 100%;
    align-items: center;
}

/* Left Section - Code Input */
.left-section {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.input-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 60px 50px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 500px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.input-title {
    font-size: 2.5rem;
    color: #07b49f;
    margin-bottom: 40px;
    text-align: center;
    font-weight: 700;
}

.code-input {
    width: 100%;
    padding: 25px 30px;
    font-size: 1.5rem;
    border: 3px solid #07b49f;
    border-radius: 15px;
    outline: none;
    transition: all 0.3s ease;
    background: white;
    color: #333;
    font-weight: 600;
    text-align: center;
    letter-spacing: 2px;
}

.code-input:focus {
    border-color: #0a9d8a;
    box-shadow: 0 0 20px rgba(7, 180, 159, 0.4);
    transform: scale(1.02);
}

.code-input::placeholder {
    color: #999;
    font-weight: 400;
}

.submit-btn {
    width: 100%;
    padding: 20px;
    margin-top: 30px;
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #07b49f 0%, #0a9d8a 100%);
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 10px 30px rgba(7, 180, 159, 0.4);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(7, 180, 159, 0.6);
}

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

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Right Section - Spin Wheel */
.right-section {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 5px;
}

.wheel-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1;
}

.wheel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.wheel-canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.3), 
                0 0 100px rgba(7, 180, 159, 0.2),
                inset 0 0 50px rgba(255, 255, 255, 0.1);
    background: white;
    /* border: 5px solid #fff; */
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #07b49f 0%, #0a9d8a 100%);
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wheel-pointer {
    position: absolute;
    top: 38%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 45px solid #07b49f;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.5));
    z-index: 11;
}

.spin-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #07b49f 0%, #0a9d8a 100%);
    border: 4px solid white;
    color: white;
    font-size: 1.1rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 12;
    box-shadow: 0 10px 30px rgba(7, 180, 159, 0.4);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.spin-button:hover:not(:disabled) {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 15px 40px rgba(7, 180, 159, 0.6);
}

.spin-button:active:not(:disabled) {
    transform: translate(-50%, -50%) scale(0.95);
}

.spin-button:disabled {
    opacity: 1;
    cursor: not-allowed;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    color: #333;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    overflow: hidden;
    background: #ffffff;
}

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

.close {
    color: white;
    float: right;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 30px;
    transition: all 0.3s ease;
}

.close:hover {
    transform: scale(1.2);
    color: #ffffff;
    opacity: 0.8;
}

.modal-content h2 {
    font-size: 3.5rem;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
}

.result-text {
    font-size: 1.8rem;
    margin-top: 20px;
}

#resultPrize {
    font-size: 2.2rem;
    font-weight: 900;
    color: #ffd700;
    display: block;
    margin-top: 15px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .home-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .left-section, .right-section {
        height: auto;
    }
    
    .wheel-container {
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .input-container {
        padding: 40px 30px;
    }
    
    .input-title {
        font-size: 2rem;
    }
    
    .code-input {
        font-size: 1.2rem;
        padding: 20px;
    }
    
    .submit-btn {
        font-size: 1.2rem;
        padding: 18px;
    }
    
    .wheel-container {
        max-width: 400px;
    }
    
    .spin-button {
        width: 100px;
        height: 100px;
        font-size: 1.2rem;
    }
}

.welcome-modal {
    background: #ffffff;
    padding: 80px 70px;
    position: relative;
    border: 1px solid #e0e0e0;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
}

.welcome-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #07b49f, #0a9d8a, #07b49f);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.welcome-icon {
    font-size: 100px;
    margin-bottom: 30px;
    animation: subtleBounce 2s ease infinite;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 5px 15px rgba(7, 180, 159, 0.2));
}

@keyframes subtleBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-12px) scale(1.05); }
}

.welcome-title {
    font-size: 3rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #07b49f 0%, #0a9d8a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: -1px;
    position: relative;
    z-index: 2;
}

.welcome-subtitle {
    font-size: 1.3rem;
    margin-bottom: 30px;
    color: #666;
    font-weight: 500;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

.welcome-name-container {
    background: linear-gradient(135deg, #f8fffe 0%, #f0fdfc 100%);
    border: 2px solid #07b49f;
    border-radius: 15px;
    padding: 25px 30px;
    margin: 30px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.welcome-label {
    font-size: 1.3rem;
    color: #666;
    font-weight: 500;
}

.welcome-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: #07b49f;
    letter-spacing: 0.5px;
}

.welcome-message {
    font-size: 1.1rem;
    margin: 25px 0 35px 0;
    color: #555;
    font-weight: 400;
    line-height: 1.7;
    position: relative;
    z-index: 2;
}

.start-spin-btn {
    width: 100%;
    padding: 20px 30px;
    margin-top: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #07b49f 0%, #0a9d8a 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 1px;
    box-shadow: 0 6px 20px rgba(7, 180, 159, 0.35);
    position: relative;
    z-index: 2;
    overflow: hidden;
}

.start-spin-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;
}

.start-spin-btn:hover::before {
    left: 100%;
}

.start-spin-btn:hover {
    background: linear-gradient(135deg, #0a9d8a 0%, #07b49f 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(7, 180, 159, 0.5);
}

.start-spin-btn:active {
    transform: translateY(-1px);
}


.invalid-modal {
    background: #ffffff;
    padding: 60px 50px;
    position: relative;
    border: 1px solid #e0e0e0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.invalid-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #ee5a6f);
}

.invalid-icon {
    font-size: 70px;
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
}

.invalid-modal h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #ff6b6b;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 2;
}

.invalid-modal p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #666;
    font-weight: 400;
    position: relative;
    z-index: 2;
}

.used-modal {
    background: #ffffff;
    padding: 60px 50px;
    position: relative;
    border: 1px solid #e0e0e0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.used-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ffa500, #ff8c00);
}

.used-icon {
    font-size: 70px;
    margin-bottom: 25px;
    position: relative;
    z-index: 2;
}

.used-modal h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #ffa500;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 2;
}

.used-details {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    text-align: left;
    position: relative;
    z-index: 2;
}

.used-info {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    font-weight: 400;
    margin: 12px 0;
    position: relative;
    z-index: 2;
}

.used-info strong {
    color: #555;
    font-weight: 600;
    display: inline-block;
    min-width: 140px;
}

.used-prize {
    color: #ffa500;
    font-weight: 600;
    font-size: 1.2rem;
}

.close-modal-btn {
    width: 100%;
    padding: 18px 30px;
    margin-top: 35px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 2;
}

.close-modal-btn:hover {
    background: #e9ecef;
    border-color: #ced4da;
    transform: translateY(-1px);
}

.close-modal-btn:active {
    transform: translateY(0);
}

.result-modal {
    z-index: 2000;
}

.result-modal .modal-content {
    background: #ffffff !important;
    padding: 80px 70px;
    position: relative;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    max-width: 750px;
    margin: 0 auto;
}

.result-modal .modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #07b49f, #0a9d8a, #ffd700, #ff6b6b, #ffd700, #0a9d8a, #07b49f);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

.fireworks-canvas {
    display: none;
}

.result-content {
    position: relative;
    z-index: 2;
    padding: 40px;
}

.celebration-icon {
    font-size: 100px;
    margin-bottom: 25px;
    animation: celebrateAnimation 1s ease infinite;
}

@keyframes celebrateAnimation {
    0%, 100% { 
        transform: scale(1) rotate(0deg); 
    }
    25% { 
        transform: scale(1.1) rotate(-10deg); 
    }
    75% { 
        transform: scale(1.1) rotate(10deg); 
    }
}

.result-content h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #07b49f 0%, #0a9d8a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: -1px;
}

.result-text {
    font-size: 1.2rem;
    margin: 20px 0;
    color: #666;
    font-weight: 500;
}

.prize-text {
    font-size: 2.3rem;
    font-weight: 800;
    color: #ff6b6b;
    margin: 25px 0;
    padding: 22px 35px;
    background: linear-gradient(135deg, #fff5f5 0%, #fff9e6 100%);
    border: 3px solid #ff6b6b;
    border-radius: 15px;
    display: inline-block;
    line-height: 1.3;
    animation: prizeGlow 2s ease infinite;
    position: relative;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.2);
}

.prize-text::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(135deg, #ff6b6b, #ffd700, #ff6b6b);
    border-radius: 15px;
    z-index: -1;
    opacity: 0.2;
    animation: prizeGlow 2s ease infinite;
}

@keyframes prizeGlow {
    0%, 100% { 
        box-shadow: 0 10px 30px rgba(255, 107, 107, 0.2), 0 0 20px rgba(255, 215, 0, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 15px 40px rgba(255, 107, 107, 0.4), 0 0 40px rgba(255, 215, 0, 0.5);
        transform: scale(1.02);
    }
}


.wheel-fullscreen{
    position:fixed;
    inset:0;
    background:linear-gradient(135deg,#07b49f 0%,#0a9d8a 100%);
    display:none;
    z-index:99999;
    align-items:center;
    justify-content:center;
    }
    .wheel-fullscreen.show{
    display:flex;
    }
    .wheel-fullscreen-inner{
    width:90vmin;
    height:90vmin;
    }

    #wheelOverlay{
        position:fixed;
        inset:0;
        background:linear-gradient(135deg,#07b49f 0%,#0a9d8a 100%);
        z-index:99990;
        display:none;
        }


        #congrats_particles{
            display: none;
        }
        .confetti-container {
            user-select: none;
            z-index: 10;
          }
          .confetti {
            position: fixed;
            left: 0;
            right: 0;
            display: flex;
            z-index: 99999999999;
            /* width: 600px; */
            /* height: 600px; */
            /* overflow: hidden; */
          }
          
          .confetti .square {
            width: 1rem;
            height: 1rem;
            background-color: var(--bg);
            transform: rotate(-140deg);
          }
          
          .confetti .rectangle {
            width: 1rem;
            height: 0.5rem;
            background-color: var(--bg);
          }
          
          .confetti .hexagram {
            width: 0;
            height: 0;
            border-left: 0.5rem solid transparent;
            border-right: 0.5rem solid transparent;
            border-bottom: 1rem solid var(--bg);
            position: relative;
          }
          
          .confetti .hexagram:after {
            content: "";
            width: 0;
            height: 0;
            border-left: 0.5rem solid transparent;
            border-right: 0.5rem solid transparent;
            border-top: 1rem solid var(--bg);
            position: absolute;
            top: 0.33rem;
            left: -0.5rem;
          }
          
          .confetti .pentagram {
            width: 0rem;
            height: 0rem;
            display: block;
            margin: 0.5rem 0;
            border-right: 1rem solid transparent;
            border-bottom: 0.7rem solid var(--bg);
            border-left: 1rem solid transparent;
            transform: rotate(35deg);
            position: relative;
          }
          .confetti .pentagram:before {
            content: "";
            width: 0;
            height: 0;
            display: block;
            border-bottom: 0.8rem solid var(--bg);
            border-left: 0.3rem solid transparent;
            border-right: 0.3rem solid transparent;
            transform: rotate(-35deg);
            position: absolute;
            top: -0.45rem;
            left: -0.65rem;
          }
          .confetti .pentagram:after {
            content: "";
            width: 0rem;
            height: 0rem;
            display: block;
            border-right: 1rem solid transparent;
            border-bottom: 0.7rem solid var(--bg);
            border-left: 1rem solid transparent;
            transform: rotate(-70deg);
            position: absolute;
            top: 0.03rem;
            left: -1.05rem;
          }
          
          .confetti .dodecagram {
            background: var(--bg);
            width: 0.8rem;
            height: 0.8rem;
            position: relative;
          }
          
          .confetti .dodecagram:before {
            content: "";
            height: 0.8rem;
            width: 0.8rem;
            background: var(--bg);
            transform: rotate(30deg);
            position: absolute;
            top: 0;
            left: 0;
          }
          .confetti .dodecagram:after {
            content: "";
            height: 0.8rem;
            width: 0.8rem;
            background: var(--bg);
            transform: rotate(60deg);
            position: absolute;
            top: 0;
            left: 0;
          }
          
          .confetti .wavy-line {
            position: relative;
          }
          .confetti .wavy-line::after,
          .confetti .wavy-line::before {
            content: "";
            height: 1rem;
            width: 8rem;
            background-size: 2rem 1rem;
            position: absolute;
            left: -9rem;
            transform: rotate(90deg);
          }
          
          .confetti .wavy-line::before {
            background-image: linear-gradient(
              45deg,
              transparent,
              transparent 50%,
              var(--bg) 50%,
              transparent 60%
            );
            top: 1rem;
          }
          .confetti .wavy-line::after {
            background-image: linear-gradient(
              -45deg,
              transparent,
              transparent 50%,
              var(--bg) 50%,
              transparent 60%
            );
          }
          
          .confetti i {
            width: 3rem;
            height: 3rem;
            margin: 0 0.2rem;
            animation-name: confetti;
            animation-timing-function: linear;
            animation-iteration-count: infinite;
            animation-duration: calc(70s / var(--speed));
          }
          
          .confetti i:nth-child(even) {
            transform: rotate(90deg);
          }
          
          @keyframes confetti {
            0% {
              transform: translateY(-100vh);
            }
          
            100% {
              transform: translateY(100vh);
            }
          }
          
          
          