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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
}

/* Menu button only (no toolbar bar) */
.menu-button-container {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    padding: 12px;
}

/* Wheels expandable menu (top-left) */
.wheels-menu-wrapper {
    position: relative;
}

.wheels-menu-btn {
    padding: 10px 20px;
    background: #000;
    border: 2px solid #fff;
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.wheels-menu-btn:hover {
    background: #222;
}

.wheels-menu-btn[aria-expanded="true"] {
    background: #111;
    border-color: #fff;
}

.wheels-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    max-height: 70vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 10px;
    z-index: 200;
    display: none;
}

.wheels-dropdown.open {
    display: block;
}

.wheels-dropdown .tabs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: none;
}

/* All items in menu: black text, black border for visibility */
.wheels-dropdown .tab-button,
.wheels-dropdown .menu-management-link {
    width: 100%;
    justify-content: space-between;
    text-align: left;
    padding: 10px 14px;
    color: #000 !important;
    border: 2px solid #000 !important;
    background: #fff;
    font-size: 0.95rem;
    font-weight: bold;
}

.wheels-dropdown .tab-button:hover,
.wheels-dropdown .menu-management-link:hover {
    background: #f0f0f0;
}

.wheels-dropdown .tab-button.active {
    background: #e0e8ff !important;
    color: #000 !important;
    border-color: #000 !important;
}

/* IT Kudos Wheel tab - green background */
.wheels-dropdown .tab-kudos {
    background: #28a745 !important;
    color: #000 !important;
    border-color: #000 !important;
}

.wheels-dropdown .tab-kudos:hover {
    background: #218838 !important;
}

.wheels-dropdown .tab-kudos.active {
    background: #1e7e34 !important;
}

/* Custom Wheel tab - yellow background */
.wheels-dropdown .tab-custom {
    background: #ffc107 !important;
    color: #000 !important;
    border-color: #000 !important;
}

.wheels-dropdown .tab-custom:hover {
    background: #e0a800 !important;
}

.wheels-dropdown .tab-custom.active {
    background: #d39e00 !important;
}

/* Management - black background, white text */
.wheels-dropdown .menu-item-management {
    background: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
}

.wheels-dropdown .menu-item-management:hover {
    background: #333 !important;
    color: #fff !important;
}

/* Custom tab color wheels: keep background color but force black text/border in menu */
.wheels-dropdown .tab-button[style*="background"] {
    color: #000 !important;
    border-color: #000 !important;
}

.tabs {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 1200px;
}

.wheels-dropdown .menu-management-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    box-sizing: border-box;
}

.tab-button {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    position: relative;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.tab-button.active {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border-color: rgba(255, 255, 255, 0.9);
}

.container {
    max-width: 1400px;
    width: 100%;
    margin: 56px auto 20px;
    text-align: center;
}

.title {
    font-size: 2.5rem;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5),
                 0 0 40px rgba(255, 255, 255, 0.3),
                 0 0 60px rgba(255, 255, 255, 0.2);
    margin-top: 24px;
    margin-bottom: 0;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.main-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    justify-content: center;
    position: relative;
}

/* Full-page background image (custom wheels) */
.page-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.page-bg.bg-tiled {
    background-size: auto;
    background-repeat: repeat;
}

/* Legacy: main-content area background (no longer used for custom wheel bg) */
.main-content-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.main-content-bg.bg-tiled {
    background-size: auto;
    background-repeat: repeat;
}

.wheel-section,
.controls-panel {
    position: relative;
    z-index: 1;
}

.wheel-section {
    flex: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    min-width: 0;
}

/* Reserved space above wheel: "X won Y" + "Next spin in" countdown (two lines) */
.spin-result-area {
    min-height: 3.5em;
    text-align: center;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 2px;
}
.spin-result-text,
.spin-countdown {
    min-height: 1.4em;
    font-size: 1.15rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}
