:root {
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: rgba(0, 0, 0, 0.1);
    --primary-color: #a788ff;
    --secondary-color: #64c5eb;
    --accent-color: #ff7eb6;
    --text-color: #f8f9fc;
    --dark-text: #2a2e43;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #7C94A6, #9FB6C6, #4B7286);
    background: linear-gradient(135deg, #1C2A35, #2C3E4E, #0F1C26);
    /* background: linear-gradient(135deg, #283442, #3A4754, #1A2530); */
    /* background: linear-gradient(135deg, #2F3B47, #445563, #1E2832); */
    background-attachment: fixed;
    color: var(--text-color);
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 10px;
}

h1,
h2 {
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

h1 {
    font-size: 2rem;
    background: #f8f9fc;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-top: 10px;
}

h2 {
    font-size: 1.5rem;
    margin-top: 25px;
}

/* Glassmorphism Card Styling */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px var(--glass-shadow);
    padding: 20px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.2) 0%,
            rgba(255, 255, 255, 0) 50%,
            rgba(255, 255, 255, 0) 100%);
    border-radius: inherit;
    pointer-events: none;
}

/* Wheel Styling */
.wheel-container {
    position: relative;
    width: 100%;
    max-width: 320px;
    height: 320px;
    margin: 30px auto;
}

@media (min-width: 500px) {
    .wheel-container {
        max-width: 400px;
        height: 400px;
    }
}

.wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    transition: transform 5s cubic-bezier(0.1, 0.7, 0.1, 1);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0);
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 4px solid #fff;
    overflow: hidden;
}

.wheel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.2) 0%,
            rgba(255, 255, 255, 0) 50%,
            rgba(255, 255, 255, 0) 100%);
    border-radius: inherit;
    pointer-events: none;
}

.section-label {
    position: absolute;
    color: white;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    max-width: 100px;
    text-align: center;
    transform: translate(-50%, -50%);
    word-break: break-word;
    font-size: 0.8rem;
}

@media (min-width: 500px) {
    .section-label {
        font-size: 1rem;
    }
}

.pointer-container {
    position: absolute;
    top: 0px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.3));
    width: 30px;
    height: 40px;
}

.pointer {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    overflow: visible;
}

.pointer-svg {
    width: 100%;
    height: 100%;
}

/* Controls Styling */
.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.input-group {
    display: flex;
    width: 100%;
    max-width: 500px;
    gap: 10px;
    margin-bottom: 5px;
}

input[type="text"] {
    flex: 1;
    padding: 12px 15px;
    border: none;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50px;
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
    border: 1px solid var(--glass-border);
}

input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

input[type="text"]:focus {
    box-shadow: 0 0 10px var(--primary-color);
    border-color: var(--primary-color);
}

.button-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 5px;
    width: 100%;
}

button {
    padding: 12px 20px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    color: white;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

button i {
    margin-right: 8px;
    font-size: 0.9rem;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-add {
    background: linear-gradient(45deg, #00b09b, #96c93d);
}

.btn-spin {
    background: linear-gradient(45deg, #a166ff, #6a11cb);
}

.btn-reset {
    background: linear-gradient(45deg, #ff9966, #ff5e62);
}

.btn-clear {
    background: linear-gradient(45deg, #fc5c7d, #6a82fb);
}

/* Lists Styling */
.section-list,
.results {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    max-height: 250px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.section-list::-webkit-scrollbar,
.results::-webkit-scrollbar {
    width: 6px;
}

.section-list::-webkit-scrollbar-thumb,
.results::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 6px;
}

.section-item,
.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin: 8px 0;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s;
}

.section-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.color-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.section-text {
    flex: 1;
    text-align: left;
    padding-left: 15px;
    font-weight: 500;
}

.delete-btn {
    background: rgba(255, 87, 87, 0.7);
    padding: 5px;
    width: 26px;
    height: 26px;
    min-width: unset;
    font-size: 0.7rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-btn:hover {
    background: rgba(255, 87, 87, 1);
}

.wheel-stats {
    text-align: center;
    margin: 15px 0;
    padding: 8px 15px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 0.9rem;
    display: inline-block;
    border: 1px solid var(--glass-border);
}

.wheel-stats-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Animation for winning result */
@keyframes highlight {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }
}

.highlight-winner {
    animation: highlight 0.6s ease-in-out 3;
    background: linear-gradient(45deg, rgba(255, 215, 0, 0.3), rgba(255, 255, 255, 0.3));
    border-color: gold;
}

/* No items message */
.empty-message {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 500px) {
    h1 {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .input-group {
        flex-direction: column;
    }

    button {
        padding: 10px 15px;
        font-size: 0.85rem;
    }

    .button-container {
        flex-direction: column;
        width: 100%;
    }

    button {
        width: 100%;
    }
}

@media (min-width: 768px) {
    .content-columns {
        display: flex;
        gap: 20px;
    }

    .content-column {
        flex: 1;
    }
}

/* Confetti animation */
@keyframes confetti-fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: #f00;
    top: -20px;
    will-change: transform;
    animation: confetti-fall 3s ease-in-out infinite;
}