/* ===== CONTAINER ===== */
.lucky-wheel-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
    background-size: cover;
    background-position: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== MAIN LAYOUT ===== */
.lucky-wheel-main-layout {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 600px;
    max-width: 1600px;
    margin: 0 auto;
}

.lucky-wheel-left-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 25px;
    width: 100%;
}

/* ===== BUTTONS (Top Right) ===== */
.lucky-wheel-fullscreen-btn,
.lucky-wheel-drawer-toggle {
    position: absolute !important;
    right: 20px !important;
    width: 50px !important;
    height: 50px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.25s ease !important;
    z-index: 100 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.lucky-wheel-fullscreen-btn {
    top: 20px !important;
}

.lucky-wheel-drawer-toggle {
    top: 80px !important;
}

.lucky-wheel-fullscreen-btn:hover,
.lucky-wheel-drawer-toggle:hover {
    background: rgba(255, 255, 255, 1) !important;
    transform: scale(1.05) !important;
}

.lucky-wheel-fullscreen-btn svg,
.lucky-wheel-drawer-toggle svg {
    width: 24px !important;
    height: 24px !important;
    stroke: #333 !important;
    fill: none !important;
    display: block !important;
    pointer-events: none !important;
}

/* ===== DRAWER ===== */
.lucky-wheel-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
    z-index: 999;
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: visible !important;
    /* Allow close button outside */
    padding: 0 !important;
}

.lucky-wheel-drawer-content {
    height: 100%;
    overflow-y: auto;
    padding: 20px;
}

.lucky-wheel-drawer.open {
    right: 0;
}

.lucky-wheel-drawer-close {
    position: absolute !important;
    top: 20px !important;
    left: -40px !important;
    /* Move outside */
    right: auto !important;
    width: 40px !important;
    height: 40px !important;
    background: #fff !important;
    border: none !important;
    border-radius: 10px 0 0 10px !important;
    /* Rounded left corners */
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.25s !important;
    z-index: 1000 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.1) !important;

    /* Hide by default */
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateX(20px) !important;
}

.lucky-wheel-drawer.open .lucky-wheel-drawer-close {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) !important;
    transition-delay: 0.2s !important;
    /* Show after drawer slides out */
}

.lucky-wheel-drawer-close:hover {
    background: #6B7280 !important;
}

.lucky-wheel-drawer-close svg {
    width: 20px !important;
    height: 20px !important;
    stroke: #333 !important;
    fill: none !important;
    display: block !important;
    pointer-events: none !important;
}

.lucky-wheel-drawer-close:hover svg {
    stroke: #fff !important;
}

/* Drawer Overlay */
.lucky-wheel-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lucky-wheel-drawer-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ===== TAB SYSTEM (Inside Drawer) ===== */
.lucky-wheel-tabs {
    margin-top: 60px;
}

.tab-headers {
    display: flex;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 20px;
}

.tab-header {
    flex: 1;
    padding: 12px 14px;
    background: transparent;
    border: none;
    color: rgba(0, 0, 0, 0.6);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px;
}

.tab-header svg {
    opacity: 0.7;
    transition: opacity 0.25s;
}

.tab-header:hover {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.85);
}

.tab-header:hover svg {
    opacity: 1;
}

.tab-header.active {
    background: #667eea;
    color: #fff;
}

.tab-header.active svg {
    opacity: 1;
    stroke: #fff;
}