.spin-result-text:empty,
.spin-countdown:empty {
    visibility: hidden;
}
.spin-result-text.winner-choice-prompt {
    background-color: #f0c000;
    color: #000;
    padding: 4px 12px;
    border-radius: 6px;
    text-shadow: none;
}

.wheel-section .wheel-wrapper {
    position: relative;
}

.result-display {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.95), rgba(255, 165, 0, 0.95));
    border: 4px solid #ffd700;
    border-radius: 15px;
    padding: 20px 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5),
                0 0 40px rgba(255, 215, 0, 0.6),
                inset 0 0 20px rgba(255, 255, 255, 0.3);
    min-width: 300px;
    text-align: center;
    animation: resultPulse 2s ease-in-out infinite;
}

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

.result-label {
    font-size: 1rem;
    font-weight: bold;
    color: #8b4513;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.result-text {
    font-size: 1.8rem;
    font-weight: 900;
    color: #000;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8),
                 0 0 10px rgba(255, 215, 0, 0.5);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-wrap: break-word;
}

.result-text.highlight {
    animation: resultFlash 0.5s ease-in-out infinite;
    color: #ff0000;
    font-size: 2.2rem;
}

@keyframes resultFlash {
    0%, 100% { 
        transform: scale(1);
        text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8),
                     0 0 20px rgba(255, 0, 0, 0.8);
    }
    50% { 
        transform: scale(1.1);
        text-shadow: 3px 3px 6px rgba(255, 255, 255, 1),
                     0 0 30px rgba(255, 0, 0, 1);
    }
}

/* Single wheel (single spin or consecutive multi-spin) - viewport-scaled, ~15% smaller than before */
.single-wheel-view .wheel-wrapper {
    position: relative;
    width: min(765px, 81vh, 42.5vw);
    max-width: 100%;
    aspect-ratio: 1;
    margin: 0 auto;
}

.wheel-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1;
    margin: 0 auto;
}

#wheelCanvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5),
                0 0 80px rgba(255, 215, 0, 0.4),
                inset 0 0 40px rgba(255, 255, 255, 0.2);
    background: radial-gradient(circle, #e8e8e8 0%, #c0c0c0 100%);
    transition: transform 0.1s linear;
    border: 8px solid #c0c0c0;
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #ffd700 0%, #ffed4e 50%, #ffd700 100%);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8),
                inset 0 0 10px rgba(255, 255, 255, 0.5);
    z-index: 10;
    border: 3px solid #fff;
}

.pointer {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-top: 80px solid #fff;
    filter: drop-shadow(0 5px 25px rgba(0, 0, 0, 1));
    z-index: 20;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.9);
}

.pointer::before {
    content: '';
    position: absolute;
    top: -75px;
    left: -32px;
    width: 0;
    height: 0;
    border-left: 32px solid transparent;
    border-right: 32px solid transparent;
    border-top: 60px solid #ff4444;
    z-index: 21;
}

.fireworks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.firework {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
    animation: firework-explode 1s ease-out forwards;
}

@keyframes firework-explode {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--dx, 0), var(--dy, 0)) scale(0.3);
    }
}

.flash-slice {
    animation: flash 0.5s ease-in-out infinite;
}

@keyframes flash {
    0%, 100% { opacity: 1; filter: brightness(1); }
    50% { opacity: 0.7; filter: brightness(1.5); }
}

/* Spin button row (above Spin for) */
.spin-button-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.spin-button {
    padding: 14px 28px;
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: #fff;
    background: linear-gradient(145deg, #667eea, #764ba2);
    border: 3px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    z-index: 30;
}

.spin-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 28px rgba(102, 126, 234, 0.6);
}

.spin-button:active {
    transform: scale(0.98);
}

