:root {
    --bg-dark: #0a0a1a;
    --bg-card: #111128;
    --wheel-light: #ff6b35;
    --wheel-dark: #c41e3a;
    --accent: #ffd700;
    --accent-glow: rgba(255, 215, 0, 0.4);
    --wheel-size: 320px;
    --outer-size: 400px;
    --inner-ring-size: 330px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
    overflow-y: auto;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(120, 0, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(255, 215, 0, 0.08) 0%, transparent 50%),
        linear-gradient(180deg, #0a0a1a 0%, #12122a 50%, #0a0a1a 100%);
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    text-align: center;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header {
    width: 100%;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.title {
    font-size: 2.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 50%, #ff6b35 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    margin-bottom: 8px;
    text-transform: uppercase;
    filter: drop-shadow(0 2px 10px rgba(255, 215, 0, 0.3));
}

.subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    margin-bottom: 20px;
    font-weight: 400;
}

.wheel-app-container {
    background: linear-gradient(145deg, #1a1a3e 0%, #0d0d24 100%);
    padding: 40px;
    border-radius: 60px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(120, 0, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: inline-block;
    position: relative;
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.wheel-outer-border {
    position: relative;
    width: var(--outer-size);
    height: var(--outer-size);
    background: radial-gradient(circle, #1a1a3e 0%, #0a0a1a 100%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid rgba(255, 215, 0, 0.15);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.08);
}

.dots-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

.dot {
    position: absolute;
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    left: 50%;
    top: 50%;
    box-shadow: 0 0 8px var(--accent-glow), 0 0 15px rgba(255, 215, 0, 0.2);
}

.wheel-inner-ring {
    position: absolute;
    width: var(--inner-ring-size);
    height: var(--inner-ring-size);
    border: 5px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    z-index: 5;
    pointer-events: none;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1), inset 0 0 15px rgba(255, 255, 255, 0.05);
}

.wheel-container {
    position: relative;
    width: var(--wheel-size);
    height: var(--wheel-size);
    border-radius: 50%;
    overflow: hidden;
}

.wheel-pointer {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background: var(--accent);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    z-index: 1000;
    filter: drop-shadow(0 3px 8px rgba(255, 215, 0, 0.5));
}

.wheel {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: white;
    transition: transform 6s cubic-bezier(0.1, 0, 0.1, 1);
}

.segment {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-origin: center center;
    clip-path: polygon(50% 50%, 50% 0%, 85.4% 14.6%);
    transform: rotate(calc(45deg * (var(--i) - 1)));
}

.segment:nth-child(odd) {
    background: linear-gradient(180deg, #ff7b42 0%, #ff5722 100%);
}

.segment:nth-child(even) {
    background: linear-gradient(180deg, #b71540 0%, #8e0e30 100%);
}

.segment::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 50%;
    background: rgba(0, 0, 0, 0.4);
    transform-origin: bottom center;
}

.labels-container {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.wheel-label {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 160px;
    height: 40px;
    transform-origin: left center;
    transform: translate(0, -50%) rotate(calc(45deg * (var(--i) - 1) + 22.5deg));
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 100;
}

.wheel-label span {
    color: white;
    font-weight: 900;
    font-size: 20px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    transform: rotate(90deg);
    white-space: nowrap;
    margin-left: 85px;
    letter-spacing: -1px;
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: linear-gradient(145deg, #1a1a3e 0%, #0a0a1a 100%);
    border-radius: 50%;
    border: 6px solid var(--accent);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 150;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.6),
        0 0 20px var(--accent-glow),
        inset 0 0 15px rgba(255, 215, 0, 0.1);
}

.wheel-center span {
    color: var(--accent);
    font-size: 2.8rem;
    font-weight: 900;
    font-style: italic;
    text-shadow: 0 0 15px var(--accent-glow);
}

.main-btn {
    width: 100%;
    max-width: 350px;
    padding: 20px;
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 50%, #ff8c00 100%);
    color: #1a0a00;
    border: none;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow:
        0 10px 30px rgba(255, 215, 0, 0.3),
        0 0 20px rgba(255, 215, 0, 0.15);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.main-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.main-btn:hover::before {
    left: 100%;
}

.main-btn:hover {
    transform: scale(1.03) translateY(-3px);
    box-shadow:
        0 15px 40px rgba(255, 215, 0, 0.4),
        0 0 30px rgba(255, 215, 0, 0.2);
}

.main-btn:active {
    transform: scale(0.97) translateY(2px);
}

.main-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.hidden {
    display: none !important;
}

#result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 20, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(15px);
}

.modal-content {
    background: linear-gradient(145deg, #1a1a3e 0%, #111128 100%);
    padding: 50px;
    border-radius: 40px;
    border: 2px solid var(--accent);
    max-width: 400px;
    width: 90%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: modalIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.6),
        0 0 40px var(--accent-glow);
}

.modal-content h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-content p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
}

@keyframes modalIn {
    from {
        transform: scale(0.7) translateY(30px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.robux-amount {
    margin: 20px 0;
    font-size: 4rem;
    font-weight: 900;
    color: var(--accent);
    text-shadow: 0 0 30px var(--accent-glow);
}

.currency {
    font-size: 1.5rem;
    display: block;
    color: rgba(255, 255, 255, 0.5);
    margin-top: -10px;
}

@media (max-width: 480px) {
    :root {
        --wheel-size: 260px;
        --outer-size: 320px;
        --inner-ring-size: 270px;
        --dot-radius: 155px;
    }

    .wheel-app-container {
        padding: 20px;
        border-radius: 40px;
    }

    .title {
        font-size: 2.2rem;
    }

    .wheel-center {
        width: 80px;
        height: 80px;
        border-width: 5px;
    }

    .wheel-center span {
        font-size: 2rem;
    }

    .wheel-label span {
        font-size: 14px;
        margin-left: 55px;
    }

    .modal-content {
        padding: 30px;
    }

    .robux-amount {
        font-size: 3rem;
    }

    .main-btn {
        max-width: 300px;
        padding: 16px;
        font-size: 1.1rem;
    }
}