* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

body {
    background: linear-gradient(
        145deg,
        #0f172a,
        #1e293b
    );

    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 20px;
}

.container {
    max-width: 800px;
    width: 100%;

    background: #ffffff;

    border-radius: 40px;

    padding: 30px 25px;

    box-shadow:
        0 25px 50px
        rgba(0, 0, 0, 0.6);

    text-align: center;
}

h1 {
    font-size: 32px;
    color: #0f172a;
    margin-bottom: 20px;
}

h1 span {
    background: #facc15;
    padding: 0 12px;
    border-radius: 20px;
}

.input-section {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    margin-bottom: 15px;
}

.input-section input {
    flex: 3;

    padding: 12px 18px;

    border: 2px solid #e2e8f0;

    border-radius: 60px;

    font-size: 16px;

    outline: none;

    transition: 0.3s;

    min-width: 150px;
}

.input-section input:focus {
    border-color: #3b82f6;
}

.input-section button {
    flex: 1;

    padding: 12px 20px;

    border: none;

    border-radius: 60px;

    font-weight: 700;

    font-size: 16px;

    cursor: pointer;

    transition: 0.2s;

    background: #3b82f6;

    color: #fff;

    min-width: 80px;
}

.input-section button:hover {
    transform: scale(1.02);
}

.input-section .btn-danger {
    background: #ef4444;
}

.input-section .btn-danger:hover {
    background: #dc2626;
}

.input-section .btn-sample {
    background: #8b5cf6;
}

.input-section .btn-sample:hover {
    background: #7c3aed;
}

.names-list {
    display: flex;
    flex-wrap: wrap;

    justify-content: center;

    gap: 10px;

    padding: 15px 0;

    min-height: 60px;

    border-top: 2px dashed #e2e8f0;

    border-bottom: 2px dashed #e2e8f0;

    margin-bottom: 20px;
}

.name-tag {
    background: #f1f5f9;

    padding: 6px 16px 6px 12px;

    border-radius: 30px;

    display: flex;
    align-items: center;

    gap: 8px;

    font-size: 15px;
    font-weight: 500;

    box-shadow:
        0 2px 4px
        rgba(0, 0, 0, 0.05);
}

.name-tag .del {
    cursor: pointer;

    color: #ef4444;

    font-weight: 700;

    font-size: 18px;

    line-height: 1;

    transition: 0.2s;
}

.name-tag .del:hover {
    transform: scale(1.3);
}

.wheel-wrapper {
    position: relative;

    display: inline-block;

    margin: 10px 0 15px;
}

#wheelCanvas {
    border-radius: 50%;

    box-shadow:
        0 8px 30px
        rgba(0, 0, 0, 0.3);

    display: block;

    max-width: 100%;

    height: auto;

    background: #f8fafc;
}

.pointer {
    position: absolute;

    top: -18px;

    left: 50%;

    transform: translateX(-50%);

    font-size: 48px;

    filter:
        drop-shadow(
            0 6px 12px
            rgba(0, 0, 0, 0.4)
        );

    z-index: 10;

    line-height: 1;

    pointer-events: none;
}

.action-buttons {
    display: flex;

    gap: 15px;

    justify-content: center;

    flex-wrap: wrap;

    margin: 15px 0 20px;
}

.action-buttons button {
    padding: 14px 45px;

    border: none;

    border-radius: 60px;

    font-size: 20px;

    font-weight: 700;

    cursor: pointer;

    transition: 0.3s;

    box-shadow:
        0 6px 14px
        rgba(0, 0, 0, 0.1);
}

#spinBtn {
    background: #22c55e;
    color: #fff;
}

#spinBtn:hover:not(:disabled) {
    background: #16a34a;
    transform: scale(1.05);
}

#spinBtn:disabled {
    opacity: 0.5;

    cursor: not-allowed;

    transform: none;
}

#resetBtn {
    background: #e2e8f0;
    color: #1e293b;
}

#resetBtn:hover {
    background: #cbd5e1;
}

.result-box {
    background: #f8fafc;

    border-radius: 30px;

    padding: 18px;

    margin-top: 10px;

    border: 3px solid #e2e8f0;

    transition: 0.4s;

    min-height: 80px;

    display: flex;

    align-items: center;

    justify-content: center;
}

.result-box.winner {
    border-color: #facc15;

    background: #fef9e7;

    box-shadow:
        0 0 30px
        rgba(250, 204, 21, 0.3);
}

.result-text {
    font-size: 28px;

    font-weight: 800;

    color: #0f172a;
}

.result-text .highlight {
    color: #dc2626;

    font-size: 36px;
}

.confetti-container {
    position: fixed;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    pointer-events: none;

    overflow: hidden;

    z-index: 9999;
}

.confetti {
    position: absolute;

    width: 12px;
    height: 12px;

    border-radius: 4px;

    animation:
        confettiFall
        linear
        forwards;
}

@keyframes confettiFall {
    0% {
        opacity: 1;

        transform:
            translateY(-20px)
            rotate(0deg);
    }

    100% {
        opacity: 0;

        transform:
            translateY(100vh)
            rotate(720deg);
    }
}

.footer {
    margin-top: 30px;

    padding-top: 18px;

    border-top:
        2px solid #e2e8f0;

    text-align: center;

    color: #64748b;

    font-size: 16px;
}

.footer .footer-name {
    color: #3b82f6;

    font-weight: 700;

    font-size: 18px;

    letter-spacing: 0.5px;
}

@media (max-width: 550px) {

    .container {
        padding: 20px 15px;
    }

    h1 {
        font-size: 24px;
    }

    .pointer {
        font-size: 32px;
        top: -12px;
    }

    .action-buttons button {
        padding: 12px 25px;
        font-size: 17px;
    }

    .result-text {
        font-size: 22px;
    }
}