.spin-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.controls-panel {
    flex: 1;
    min-width: 260px;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.controls-panel .panel-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.spin-for-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.spin-for-section .label-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.save-wheel-section {
    margin: 15px 0;
    text-align: center;
}

.save-btn {
    padding: 12px 30px;
    background: linear-gradient(145deg, #32CD32, #228B22);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(50, 205, 50, 0.4);
    width: 100%;
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(50, 205, 50, 0.6);
}

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

.tab-delete-btn {
    background: #ff4444;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.3s ease;
    line-height: 1;
}

.tab-delete-btn:hover {
    background: #cc0000;
    transform: scale(1.1);
}

.spin-for-label {
    font-size: 0.85rem;
    font-weight: bold;
    color: #667eea;
}

#spinForInput {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

#spinForInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

.toggle-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    margin-top: 8px;
}

.toggle-row input[type="checkbox"] {
    cursor: pointer;
}

.sound-toggle-row {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sound-label {
    font-size: 0.85rem;
    color: #333;
}

/* On/off toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 24px;
    transition: background-color 0.25s ease;
}

.toggle-slider::before {
    position: absolute;
    content: '';
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #667eea;
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.toggle-switch input:focus-visible + .toggle-slider {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.multi-spin-controls {
    margin-top: 8px;
}

.multi-spin-mode {
    margin-top: 6px;
    margin-left: 20px;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-right: 12px;
}

.radio-label input {
    cursor: pointer;
}

/* Multi-wheel grid (IT Kudos Multi-Spin) - grid columns set in JS (1–4 cols by count) */
.multi-wheel-view {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.multi-wheels-container {
    display: grid;
    gap: 12px;
    max-width: 100%;
    margin-bottom: 12px;
    flex: 1;
    min-height: 0;
}

.multi-wheel-slot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.multi-wheel-slot .wheel-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1;
    margin: 0 auto;
    min-width: 0;
}

.multi-wheel-slot .wheel-wrapper canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid #c0c0c0;
}

.multi-wheel-slot .pointer {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 24px solid #fff;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
}
.multi-wheel-slot .pointer::before {
    content: '';
    position: absolute;
    top: -22px;
    left: -10px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 18px solid #ff4444;
    z-index: 21;
}

.multi-wheel-result {
    margin-bottom: 6px;
    font-size: 0.75rem;
    text-align: center;
    min-height: 2em;
    color: #fff;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.multi-wheel-result.choose-prize {
    background-color: #f0c000;
    color: #000;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 6px;
    text-shadow: none;
    animation: multiChooseFlash 0.6s ease-in-out infinite;
}

@keyframes multiChooseFlash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.values-section h2,
.results-section h2 {
    color: #667eea;
    font-size: 1.1rem;
    margin: 0;
}

.section-header .header-with-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Info icon with tooltip */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    font-size: 10px;
    font-weight: bold;
    cursor: help;
    position: relative;
}

/* Bring info icon (and its tooltip) to front when hovered so tooltip is never behind other sections */
.info-icon:hover {
    z-index: 99999;
}

.info-icon:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: calc(100% + 8px);
    padding: 8px 12px;
    background: #333;
    color: #fff;
    font-size: 0.8rem;
    line-height: 1.35;
    white-space: normal;
    min-width: 180px;
    max-width: 260px;
    width: max-content;
    border-radius: 8px;
    z-index: 100000;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    pointer-events: none;
}

.values-section,
.results-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.values-section .section-header,
.results-section .section-header {
    margin-bottom: 10px;
}

.collapse-btn {
    background: #667eea;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 5px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.collapse-btn:hover {
    background: #764ba2;
    transform: scale(1.1);
}

.section-content {
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    overflow: visible;
    max-height: 2000px;
    opacity: 1;
}

.section-content.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    overflow: hidden;
}

.min-values-hint {
    color: #666;
    font-size: 0.75rem;
    margin-bottom: 10px;
    font-style: italic;
}

