:root {
    --bg-gradient: linear-gradient(135deg, #09041a, #260d4a, #110526);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.15);
    --neon-pink: #FF1A75;
    --neon-cyan: #00F0FF;
    --text-primary: #FFFFFF;
    --text-muted: #B0A8C4;
    --font-heading: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-heading);
    background: var(--bg-gradient);
    background-size: 200% 200%;
    animation: bgGradient 10s ease infinite;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

@keyframes bgGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.page-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 2rem;
}

.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    animation: fadeInDown 1s ease-out;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1rem 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.logo-container {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.spacer-container {
    flex: 1;
    display: flex;
}

.title-container {
    flex: 2;
    text-align: center;
}

.top-icon {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.6));
    animation: rotateIcon 10s linear infinite;
}

@keyframes rotateIcon {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.glow-text {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(255, 26, 117, 0.4);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.main-content {
    display: flex;
    flex-direction: row;
    gap: 3rem;
    flex: 1;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeIn 1.2s ease-out;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 45px 0 rgba(0, 0, 0, 0.5);
}

.inputs-panel {
    flex: 1;
    min-width: 300px;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.inputs-panel h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--neon-cyan);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.count-badge {
    background: var(--neon-pink);
    color: white;
    font-size: 1.2rem;
    padding: 2px 14px;
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(255, 26, 117, 0.5);
    font-weight: 800;
}

.input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

input[type="text"] {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--neon-pink);
    box-shadow: 0 0 15px rgba(255, 26, 117, 0.3);
}

.btn-small {
    padding: 10px 15px;
    font-size: 0.9rem;
    border-radius: 10px;
}

.align-center {
    justify-content: center;
}

.participant-list {
    list-style: none;
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-right: 5px;
    margin-bottom: 1rem;
}

.participant-list::-webkit-scrollbar {
    width: 6px;
}

.participant-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.participant-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.participant-list::-webkit-scrollbar-thumb:hover {
    background: var(--neon-cyan);
}

.participant-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    animation: fadeIn 0.3s ease-out;
}

.participant-item:hover {
    border-color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.05);
}

.delete-btn {
    background: transparent;
    border: none;
    color: var(--neon-pink);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, text-shadow 0.2s ease;
    padding: 0 5px;
}

.delete-btn:hover {
    transform: scale(1.3);
    text-shadow: 0 0 10px rgba(255, 26, 117, 0.8);
}

.buttons-row {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn {
    border: none;
    border-radius: 30px;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.primary-btn {
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 26, 117, 0.3);
    flex: 1;
}

.primary-btn:hover {
    box-shadow: 0 6px 25px rgba(0, 240, 255, 0.5);
    transform: scale(1.05);
}

.primary-btn:active {
    transform: scale(0.95);
}

.secondary-btn {
    background: transparent;
    border: 2px solid var(--text-muted);
    color: var(--text-muted);
}

.secondary-btn:hover {
    color: white;
    border-color: white;
}

.roulette-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    flex: 1;
    min-width: 350px;
}

.roulette-container {
    position: relative;
    width: 400px;
    height: 400px;
}

/* We create an indicator overlay */
.pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    color: #fff;
    z-index: 10;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    filter: drop-shadow(0 0 10px var(--neon-cyan));
}

#roulette-canvas {
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.1), inset 0 0 20px rgba(0, 0, 0, 0.5);
    border: 5px solid rgba(255, 255, 255, 0.2);
    /* Transition applied by JS */
}

.spin-btn {
    background: linear-gradient(135deg, #fff, #e0e0e0);
    color: #110526;
    font-size: 1.5rem;
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 800;
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
    animation: pulse 2s infinite;
}

.spin-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(255, 255, 255, 0.5);
    animation: none;
}

.spin-btn:active {
    transform: scale(0.95);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.professional-footer {
    margin-top: auto;
    padding-top: 3rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--glass-border);
    margin-top: 3rem;
}

.footer-content p {
    margin: 5px 0;
    letter-spacing: 0.5px;
}

/* Modal specific styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    text-align: center;
    max-width: 500px;
    width: 90%;
    transform: scale(1);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.hidden .modal-content {
    transform: scale(0.8);
}

.modal-content h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: white;
}

.winner-name-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 2px solid var(--neon-cyan);
    animation: glowContainer 2s infinite alternate;
}

@keyframes glowContainer {
    from {
        box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
    }

    to {
        box-shadow: 0 0 30px rgba(0, 240, 255, 0.6);
    }
}

.winner-text {
    font-size: 4rem;
    display: inline-block;
}

/* Animations container */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .main-content {
        flex-direction: column;
        gap: 2rem;
    }

    .top-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .logo-container,
    .spacer-container {
        flex: none;
        justify-content: center;
    }

    .spacer-container {
        display: none;
    }

    .inputs-panel {
        width: 100%;
        max-width: 100%;
    }

    .roulette-container {
        width: 300px;
        height: 300px;
    }

    #roulette-canvas {
        width: 100%;
        height: 100%;
    }

    .glow-text {
        font-size: 2.5rem;
    }
}