.tab-contents {
    min-height: 400px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fullscreen Mode */
.lucky-wheel-container.fullscreen {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    padding: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.lucky-wheel-container.fullscreen .lucky-wheel-main-layout {
    height: 100%;
    width: 100%;
}

.lucky-wheel-container.fullscreen .lucky-wheel-drawer-toggle {
    display: none;
}

.lucky-wheel-container.fullscreen .lucky-wheel-wrapper {
    transform: scale(1);
}

.lucky-wheel-container.fullscreen canvas {
    max-width: 750px;
}

.lucky-wheel-container.fullscreen .lucky-wheel-fullscreen-btn {
    position: fixed;
    top: 20px;
    right: 20px;
}

/* ===== INPUT AREA ===== */
.lucky-wheel-input-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.lucky-wheel-input-area h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--heading-color, #333);
    margin: 0 0 10px 0;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lucky-wheel-input-area textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    resize: vertical;
    flex: 1;
    transition: all 0.25s ease;
    margin-bottom: 60px;
}

.lucky-wheel-input-area textarea::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.lucky-wheel-input-area textarea:focus {
    border-color: #667eea;
    background: #fff;
    outline: none;
}

/* ===== WHEEL WRAPPER ===== */
.lucky-wheel-wrapper {
    position: relative;
    display: inline-block;
    margin-top: 10px;
}

canvas {
    display: block;
    width: 100%;
    max-width: 750px;
    height: auto;
    border-radius: 50%;
}

.lucky-wheel-arrow {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-top: 60px solid #ff0000;
    z-index: 10;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.25));
}

.lucky-wheel-spin-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff, #e8e8e8);
    border: 7px solid #ff0000;
    color: #222;
    font-weight: 800;
    font-size: 22px;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25), inset 0 -4px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.1s, box-shadow 0.1s;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lucky-wheel-spin-btn:active {
    transform: translate(-50%, -50%) scale(0.96);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.6);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(255, 0, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
    }
}

.lucky-wheel-spin-btn {
    animation: pulse-red 2s infinite;
}

/* Text "Vòng quay kết thúc" phía trên nút QUAY */
.lucky-wheel-end-message {
    position: absolute;
    top: calc(50% - 140px);
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #ff0000;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 1px;
    pointer-events: none;
    z-index: 11;
    display: none;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 24px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lucky-wheel-end-message.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Ẩn text cũ nếu còn tồn tại */
.lucky-wheel-spin-btn::before {
    display: none !important;
    content: none !important;
}

/* ===== PARTICIPANTS LIST ===== */
.lucky-wheel-participants-list {
    max-height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.lucky-wheel-participants-list h3 {
    margin: 0 0 10px 0;
    font-size: 15px;
    font-weight: 700;
    color: #333;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.items-count {
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.75);
    margin-bottom: 14px;
    padding: 10px 14px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.items-count .count-number {
    font-size: 22px;
    font-weight: 800;
    color: #667eea;
    display: inline-block;
    margin-right: 6px;
}

.participants-count {
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.75);
    margin-bottom: 14px;
    padding: 10px 14px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.participants-count .count-number {
    font-size: 22px;
    font-weight: 800;
    color: #667eea;
    display: inline-block;
    margin-right: 6px;
}

.participants-count .count-number {
    font-size: 22px;
    font-weight: 800;
    color: #667eea;
    display: inline-block;
    margin-right: 6px;
}

.participants-items {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex: 1;
    max-height: 450px;
}

.participants-items::-webkit-scrollbar {
    width: 5px;
}

.participants-items::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.participants-items::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.participants-items::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.participants-items li {
    padding: 9px 11px;
    margin-bottom: 5px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 7px;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 2px solid transparent;
}

.participants-items li:before {
    content: "•";
    font-size: 18px;
    color: #667eea;
    font-weight: bold;
    line-height: 1;
}

.participants-items li:hover {
    background: rgba(0, 0, 0, 0.08);
    border-left-color: #667eea;
    transform: translateX(2px);
}

.participants-items li.winner {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.25) 0%, rgba(245, 87, 108, 0.25) 100%);
    border-left-color: #f5576c;
    animation: winnerPulse 1s ease-in-out;
}

@keyframes winnerPulse {

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

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

/* ===== EMAIL INPUT ===== */
.lucky-wheel-email-area {
    width: 100%;
    max-width: 550px;
    margin-bottom: 10px;
}

.lucky-wheel-email-input {
    width: 100%;
    padding: 13px 18px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    transition: all 0.25s;
}

.lucky-wheel-email-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.lucky-wheel-email-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-1px);
}