.add-value {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

#newValueInput {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

#newValueInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

.add-btn {
    padding: 8px 16px;
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

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

.values-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
    padding: 6px 0;
}

.value-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.value-item:hover {
    transform: translateX(3px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.value-text {
    flex: 1;
    font-size: 0.8rem;
    color: #333;
    font-weight: 500;
}

.value-item .remove-btn.winners-choice-locked {
    display: none;
}

.remove-btn {
    background: #ff4444;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(255, 68, 68, 0.3);
}

.remove-btn:hover {
    background: #cc0000;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.5);
}

.results-section {
    margin-top: 0;
}

.results-controls {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.sort-btn,
.copy-btn {
    padding: 6px 12px;
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.sort-btn:hover,
.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.sort-btn:active,
.copy-btn:active {
    transform: translateY(0);
}

.results-controls .sort-btn.active {
    background: linear-gradient(145deg, #764ba2, #667eea);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2);
}

.results-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 6px 0;
    margin-bottom: 10px;
}

.results-empty {
    padding: 12px;
    text-align: center;
    color: #999;
    font-size: 0.8rem;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}
.results-table thead {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    z-index: 1;
}
.results-table th {
    padding: 8px 6px;
    text-align: left;
    font-weight: 600;
}
.results-table th.sortable {
    cursor: pointer;
    user-select: none;
}
.results-table th.sortable:hover {
    background: rgba(255, 255, 255, 0.15);
}
.results-table th.sortable.active {
    background: rgba(255, 255, 255, 0.25);
}
.results-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.2s ease;
}
.results-table tbody tr:hover {
    background: #f0f4ff;
}
.results-table td {
    padding: 6px 6px;
}
.clear-results-wheel-btn {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(145deg, #c62828, #b71c1c);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(198, 40, 40, 0.3);
}
.clear-results-wheel-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(198, 40, 40, 0.4);
}

.result-item {
    display: grid;
    grid-template-columns: 1fr 1fr auto auto;
    gap: 8px;
    align-items: center;
    padding: 6px 10px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e0e8ff 100%);
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    font-size: 0.75rem;
}

.result-item:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.result-name {
    font-weight: bold;
    color: #333;
    font-size: 0.8rem;
}

.result-prize {
    color: #667eea;
    font-weight: 600;
    font-size: 0.8rem;
}

.result-date {
    color: #666;
    font-size: 0.7rem;
    white-space: nowrap;
}

.result-time {
    color: #666;
    font-size: 0.7rem;
    white-space: nowrap;
}

/* Winner's Choice message under wheel */
.winner-choice-message {
    text-align: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.9), rgba(255, 165, 0, 0.9));
    border: 2px solid #ffd700;
    border-radius: 12px;
    color: #333;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
    margin-top: 10px;
    display: none;
}

.winner-choice-message.visible {
    display: block;
}


.save-wheel-section {
    margin-top: 8px;
}

.save-wheel-section .save-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.save-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Save wheel modal (custom wheel) */
.save-wheel-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.save-wheel-modal-content {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    min-width: 320px;
}

.save-wheel-modal-content h3 {
    margin: 0 0 16px 0;
    color: #667eea;
}

.save-wheel-modal-content label {
    display: block;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.save-wheel-modal-content input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    margin-top: 4px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
}

.save-wheel-modal-content input[type="color"] {
    width: 60px;
    height: 32px;
    margin-left: 8px;
    vertical-align: middle;
    cursor: pointer;
}

.save-wheel-modal-content input[type="file"] {
    margin-top: 4px;
    font-size: 0.85rem;
}

.save-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.save-modal-actions .cancel {
    background: #888;
}

.save-modal-actions .cancel:hover {
    background: #666;
}

/* Responsive design */
@media (max-width: 968px) {
    .main-content {
        flex-direction: column;
    }
    
    .wheel-section {
        flex: 1;
    }
    
    .controls-panel {
        flex: 1;
        width: 100%;
    }
    
    .wheel-wrapper {
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .wheel-wrapper {
        max-width: 350px;
    }
    
    .spin-button {
        top: 10px;
        right: 10px;
        padding: 12px 24px;
        font-size: 1.2rem;
    }
    
    
    .controls-panel {
        padding: 20px;
    }
    
    .tabs {
        flex-direction: column;
        gap: 5px;
    }
    
    .tab-button {
        width: 100%;
        text-align: center;
    }
}