/* ===== BUTTONS ===== */
.lucky-wheel-button-group {
    display: flex;
    gap: 10px;
    position: sticky;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    padding: 15px 0;
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.lucky-wheel-btn {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lucky-wheel-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.reset-participants-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.reset-participants-btn:hover {
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
}

/* ===== WINNER HISTORY ===== */
.lucky-wheel-history {
    width: 100%;
}

.lucky-wheel-history h3 {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin: 0 0 12px 0;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lucky-wheel-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 450px;
    overflow-y: auto;
}

.lucky-wheel-history-list li {
    padding: 10px 14px;
    margin-bottom: 6px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 8px;
    color: #333;
    font-size: 14px;
    border-left: 3px solid #f5576c;
}

/* ===== POPUPS ===== */
.lucky-wheel-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.lucky-wheel-popup.show {
    display: flex;
}

.lucky-wheel-popup-content {
    background: #fff;
    /* Solid white background */
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: popupBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes popupBounce {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.lucky-wheel-popup-close {
    position: absolute !important;
    top: 15px !important;
    right: 20px !important;
    font-size: 32px !important;
    color: #333 !important;
    /* Dark text for contrast */
    cursor: pointer !important;
    line-height: 1;
    transition: transform 0.2s;
}

.lucky-wheel-popup-close:hover {
    transform: rotate(90deg);
}

.lucky-wheel-popup h2 {
    color: #333;
    /* Dark heading */
    margin: 0 0 20px 0;
    font-size: 32px;
    font-weight: 800;
}

.lucky-wheel-result-text {
    color: #333;
    /* Dark result text */
    /* font-size: 24px; */
    font-weight: 500;
    margin: 0;
}

.congrats-message-text {
    color: #333;
    font-weight: 500;
    margin: 0 0 10px 0;
}

.congrats-winner-name {
    color: #333;
    font-size: 32px;
    font-weight: 800;
    margin: 10px 0;
    line-height: 1.2;
}

.lucky-wheel-rules-content {
    color: #333;
    /* Dark rules text */
    font-size: 16px;
    line-height: 1.6;
    text-align: left;
}

/* ===== RULES BUTTON ===== */
.lucky-wheel-rules-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lucky-wheel-rules-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* ===== MESSAGES (TailAdmin Style) ===== */
.lucky-wheel-message {
    padding: 18px 20px;
    border-radius: 8px;
    max-width: 420px;
    font-weight: 500;
    font-size: 14px;
    display: none;
    animation: slideInRight 0.3s ease;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid transparent;
    align-items: flex-start;
    gap: 12px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.lucky-wheel-message::before {
    content: '';
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-top: 2px;
}

.lucky-wheel-message.success {
    background: #F3FAF7;
    border-color: #10B981;
    color: #065F46;
    display: flex;
}

.lucky-wheel-message.success::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2310B981'%3E%3Cpath fill-rule='evenodd' d='M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z' clip-rule='evenodd'/%3E%3C/svg%3E");
}

.lucky-wheel-message.warning {
    background: #FFFBEB;
    border-color: #F59E0B;
    color: #92400E;
    display: flex;
}

.lucky-wheel-message.warning::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23F59E0B'%3E%3Cpath fill-rule='evenodd' d='M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z' clip-rule='evenodd'/%3E%3C/svg%3E");
}

.lucky-wheel-message.error {
    background: #FEF2F2;
    border-color: #EF4444;
    color: #991B1B;
    display: flex;
}

.lucky-wheel-message.error::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23EF4444'%3E%3Cpath fill-rule='evenodd' d='M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z' clip-rule='evenodd'/%3E%3C/svg%3E");
}

.lucky-wheel-message-content {
    flex: 1;
    line-height: 1.5;
}

/* ===== SETTINGS TAB ===== */
.lucky-wheel-settings {
    width: 100%;
    padding: 10px 0;
    text-align: left;
}

.lucky-wheel-settings h3 {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px 0;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.setting-item {
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    text-align: left;
}

.setting-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    cursor: pointer;
    text-align: left;
}

.setting-label span {
    flex: 1;
    text-align: left;
}

.setting-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.setting-description {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.6);
    line-height: 1.5;
    text-align: left;
}

.setting-input {
    width: 100%;
    padding: 8px 16px;
    border: 1.5px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.25s ease;
    margin-top: 8px;
    text-align: left;
}

.setting-input:focus {
    border-color: #667eea;
    background: #fff;
    outline: none;
}

.sound-select {
    margin-bottom: 8px;
    cursor: pointer;
    padding-right: 35px !important;
    /* Space for dropdown arrow */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.sound-select option {
    padding: 8px 12px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.sound-select:hover {
    border-color: rgba(102, 126, 234, 0.5);
}

.toggle-upload-link,
.toggle-select-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
    transition: all 0.2s ease;
}

.toggle-upload-link:hover,
.toggle-select-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.file-upload-wrapper {
    margin-top: 10px;
    text-align: left;
}

.file-input {
    display: none;
}

.file-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.file-upload-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.file-upload-btn svg {
    width: 14px;
    height: 14px;
}

.file-name {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.6);
    font-style: italic;
    word-break: break-all;
}

.save-settings-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    margin-top: 10px;
}

.save-settings-btn:hover {
    box-shadow: 0 5px 15px rgba(17, 153, 142, 0.4);
}

.save-settings-btn svg {
    width: 16px;
    height: 16px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .lucky-wheel-drawer {
        width: 100%;
        right: -100%;
    }

    canvas {
        max-width: 100%;
    }

    .lucky-wheel-spin-btn {
        width: 100px;
        height: 100px;
        font-size: 18px;
    }

    .lucky-wheel-arrow {
        border-left: 24px solid transparent;
        border-right: 24px solid transparent;
        border-top: 48px solid #ff0000;
    }
}

/* ===== MODE TOGGLE ===== */
.lucky-wheel-mode-toggle {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 0px 0px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mode-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #f5f5f5;
    border-radius: 8px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.mode-btn.active {
    background: var(--tab-active-color, #667eea);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* ===== ITEMS LIST ===== */
.lucky-wheel-items-list {
    margin-bottom: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.item-row {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.item-row:hover {
    border-color: var(--tab-active-color, #667eea);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.item-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    margin-right: 15px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-image .no-image {
    display: block;
    width: 24px;
    height: 24px;
    background-color: #ccc;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline></svg>') no-repeat center;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline></svg>') no-repeat center;
}

.item-info {
    flex: 1;
    overflow: hidden;
}

.item-name {
    flex: 1;
    text-align: left;
    /* Ensure left alignment */
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
    /* Add spacing between name and button */
}

.item-actions {
    margin-left: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.edit-item-btn {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    padding: 5px;
    opacity: 0.6;
    pointer-events: auto;
}

.edit-item-btn:hover {
    opacity: 0.6 !important;
    transform: none !important;
    color: #667eea !important;
    background: none !important;
}

.edit-item-btn:hover svg,
.edit-item-btn:hover svg path {
    fill: #667eea !important;
    stroke: none !important;
}

.remove-item-btn {
    background: none;
    border: none;
    color: #ff4757;
    cursor: pointer;
    padding: 5px;
    opacity: 0.6;
    transition: all 0.2s;
}

.remove-item-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.add-item-btn {
    width: 100%;
    background: #fff;
    border: 1px dashed #ccc;
    color: #666;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.add-item-btn:hover {
    border-color: var(--tab-active-color, #667eea);
    color: var(--tab-active-color, #667eea);
    background: rgba(102, 126, 234, 0.05);
}

/* ===== ADD ITEM POPUP ===== */
.lucky-wheel-add-item-popup {
    z-index: 100001;
    /* Higher than drawer */
}

.item-image-upload-area {
    width: 100%;
    height: 150px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f9f9f9;
    overflow: hidden;
    position: relative;
}

.item-image-upload-area:hover {
    border-color: var(--tab-active-color, #667eea);
    background: #fff;
}

.item-image-preview-placeholder {
    text-align: center;
    color: #999;
}

.item-image-preview-placeholder svg {
    display: block;
    margin: 0 auto 8px;
}

.item-image-preview-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

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

.cancel-add-item-btn {
    background: #f1f2f6;
    color: #333;
}

.confirm-add-item-btn {
    background: var(--tab-active-color, #667eea);
    color: #fff;
}

.confirm-add-item-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}