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

body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Assistant', 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    cursor: pointer;
    user-select: none;
}

#slot-machine {
    display: flex;
    gap: 0;
    width: 100vw;
    height: 100vh;
    padding: 0;
    justify-content: center;
    align-items: stretch;
    background: #0a0a0a;
}

.reel-container {
    flex: 1;
    height: 100vh;
    /* רקע גליל - צבע קבוע עם אפקט תלת-ממד */
    background:
        linear-gradient(90deg,
            rgba(0, 0, 0, 0.4) 0%,
            rgba(0, 0, 0, 0) 5%,
            rgba(0, 0, 0, 0) 95%,
            rgba(0, 0, 0, 0.4) 100%
        ),
        linear-gradient(180deg,
            #3a3f5c 0%,
            #2d3250 15%,
            #252a42 50%,
            #2d3250 85%,
            #3a3f5c 100%
        );
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    position: relative;
    /* פס הפרדה שחור בין הגלילים */
    border-left: 3px solid #000000;
    border-right: 3px solid #000000;
    /* אפקט עומק תלת-ממדי */
    box-shadow:
        inset 6px 0 12px rgba(0, 0, 0, 0.6),
        inset -6px 0 12px rgba(0, 0, 0, 0.6),
        inset 0 6px 12px rgba(0, 0, 0, 0.4),
        inset 0 -6px 12px rgba(0, 0, 0, 0.4);
}

/* הגליל הראשון - ללא border שמאלי */
.reel-container:first-child {
    border-left: none;
}

/* הגליל האחרון - ללא border ימני */
.reel-container:last-child {
    border-right: none;
}

/* קווי הבהוב בצדדים */
.reel-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background:
        linear-gradient(90deg,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 2%,
            transparent 98%,
            rgba(255, 255, 255, 0.1) 100%
        );
    pointer-events: none;
    z-index: 5;
}

.reel {
    position: absolute;
    width: 100%;
    top: 0;
    display: flex;
    flex-direction: column;
    will-change: transform;
}

.symbol {
    height: 33.333333vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: clamp(60px, 12vmin, 200px);
    /* רקע שקוף - הסמלים יושבים על הגליל */
    background: transparent;
    /* קו הפרדה עדין בין סמלים */
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    text-shadow:
        0 0 20px rgba(255, 215, 0, 0.6),
        0 0 40px rgba(255, 215, 0, 0.4),
        0 0 60px rgba(255, 215, 0, 0.2),
        2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* רספונסיבי למובייל - text-shadow מופחת לביצועים */
@media (max-width: 768px) {
    .symbol {
        font-size: clamp(40px, 15vw, 120px);
        text-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
    }
}

@media (max-width: 480px) {
    .symbol {
        font-size: clamp(30px, 18vw, 100px);
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    }
}

.symbol.custom-image {
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    font-size: 0;
    padding: 5%;
}

/* אנימציית סיבוב - מהירות מלאה מהתחלה + GPU acceleration */
@keyframes spin {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(0, -300vh, 0);
    }
}

/* הוסף האצת GPU לגלילים */
.reel {
    will-change: transform;
    transform: translateZ(0);
}

.reel.spinning {
    animation: spin 0.8s linear infinite;
    /* מהירות קבועה וחזקה - כולם מסתובבים באותו קצב מלא */
}

/* אפקט תנועה - opacity בלבד (ביצועים טובים במובייל) */
.reel.spinning .symbol {
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.reel:not(.spinning) .symbol {
    opacity: 1;
    transition: opacity 0.4s ease;
}

/* אפקט מיוחד לגלילים בזמן סיבוב */
.reel.spinning::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        transparent 20%,
        transparent 80%,
        rgba(0, 0, 0, 0.1) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* אפקט זכיה */
#win-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 215, 0, 0.3);
    pointer-events: none;
    z-index: 100;
}

#win-overlay.flashing {
    animation: flash 0.3s ease-in-out 5;
}

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

.hidden {
    display: none !important;
}

/* Scrolling Banner - פס מתגלגל למטה */
.scrolling-banner {
    position: fixed;
    bottom: 10px;
    left: 0;
    width: 100vw;
    height: 60px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    overflow: hidden;
    z-index: 999;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ביטול backdrop-filter במובייל לביצועים */
@media (max-width: 768px) {
    .scrolling-banner {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(0, 0, 0, 0.8);
    }
}

.scrolling-text {
    display: inline-block;
    white-space: nowrap;
    color: #ffffff;
    font-size: 32px;
    font-weight: 700;
    font-family: 'Assistant', sans-serif;
    animation: scroll-rtl 180s linear infinite;  /* האטה ל-180 שניות (3 דקות) */
    will-change: transform;
}

@keyframes scroll-rtl {
    from {
        transform: translateX(0);  /* התחל מהמיקום הרגיל (נראה במסך) */
    }
    to {
        transform: translateX(100%);  /* גלול ימינה ונעלם */
    }
}

/* עבור LTR (שמאל לימין) */
.scrolling-text.ltr {
    animation: scroll-ltr 20s linear infinite;
    padding-left: 100%;
    padding-right: 0;
}

@keyframes scroll-ltr {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@media (max-width: 768px) {
    .scrolling-banner {
        height: 40px;
    }

    .scrolling-text {
        font-size: 1.2em;
        line-height: 40px;
    }
}

/* מסך הגדרות */
#settings-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* כפתור X הוסר - סגירה דרך קיצור מקלדת בלבד */

.settings-content {
    background: #0f0f1a;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 1400px;
    width: 80%;
    max-height: 90vh;
    overflow: hidden;
    color: white;
    box-sizing: border-box;
    font-family: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: flex;
    flex-direction: column;
}

/* Settings Scrollable Content - תוכן הניתן לגלילה */
.settings-scrollable-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 32px;
}

/* סקרולבר מעוצב */
.settings-scrollable-content::-webkit-scrollbar {
    width: 8px;
}

.settings-scrollable-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.settings-scrollable-content::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.5);
    border-radius: 10px;
}

.settings-scrollable-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.7);
}

/* רספונסיבי להגדרות */
@media (max-width: 768px) {
    .settings-content {
        padding: 30px 20px;
        max-height: 85vh;
    }

    .settings-content h2 {
        font-size: 2em;
    }

    .setting-group h3 {
        font-size: 1.3em;
    }

    .setting-group label {
        font-size: 1em;
    }

    .settings-row {
        flex-direction: column;
        gap: 20px;
    }

    .setting-group.third,
    .setting-group.two-thirds {
        flex: 1 1 100%;
    }

    .settings-divider {
        margin: 25px 0;
    }
}

/* Settings Title Row */
.settings-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 20px;
}

.settings-content h2 {
    text-align: center;
    font-size: 32px;
    margin: 0;
    color: #ffd700;
    font-family: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
}

/* Settings Close Button - Yellow X in title row */
.settings-close-btn {
    position: absolute;
    left: 0;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    color: #ffd700;
    transition: all 0.2s ease;
}

.settings-close-btn:hover {
    color: #ffdb4d;
    transform: scale(1.1);
}

/* Setting Icons - Lucide */
.setting-icon {
    width: 18px;
    height: 18px;
    margin-left: 8px;
    vertical-align: middle;
    opacity: 0.9;
}

/* Settings Header Divider */
.settings-header-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.5), transparent);
    margin-bottom: 32px;
    border-radius: 1px;
}

/* Event Name Badge in Footer */
.event-name-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border: 1px solid rgba(102, 126, 234, 0.4);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    color: #667eea;
    font-family: 'Assistant', sans-serif;
    font-weight: 600;
    white-space: nowrap;
}

/* Divider בין קבוצות הגדרות */
.settings-divider {
    height: 1px;
    background: rgba(255, 215, 0, 0.2);
    margin: 32px 0;
}

/* שורת הגדרות - 2 הגדרות זו ליד זו */
.settings-row {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.settings-row .setting-group {
    margin-bottom: 0;
}

.setting-group {
    margin-bottom: 24px;
}

.setting-group.half {
    flex: 1;
    min-width: 0;
}

.setting-group.third {
    flex: 0 0 30%;
    min-width: 0;
    padding-right: 25px;
    position: relative;
}

.setting-group.third:not(:first-child) {
    padding-left: 15px;
}

.setting-group.third:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(
        to bottom,
        rgba(255, 215, 0, 0) 0%,
        rgba(255, 215, 0, 0.3) 20%,
        rgba(255, 215, 0, 0.5) 50%,
        rgba(255, 215, 0, 0.3) 80%,
        rgba(255, 215, 0, 0) 100%
    );
}

.setting-group.third:last-child {
    padding-right: 0;
}

.setting-group.two-thirds {
    flex: 0 0 68%;
    min-width: 0;
}

.setting-group h3 {
    font-size: 20px;
    margin-bottom: 16px;
    color: #ffd700;
    font-family: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
}

.setting-group label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 16px;
    cursor: pointer;
    font-family: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.setting-description {
    font-size: 16px;
    color: #ccc;
    margin-bottom: 16px;
    line-height: 1.5;
    font-family: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.setting-note {
    font-size: 16px;
    color: #ffd700;
    margin-top: 8px;
    font-family: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.slider-container input[type="range"] {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: #ffd700;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.slider-container input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: #ffd700;
    cursor: pointer;
    border-radius: 50%;
    border: none;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.slider-container span {
    font-size: 1.5em;
    font-weight: bold;
    color: #ffd700;
    min-width: 40px;
    text-align: center;
}

.setting-group input[type="radio"] {
    margin-left: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Color Picker Styles */
.color-picker-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.color-picker-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: background 0.3s ease;
}

.color-picker-label:hover {
    background: rgba(255, 255, 255, 0.08);
}

.color-picker-label span {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1em;
}

.color-preview {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    border: 2px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.color-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
}

#background-color-picker {
    width: 60px;
    height: 50px;
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
    padding: 0;
}

#background-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

#background-color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

#background-color-picker::-moz-color-swatch {
    border: none;
    border-radius: 6px;
}

#background-color-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 1em;
    font-family: 'Assistant', monospace;
    font-weight: 600;
    text-align: center;
    transition: border-color 0.3s ease, background 0.3s ease;
    box-sizing: border-box;
}

#background-color-input:focus {
    outline: none;
    border-color: #ffd700;
    background: rgba(255, 255, 255, 0.15);
}

#background-color-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.small-btn {
    padding: 12px 20px;
    font-size: 0.9em;
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Assistant', sans-serif;
    font-weight: 600;
}

.small-btn:hover {
    background: rgba(255, 215, 0, 0.3);
    border-color: #ffd700;
    transform: translateY(-2px);
}

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

@media (max-width: 480px) {
    .color-picker-container {
        gap: 10px;
    }
    
    .color-preview {
        width: 45px;
        height: 45px;
    }
    
    #background-color-picker {
        width: 50px;
        height: 45px;
    }
    
    #background-color-input {
        min-width: 100px;
        font-size: 0.9em;
        padding: 10px;
    }
    
    .small-btn {
        padding: 10px 16px;
        font-size: 0.85em;
    }
}

/* גריד העלאת תמונות - מינימליסטי */
.image-upload-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, 180px) !important;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
    justify-content: flex-start;
    align-items: start;
}

.image-upload-item {
    width: 180px !important;
    max-width: 180px !important;
    min-width: 180px !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .image-upload-grid {
        grid-template-columns: repeat(auto-fill, 160px) !important;
    }

    .image-upload-item {
        width: 160px !important;
        max-width: 160px !important;
        min-width: 160px !important;
    }
}

@media (max-width: 480px) {
    .image-upload-grid {
        grid-template-columns: repeat(auto-fill, 150px) !important;
        gap: 6px;
    }

    .image-upload-item {
        width: 150px !important;
        max-width: 150px !important;
        min-width: 150px !important;
    }
}

.image-upload-item label {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.image-upload-item label:hover {
    transform: translateY(-2px);
}

.image-upload-item label:active {
    transform: translateY(0);
}

.image-preview {
    width: 100%;
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(255, 215, 0, 0.4);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    padding: 8px;
}

.image-preview:hover {
    border-color: #ffd700;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

/* תמונה מועלית - תמיכה ברקע שקוף */
.uploaded-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 6px;
    display: block;
}

.preview-icon {
    font-size: 1.8em;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.image-preview:hover .preview-icon {
    opacity: 1;
}

.image-preview .preview-text {
    color: rgba(255, 215, 0, 0.7);
    font-size: 0.7em;
    font-weight: 500;
    text-align: center;
    pointer-events: none;
}

/* הסתר את input הקובץ */
.image-upload-item input[type="file"] {
    display: none;
}

/* שדה מלאי */
.inventory-input-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-top: 8px;
    box-sizing: border-box;
    flex-wrap: wrap;
}

.inventory-input-wrapper label {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.reset-inventory-btn {
    padding: 4px 10px;
    background: rgba(255, 70, 70, 0.8);
    color: white;
    border: none;
    border-radius: 5px;
    font-family: 'Assistant', sans-serif;
    font-size: 0.75em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-inventory-btn:hover {
    background: rgba(255, 50, 50, 1);
    transform: scale(1.05);
}

.reset-inventory-btn:active {
    transform: scale(0.95);
}

.inventory-input {
    width: 60px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 6px;
    color: #fff;
    font-size: 0.95em;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.inventory-input:focus {
    outline: none;
    border-color: rgba(255, 215, 0, 0.6);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.inventory-input:hover {
    border-color: rgba(255, 215, 0, 0.5);
}

/* קאונטר חלוקת פרסים */
.inventory-counter {
    text-align: center;
    padding: 4px 8px;
    margin-top: 4px;
    font-size: 0.8em;
    color: rgba(255, 215, 0, 0.9);
    font-weight: 600;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    direction: ltr;
}

.inventory-counter .distributed {
    color: #4ade80;
    font-weight: 700;
}

.inventory-counter .total {
    color: rgba(255, 255, 255, 0.8);
}

/* עיצוב למובייל */
@media (max-width: 768px) {
    .inventory-input-wrapper {
        padding: 6px;
        gap: 6px;
    }

    .inventory-input {
        width: 50px;
        padding: 4px 8px;
        font-size: 0.85em;
    }

    .inventory-input-wrapper label {
        font-size: 0.8em;
    }

    .inventory-counter {
        font-size: 0.75em;
        padding: 3px 6px;
    }
}

button {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #1a1a2e;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.6);
}

button:active {
    transform: translateY(0);
}

#close-settings {
    display: block;
    margin: 30px auto 0;
}

/* Images Actions Container */
.images-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Add Image Button */
.add-image-btn {
    padding: 12px 25px;
    font-size: 1em;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: 2px solid rgba(76, 175, 80, 0.6);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Assistant', sans-serif;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.add-image-btn:hover {
    background: linear-gradient(135deg, #5bc05e 0%, #4caf50 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

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

/* Reset Images Button */
.reset-images-btn {
    padding: 12px 25px;
    font-size: 1em;
    background: linear-gradient(135deg, rgba(255, 70, 70, 0.4), rgba(244, 67, 54, 0.5));
    color: white;
    border: 2px solid rgba(255, 70, 70, 0.6);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Assistant', sans-serif;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(255, 70, 70, 0.3);
}

.reset-images-btn:hover {
    background: linear-gradient(135deg, rgba(255, 70, 70, 0.6), rgba(244, 67, 54, 0.7));
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 70, 70, 0.5);
}

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

/* Remove Image Button */
.remove-image-btn {
    padding: 8px 12px;
    font-size: 0.9em;
    background: rgba(255, 70, 70, 0.3);
    color: white;
    border: 1px solid rgba(255, 70, 70, 0.5);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: auto;
    height: auto;
}

.remove-image-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

.remove-image-btn:hover {
    background: rgba(255, 70, 70, 0.6);
    transform: translateY(-2px);
}

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

/* ✅ NEW INVENTORY UI STYLES */

/* Inventory Controls Container */
.inventory-controls {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.inventory-header {
    margin: 0 0 8px 0;
    font-size: 0.9em;
    font-weight: 700;
    color: #ffd700;
    text-align: center;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 5px;
}

/* Prize Name Input Row */
.prize-name-input-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 8px;
}

.prize-name-label {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
}

.prize-name-input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(138, 43, 226, 0.4);
    border-radius: 6px;
    color: white;
    font-family: 'Assistant', sans-serif;
    font-size: 0.9em;
    font-weight: 500;
    text-align: right;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.prize-name-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85em;
}

.prize-name-input:focus {
    outline: none;
    border-color: rgba(138, 43, 226, 0.8);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 8px rgba(138, 43, 226, 0.3);
}

/* Inventory Display Row */
.inventory-display-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    gap: 8px;
    max-width: 100%;
    box-sizing: border-box;
}

.inventory-label {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.inventory-current {
    font-size: 1.1em;
    font-weight: 700;
    color: #ffd700;
}

/* Inventory Input Row */
.inventory-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
    max-width: 100%;
    box-sizing: border-box;
}

.inventory-input-new {
    flex: 1;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 6px;
    color: white;
    font-family: 'Assistant', sans-serif;
    font-size: 0.95em;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
    min-width: 0;
    box-sizing: border-box;
}

.inventory-input-new:focus {
    outline: none;
    border-color: #ffd700;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.inventory-input-new:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.inventory-input-new::placeholder {
    color: rgba(255, 215, 0, 0.5);
}

/* Unlimited Toggle Button */
.unlimited-toggle-btn {
    padding: 8px 12px;
    background: rgba(255, 215, 0, 0.2);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 6px;
    color: #ffd700;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 45px;
}

.unlimited-toggle-btn:hover {
    background: rgba(255, 215, 0, 0.3);
    border-color: #ffd700;
    transform: scale(1.05);
}

.unlimited-toggle-btn.active {
    background: rgba(255, 215, 0, 0.4);
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

/* Distributed Section */
.distributed-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 5px;
    border: 1px solid rgba(76, 175, 80, 0.3);
    gap: 8px;
    max-width: 100%;
    box-sizing: border-box;
}

.distributed-label {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.distributed-value {
    font-size: 1em;
    font-weight: 700;
    color: #4CAF50;
}

.reset-distributed-icon {
    cursor: pointer;
    color: #FF9800;
    transition: all 0.2s ease;
}

.reset-distributed-icon:hover {
    color: #FFB74D;
    transform: scale(1.2);
    filter: drop-shadow(0 0 6px rgba(255, 152, 0, 0.6));
}

.reset-distributed-icon:active {
    transform: scale(1.05);
}

/* Remove Image Button (New) */
.remove-image-btn-new {
    padding: 8px 12px;
    background: #f44336;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    min-height: 36px;
}

.remove-image-btn-new:hover {
    background: #da190b;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Add Prize Box */
.add-prize-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 150px;
    height: 150px;
    max-width: 150px;
    background: rgba(255, 255, 255, 0.03);
    border: 3px dashed rgba(76, 175, 80, 0.5);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 15px;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .add-prize-box {
        width: 140px;
        height: 140px;
        max-width: 140px;
    }
}

.add-prize-box:hover {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.3);
    transform: translateY(-3px);
}

.add-prize-icon {
    font-size: 2.5em;
    color: #4CAF50;
    font-weight: 300;
    line-height: 1;
    margin-bottom: 8px;
}

.add-prize-text {
    color: rgba(76, 175, 80, 0.8);
    font-size: 0.7em;
    font-weight: 600;
    text-align: center;
    margin: 0;
    line-height: 1.3;
}

/* Global Prizes Toggle Container */
.prizes-toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    margin-top: 20px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.toggle-label {
    font-size: 1em;
    font-weight: 600;
    color: white;
}

.toggle-status {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.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: rgba(255, 70, 70, 0.5);
    transition: 0.4s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #4CAF50;
}

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

.toggle-slider:hover {
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Tutorial Modal Styles */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(20px) saturate(180%);
}

/* ביטול backdrop-filter במובייל */
@media (max-width: 768px) {
    .tutorial-overlay {
        backdrop-filter: none;
        background: rgba(0, 0, 0, 0.97);
    }
}

.tutorial-content {
    background: #0a0a0a;
    background-image:
        linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        linear-gradient(135deg, #0a0a0a 0%, #151515 100%);
    padding: 45px;
    border-radius: 25px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.9),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.7);
    animation: slideIn 0.5s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.tutorial-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
    pointer-events: none;
}

.tutorial-content h2 {
    color: #ffd700;
    text-align: center;
    margin-bottom: 15px;
    font-size: 32px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-family: 'Assistant', sans-serif;
    font-weight: 700;
}

.tutorial-intro {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    margin-bottom: 35px;
    font-family: 'Assistant', sans-serif;
}

/* Tutorial Features Grid */
.tutorial-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.tutorial-feature {
    background: rgba(0, 0, 0, 0.5);
    padding: 25px 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    text-align: center;
    transition: all 0.3s ease;
}

.tutorial-feature:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 215, 0, 0.5);
    background: rgba(0, 0, 0, 0.7);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.2);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.3));
}

.tutorial-feature h4 {
    color: #ffd700;
    font-size: 18px;
    margin-bottom: 10px;
    font-family: 'Assistant', sans-serif;
    font-weight: 600;
}

.tutorial-feature p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.5;
    font-family: 'Assistant', sans-serif;
    margin: 0;
}

/* Tutorial Steps */
.tutorial-steps {
    display: grid;
    gap: 15px;
}

.tutorial-step {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 215, 0, 0.05);
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
    color: #0a0a0a;
    border-radius: 50%;
    font-size: 20px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.tutorial-step p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
    font-family: 'Assistant', sans-serif;
}

.tutorial-step strong {
    color: #ffd700;
    font-weight: 600;
}

.tutorial-section {
    margin-bottom: 25px;
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

/* ביטול backdrop-filter במובייל */
@media (max-width: 768px) {
    .tutorial-section {
        backdrop-filter: none;
        background: rgba(0, 0, 0, 0.7);
    }
}

.tutorial-section h3 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 22px;
    font-family: 'Assistant', sans-serif;
    font-weight: 600;
}

.tutorial-section ul {
    list-style: none;
    padding: 0;
}

.tutorial-section li {
    color: #fff;
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.6;
    font-family: 'Assistant', sans-serif;
    font-weight: 400;
}

.tutorial-section strong {
    color: #ffd700;
    font-weight: 600;
}

#tutorial-close {
    display: block;
    margin: 35px auto 0;
    padding: 18px 50px;
    background: #ffd700;
    color: #0a0a0a;
    border: none;
    border-radius: 50px;
    font-size: 20px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 8px 25px rgba(255, 215, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    font-family: 'Assistant', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#tutorial-close:hover {
    transform: translateY(-3px);
    box-shadow:
        0 12px 35px rgba(255, 215, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    background: #ffdb4d;
}

/* Powered by Playzone */
.powered-by {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Assistant', sans-serif;
}

.powered-by span {
    margin-left: 5px;
}

.powered-by a {
    color: #ffd700;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    margin-right: 5px;
}

.powered-by a:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

/* Tutorial Powered by Playzone */
.tutorial-powered-by {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.3);
    font-family: 'Assistant', sans-serif;
    letter-spacing: 0.5px;
}

.tutorial-powered-by span {
    margin-left: 5px;
    text-transform: uppercase;
    font-size: 11px;
}

.tutorial-powered-by a {
    color: #ffd700;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    margin-right: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tutorial-powered-by a:hover {
    color: #fff;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* רספונסיבי למסך הדרכה - טאבלט */
@media (max-width: 768px) {
    .tutorial-content {
        padding: 35px 25px;
        max-width: 90%;
        width: 90%;
    }

    .tutorial-content h2 {
        font-size: 26px;
        margin-bottom: 15px;
    }

    .tutorial-intro {
        font-size: 14px;
        margin-bottom: 25px;
    }

    .tutorial-features-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
        margin-bottom: 25px;
    }

    .tutorial-feature {
        padding: 20px 15px;
    }

    .feature-icon {
        font-size: 35px;
        margin-bottom: 12px;
    }

    .tutorial-feature h4 {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .tutorial-feature p {
        font-size: 13px;
    }

    .tutorial-step {
        padding: 12px 15px;
        gap: 12px;
    }

    .step-num {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    .tutorial-step p {
        font-size: 14px;
    }

    .tutorial-section {
        padding: 18px;
        margin-bottom: 20px;
    }

    .tutorial-section h3 {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .tutorial-section li {
        font-size: 15px;
        line-height: 1.5;
        margin-bottom: 8px;
    }

    .tutorial-buttons {
        gap: 10px;
        margin-top: 25px;
    }

    .tutorial-buttons button {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* רספונסיבי למסך הדרכה - מובייל */
@media (max-width: 480px) {
    .tutorial-content {
        padding: 25px 18px;
        max-width: 95%;
        width: 95%;
        max-height: 88vh;
        overflow-y: auto;
    }

    .tutorial-content h2 {
        font-size: 22px;
        margin-bottom: 12px;
        line-height: 1.3;
    }

    .tutorial-intro {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .tutorial-features-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 20px;
    }

    .tutorial-feature {
        padding: 18px 15px;
    }

    .feature-icon {
        font-size: 32px;
        margin-bottom: 10px;
    }

    .tutorial-feature h4 {
        font-size: 15px;
        margin-bottom: 6px;
    }

    .tutorial-feature p {
        font-size: 12px;
    }

    .tutorial-step {
        padding: 10px 12px;
        gap: 10px;
    }

    .step-num {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .tutorial-step p {
        font-size: 13px;
    }

    .tutorial-section {
        padding: 15px;
        margin-bottom: 15px;
    }

    .tutorial-section h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .tutorial-section li {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 8px;
    }

    .tutorial-buttons {
        gap: 8px;
        margin-top: 20px;
    }

    .tutorial-buttons button {
        padding: 12px 18px;
        font-size: 13px;
    }

    .tutorial-powered-by {
        margin-top: 25px;
        padding-top: 20px;
        font-size: 11px;
    }
}

/* רספונסיבי למסך הדרכה - מובייל קטן מאוד */
@media (max-width: 360px) {
    .tutorial-content {
        padding: 20px 15px;
        max-height: 90vh;
    }
    
    .tutorial-content h2 {
        font-size: 20px;
        margin-bottom: 18px;
    }
    
    .tutorial-section {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .tutorial-section h3 {
        font-size: 16px;
    }
    
    .tutorial-section li {
        font-size: 13px;
    }
    
    #tutorial-close {
        padding: 12px 30px;
        font-size: 15px;
    }
}

/* Settings Button */
.settings-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
    border: none;
    font-size: 30px;
    cursor: pointer;
    box-shadow:
        0 5px 20px rgba(255, 215, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-btn:hover {
    transform: scale(1.1) rotate(45deg);
    box-shadow:
        0 8px 30px rgba(255, 215, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.settings-btn:active {
    transform: scale(0.95) rotate(45deg);
}

/* Checkbox Styles */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1.2em;
    margin-bottom: 20px;
    padding: 12px 15px;
    background: rgba(255, 215, 0, 0.08);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    transition: all 0.3s ease;
    width: fit-content;
}

.checkbox-label:hover {
    background: rgba(255, 215, 0, 0.12);
    border-color: rgba(255, 215, 0, 0.5);
}

.checkbox-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-left: 10px;
    cursor: pointer;
    accent-color: #ffd700;
}

.checkbox-label span {
    font-family: 'Assistant', sans-serif;
    font-weight: 600;
    color: #ffd700;
}

/* Tutorial Buttons Container */
.tutorial-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 35px;
}

.tutorial-buttons button {
    padding: 14px 25px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Assistant', sans-serif;
    border: none;
}

#tutorial-close {
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
    color: #0a0a0a;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

#tutorial-close:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 215, 0, 0.5);
}

#tutorial-settings {
    background: transparent;
    color: #ffd700;
    border: 2px solid #ffd700;
}

#tutorial-settings:hover {
    background: rgba(255, 215, 0, 0.1);
    border-color: #ffdb4d;
    transform: translateY(-3px);
}

#tutorial-dashboard {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

#tutorial-dashboard:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

/* Sound Upload Styles - Grid Layout */
.sound-uploads-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.sound-upload-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
}

.sound-upload-item:hover {
    border-color: rgba(255, 215, 0, 0.5);
    background: rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.sound-label {
    display: block;
    font-size: 1em;
    color: #ffd700;
    font-family: 'Assistant', sans-serif;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}

.sound-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.sound-upload-item input[type="file"] {
    flex: 1;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    font-family: 'Assistant', sans-serif;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sound-upload-item input[type="file"]:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 215, 0, 0.4);
}

.sound-upload-item input[type="file"]::file-selector-button {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 4px;
    color: #ffd700;
    padding: 4px 10px;
    cursor: pointer;
    font-family: 'Assistant', sans-serif;
    transition: all 0.3s ease;
}

.sound-upload-item input[type="file"]::file-selector-button:hover {
    background: rgba(255, 215, 0, 0.3);
}

.reset-sound {
    padding: 8px 12px;
    background: rgba(255, 70, 70, 0.3);
    border: 1px solid rgba(255, 70, 70, 0.6);
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reset-sound:hover {
    background: rgba(255, 70, 70, 0.5);
    border-color: rgba(255, 70, 70, 0.8);
    transform: scale(1.05);
}

.reset-sound:active {
    transform: scale(0.95);
}

/* Responsive for sounds */
@media (max-width: 768px) {
    .sound-uploads-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Color Picker Styles */
.color-picker-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.color-picker-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

#color-preview {
    width: 60px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-picker-label:hover #color-preview {
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.color-picker-label span {
    color: #fff;
    font-family: 'Assistant', sans-serif;
    font-size: 0.9em;
}

#background-color-input {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: #fff;
    font-family: 'Assistant', sans-serif;
    width: 100px;
}

#reset-background-color {
    padding: 8px 15px;
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid #ffd700;
    border-radius: 5px;
    color: #ffd700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Assistant', sans-serif;
}

#reset-background-color:hover {
    background: rgba(255, 215, 0, 0.3);
    transform: scale(1.05);
}

/* Settings Sticky Footer */
.settings-sticky-footer {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
    justify-content: center;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-top: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
    z-index: 100;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Settings Buttons Container */
.settings-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

/* כפתור שמור יחיד */
.save-btn-single {
    width: 100%;
    max-width: 300px;
    padding: 18px 50px;
    border: none;
    border-radius: 12px;
    font-size: 22px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Assistant', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.4);
}

.save-btn-single:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(76, 175, 80, 0.6);
    background: linear-gradient(135deg, #5bc05e 0%, #4caf50 100%);
}

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

/* Powered by בפוטר */
.footer-powered-by {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Assistant', sans-serif;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.footer-powered-by span {
    margin-left: 5px;
    font-size: 12px;
}

.footer-powered-by a {
    color: #ffd700;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-right: 5px;
}

.footer-powered-by a:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.save-btn,
.close-btn {
    flex: 1;
    max-width: 200px;
    padding: 16px 40px;
    border: none;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Assistant', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.save-btn {
    background: #4CAF50;
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-family: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    padding: 12px 24px;
    min-height: 44px;
}

.save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: #45a049;
}

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

.close-btn {
    background: #f44336;
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-family: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    padding: 12px 24px;
    min-height: 44px;
}

.close-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background: #da190b;
}

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

/* רספונסיבי לכפתורים */
@media (max-width: 768px) {
    .save-btn-single {
        max-width: 100%;
        font-size: 20px;
        padding: 16px 40px;
    }
}

@media (max-width: 480px) {
    .save-btn-single {
        font-size: 18px;
        padding: 14px 30px;
    }

    .footer-powered-by {
        font-size: 11px;
    }

    .settings-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .save-btn,
    .close-btn {
        max-width: 100%;
        width: 100%;
        height: 55px;
        font-size: 18px;
        padding: 14px 30px;
    }
}

/* WhatsApp Number Input */
.whatsapp-input-container {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

#whatsapp-number {
    flex: 1;
    min-width: 200px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 1.1em;
    font-family: 'Assistant', monospace;
    font-weight: 600;
    text-align: center;
    direction: ltr;
    transition: border-color 0.3s ease, background 0.3s ease;
}

#whatsapp-number:focus {
    outline: none;
    border-color: #ffd700;
    background: rgba(255, 255, 255, 0.15);
}

#whatsapp-number::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#clear-whatsapp {
    padding: 12px 20px;
}

/* Custom Text Container */
.custom-text-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

#qr-custom-text {
    flex: 1;
    min-width: 300px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 1em;
    font-family: 'Assistant', sans-serif;
    font-weight: 500;
    resize: vertical;
    transition: border-color 0.3s ease, background 0.3s ease;
}

#qr-custom-text:focus {
    outline: none;
    border-color: #ffd700;
    background: rgba(255, 255, 255, 0.15);
}

#qr-custom-text::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#clear-custom-text {
    padding: 12px 20px;
    align-self: flex-start;
}

/* Win Notes Text Input (זהה לטקסט נגלל) */
#win-notes-text {
    flex: 1;
    min-width: 300px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 1em;
    font-family: 'Assistant', sans-serif;
    font-weight: 500;
    resize: vertical;
    transition: border-color 0.3s ease, background 0.3s ease;
}

#win-notes-text:focus {
    outline: none;
    border-color: #ffd700;
    background: rgba(255, 255, 255, 0.15);
}

#win-notes-text::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#clear-win-notes {
    padding: 12px 20px;
    align-self: flex-start;
}

/* Scrolling Banner Text Input */
#scrolling-banner-text {
    flex: 1;
    min-width: 300px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 1em;
    font-family: 'Assistant', sans-serif;
    font-weight: 500;
    resize: vertical;
    transition: border-color 0.3s ease, background 0.3s ease;
}

#scrolling-banner-text:focus {
    outline: none;
    border-color: #ffd700;
    background: rgba(255, 255, 255, 0.15);
}

#scrolling-banner-text::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#clear-scrolling-text {
    padding: 12px 20px;
    align-self: flex-start;
}

/* Font Size Control for Banner */
.font-size-control {
    margin-top: 15px;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.font-size-control label {
    display: block;
    font-size: 1em;
    color: #ffd700;
    font-family: 'Assistant', sans-serif;
    font-weight: 600;
    margin-bottom: 10px;
}

/* QR Code Popup */
/* Simple Win Screen Styles */
#simple-win-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0c29 50%, #302b63 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

#simple-win-popup.hidden {
    display: none;
    animation: none;
}

.simple-win-content {
    text-align: center;
    padding: 60px 40px;
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 33, 62, 0.95) 100%);
    box-shadow:
        0 0 80px rgba(255, 215, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border: 4px solid rgba(255, 215, 0, 0.6);
    transform: scale(0.5);
    animation: popIn 0.5s ease-out 0.2s forwards;
    max-width: 1400px;
    width: 90%;
}

.simple-win-title {
    font-size: 5em;
    font-weight: 900;
    color: #ffd700;
    margin: 0 0 20px 0;
    text-shadow:
        0 0 30px rgba(255, 215, 0, 0.8),
        0 0 60px rgba(255, 215, 0, 0.6),
        0 5px 15px rgba(0, 0, 0, 0.5);
    animation: pulse 2s ease-in-out infinite;
    font-family: 'Assistant', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: 2px;
}

/* Two column layout for simple win screen */
.simple-win-two-columns {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    margin: 40px 0;
    direction: rtl;
}

/* Prize image column (right side) */
.simple-prize-column {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

#simple-prize-image-container {
    max-width: 320px;
    width: 100%;
    padding: 30px;
    border-radius: 25px;
    display: inline-block; /* Ensure background is visible */
    box-sizing: border-box;
    /* Background will be set dynamically via JavaScript */
}

#simple-prize-image {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: block;
    /* Removed heavy gold border to let background color show through */
}

/* Text column (left side) */
.simple-text-column {
    flex: 1;
    text-align: center;
}

.simple-win-subtitle {
    font-size: 3.5em;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 30px 0;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.6);
    font-family: 'Assistant', sans-serif;
    line-height: 1.3;
}

#simple-prize-name {
    font-size: 3em;
    font-weight: 800;
    color: #ffd700;
    margin: 20px 0;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.7);
    font-family: 'Assistant', sans-serif;
}

.simple-win-footer {
    font-size: 1.8em;
    font-weight: 700;
    color: #ffd700;
    margin: 40px 0 20px 0;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    letter-spacing: 3px;
    font-family: 'Assistant', sans-serif;
}

.simple-win-powered-by {
    margin-top: 30px;
    font-size: 0.9em;
    color: #999;
    font-family: 'Assistant', sans-serif;
}

.simple-win-powered-by span {
    margin-left: 5px;
}

.simple-win-powered-by a {
    color: #ffd700;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.simple-win-powered-by a:hover {
    color: #fff;
}

/* Responsive adjustments for simple win screen */
@media (max-width: 768px) {
    .simple-win-content {
        width: 90%;
        padding: 40px 20px;
    }

    .simple-win-title {
        font-size: 3em;
    }

    .simple-win-two-columns {
        flex-direction: column;
        gap: 30px;
    }

    .simple-win-subtitle {
        font-size: 2em;
    }

    #simple-prize-name {
        font-size: 2em;
    }

    #simple-prize-image-container {
        max-width: 350px;
    }

    .simple-win-footer {
        font-size: 1.3em;
    }
}

/* Full Win Screen (QR Popup) */
#qr-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(10px);
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

/* ביטול backdrop-filter במובייל */
@media (max-width: 768px) {
    #qr-popup {
        backdrop-filter: none;
        background: rgba(0, 0, 0, 0.92);
    }
}

#qr-popup.hidden {
    display: none;
    animation: none;
}

.qr-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 40px;
    border-radius: 25px;
    box-shadow:
        0 0 60px rgba(255, 215, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    text-align: center;
    transform: scale(0.5);
    animation: popIn 0.5s ease-out 0.2s forwards;
    border: 3px solid rgba(255, 215, 0, 0.5);
    max-width: 900px;
    width: 70%;
    margin: 0 auto;
}

.qr-content h2 {
    color: #ffd700;
    font-size: 2.2em;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    font-family: 'Assistant', sans-serif;
    font-weight: 800;
    animation: pulse 2s ease-in-out infinite;
}

.qr-instructions {
    color: #ffd700;
    font-size: 1.3em;
    margin-bottom: 15px;
    font-family: 'Assistant', sans-serif;
    font-weight: 600;
}

.qr-steps {
    text-align: right;
    color: #fff;
    font-size: 1.2em;
    margin: 20px auto;
    max-width: 350px;
    padding: 0 20px;
    font-family: 'Assistant', sans-serif;
    font-weight: 500;
    line-height: 1.8;
}

.qr-steps li {
    margin-bottom: 10px;
    padding: 8px 15px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 10px;
    border-right: 3px solid #ffd700;
}

#qr-code-container {
    background: white;
    padding: 20px;
    border-radius: 15px;
    display: inline-block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin: 25px 0;
}

#qr-code-container canvas,
#qr-code-container img {
    display: block;
    max-width: 300px;
    width: 100%;
    height: auto;
}

.qr-continue {
    color: #ffd700;
    font-size: 1.3em;
    margin-top: 20px;
    font-family: 'Assistant', sans-serif;
    font-weight: 600;
    animation: blink 1.5s ease-in-out infinite;
}

/* Powered by Playzone in QR popup */
.qr-powered-by {
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    font-family: 'Assistant', sans-serif;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.qr-powered-by span {
    margin-left: 5px;
    font-size: 10px;
}

.qr-powered-by a {
    color: #ffd700;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-right: 5px;
    font-size: 11px;
}

.qr-powered-by a:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

/* QR Main Layout - Side by Side */
.qr-main-layout {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 30px;
    margin: 25px 0;
    direction: rtl;
}

/* QR Code Section - Right Side */
.qr-code-section {
    flex: 0 0 auto;
}

/* Steps Section - Left Side */
.qr-steps-section {
    flex: 1;
    max-width: 400px;
}

.qr-main-title {
    color: #ffd700;
    font-size: 1.4em;
    margin-bottom: 20px;
    font-family: 'Assistant', sans-serif;
    font-weight: 700;
    text-align: right;
}

/* Vertical Steps List */
.qr-steps-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qr-step-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 12px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
    direction: rtl;
}

.qr-step-item:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: rgba(255, 215, 0, 0.5);
    transform: translateX(-5px);
}

.qr-step-item p {
    flex: 1;
    font-size: 1em;
    line-height: 1.5;
    margin: 0;
    color: #fff;
    text-align: right;
    font-family: 'Assistant', sans-serif;
    font-weight: 500;
}

.step-number {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
    color: #1a1a2e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
    font-family: 'Assistant', sans-serif;
}

/* QR Custom Message - מתחת לשלבים */
.qr-custom-message {
    margin-top: 25px;
    padding: 15px 20px;
    background: rgba(255, 215, 0, 0.08);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    text-align: center;
}

.qr-custom-message p {
    color: #ffd700;
    font-size: 1.2em;
    font-family: 'Assistant', sans-serif;
    font-weight: 600;
    margin: 0;
    line-height: 1.6;
}

@keyframes arrowPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

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

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes popIn {
    0% {
        transform: scale(0.5) translateY(-100px);
        opacity: 0;
    }
    50% {
        transform: scale(1.05) translateY(0);
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Responsive for QR Popup */
@media (max-width: 768px) {
    .qr-content {
        padding: 30px 25px;
        max-width: 95%;
        width: 95%;
        border-radius: 20px;
    }

    .qr-content h2 {
        font-size: 1.8em;
    }

    /* Stack QR and steps vertically on tablets */
    .qr-main-layout {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .qr-code-section {
        order: 1;
    }

    .qr-steps-section {
        order: 2;
        max-width: 100%;
    }

    .qr-main-title {
        font-size: 1.2em;
        text-align: center;
    }

    #qr-code-container {
        padding: 15px;
    }

    #qr-code-container canvas,
    #qr-code-container img {
        max-width: 250px;
    }

    .qr-step-item {
        padding: 12px;
    }

    .qr-step-item p {
        font-size: 0.95em;
    }

    .qr-powered-by {
        margin-top: 20px;
        padding-top: 12px;
        font-size: 10px;
    }

    .qr-powered-by a {
        font-size: 10px;
    }

    .qr-powered-by span {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .qr-content {
        padding: 20px 15px;
        max-width: 98%;
        width: 98%;
        border-radius: 15px;
    }

    .qr-content h2 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }

    /* Keep vertical layout on mobile */
    .qr-main-layout {
        flex-direction: column;
        gap: 15px;
        margin: 15px 0;
    }

    .qr-main-title {
        font-size: 1.1em;
        margin-bottom: 12px;
    }

    #qr-code-container {
        padding: 10px;
        margin: 0;
    }

    #qr-code-container canvas,
    #qr-code-container img {
        max-width: 180px;
    }

    .qr-step-item {
        padding: 10px;
        gap: 12px;
    }

    .qr-step-item p {
        font-size: 0.9em;
    }

    .step-number {
        width: 30px;
        height: 30px;
        font-size: 1.1em;
    }

    .qr-custom-message {
        margin-top: 15px;
        padding: 12px 15px;
    }

    .qr-custom-message p {
        font-size: 1em;
    }

    .qr-powered-by {
        margin-top: 15px;
        padding-top: 10px;
        font-size: 9px;
    }

    .qr-powered-by a {
        font-size: 9px;
    }

    .qr-powered-by span {
        font-size: 8px;
    }
}

/* ============================================
   QR CONTAINER - TOP LEFT REMOTE CONTROL
   ============================================ */

#qr-container {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 200px;
    background: rgba(26, 26, 46, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 15px 15px 12px 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: none;
    z-index: 9999;
    font-family: 'Assistant', 'Arial', sans-serif;
    direction: rtl;
    text-align: center;
    transition: all 0.3s ease;
}

/* ביטול backdrop-filter במובייל */
@media (max-width: 768px) {
    #qr-container {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(26, 26, 46, 0.9);
    }
}

#qr-container:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    background: rgba(26, 26, 46, 0.85);
}

/* QR Display Section */
#qr-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.qr-scan-text {
    color: #ffd700;
    font-size: 1.1em;
    font-weight: 700;
    text-align: center;
    margin: 8px 0 0 0;
    text-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    font-family: 'Assistant', sans-serif;
}

#qr-code-image {
    background: white;
    padding: 8px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: block;
    width: fit-content;
    margin: 0 auto;
}

#qr-code-image img {
    display: block !important;
    width: 124px !important;
    height: 124px !important;
    margin: 0;
    filter: blur(0.3px);
    image-rendering: crisp-edges;
}

/* QR Code Loading Spinner */
.qr-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 140px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.qr-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 215, 0, 0.2);
    border-top-color: #ffd700;
    border-radius: 50%;
    animation: qr-spin 0.8s linear infinite;
}

@keyframes qr-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.qr-text {
    display: none;
}

/* Player Info Section */
#player-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: fadeIn 0.3s ease;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
    padding: 8px;
    margin: -8px;
}

#player-info:hover {
    background: rgba(255, 68, 68, 0.15);
    transform: scale(1.02);
}

#player-info:active {
    transform: scale(0.98);
    background: rgba(255, 68, 68, 0.25);
}

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

.player-name-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    border-radius: 12px;
    border: none;
}

.player-label {
    color: #aaa;
    font-size: 0.9em;
    font-weight: 500;
}

.player-name {
    color: #ffd700;
    font-size: 1.4em;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

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

/* Timer Container */
.timer-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timer-display {
    color: #fff;
    font-size: 2em;
    font-weight: 800;
    text-align: center;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.timer-progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.timer-progress {
    height: 100%;
    background: #44ff44;
    border-radius: 5px;
    transition: width 0.5s linear, background-color 0.3s ease;
    box-shadow: 0 0 10px rgba(68, 255, 68, 0.5);
}

/* Player Attempts */
.player-attempts {
    color: #aaa;
    font-size: 0.95em;
    font-weight: 500;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

/* Waiting Queue */
#waiting-queue {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.queue-title {
    color: #ffd700;
    font-size: 1em;
    font-weight: 600;
    margin-bottom: 10px;
}

.queue-player {
    color: #ccc;
    font-size: 0.95em;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 6px;
    transition: background 0.2s ease;
}

.queue-player:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #qr-container {
        width: 170px;
        padding: 12px;
        top: 15px;
        left: 15px;
    }

    #qr-code-image {
        width: 120px;
        height: 120px;
        padding: 6px;
    }

    #qr-code-image img {
        width: 108px !important;
        height: 108px !important;
    }

    .player-name {
        font-size: 1.1em;
    }

    .timer-display {
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    #qr-container {
        width: 150px;
        padding: 10px;
        top: 10px;
        left: 10px;
    }

    #qr-code-image {
        width: 100px;
        height: 100px;
        padding: 5px;
    }

    #qr-code-image img {
        width: 90px !important;
        height: 90px !important;
    }

    .player-name {
        font-size: 0.95em;
    }

    .timer-display {
        font-size: 1.3em;
    }
}

/* כפתור שיתוף שלט רחוק */
#share-controller-link-btn {
    position: relative;
    overflow: hidden;
}

#share-controller-link-btn:hover {
    background: #5a6678 !important;
    transform: scale(1.05);
}

#share-controller-link-btn:active {
    transform: scale(0.98);
}

#share-controller-link-btn svg {
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.3));
}

/* ✅ Settings Footer Buttons */
.save-btn-main:hover {
    background: #45a049 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

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

.icon-btn:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5) !important;
}

.icon-btn:active {
    transform: scale(0.95) !important;
}

.scoreboard-btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5) !important;
}

.scoreboard-btn:active {
    transform: translateY(0) !important;
}

/* ====================================
   Auth Modal - חלון התחברות
   ==================================== */

.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.auth-modal.show {
    opacity: 1;
    visibility: visible;
}

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

.auth-modal-content {
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 215, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    direction: rtl;
    text-align: center;
}

.auth-modal-content * {
    pointer-events: auto;
}

.auth-modal.show .auth-modal-content {
    transform: scale(1);
}

.auth-modal-header h2 {
    color: #ffd700;
    font-size: 2em;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.auth-modal-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1em;
    margin-bottom: 30px;
}

.auth-modal-body {
    margin: 30px 0;
}

.google-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    background: white;
    color: #1a1a2e;
    border: none;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
    pointer-events: auto;
    position: relative;
    z-index: 10;
}

.google-signin-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(255, 255, 255, 0.4);
}

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

.google-icon {
    width: 20px;
    height: 20px;
}

.auth-info {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    text-align: right;
}

.auth-info p {
    color: #ffd700;
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 1em;
}

.auth-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-info li {
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 0;
    font-size: 0.95em;
    line-height: 1.4;
}

.auth-info li::before {
    content: '✓ ';
    color: #4caf50;
    font-weight: bold;
    margin-left: 8px;
}

.auth-modal-footer {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.cancel-btn {
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    position: relative;
    z-index: 10;
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateY(-2px);
}

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

/* רספונסיבי למובייל */
@media (max-width: 768px) {
    .auth-modal-content {
        padding: 30px 20px;
        max-width: 90%;
    }

    .auth-modal-header h2 {
        font-size: 1.6em;
    }

    .google-signin-btn {
        font-size: 1em;
        padding: 14px 20px;
    }

    .auth-info {
        padding: 15px;
    }

    .auth-info p {
        font-size: 0.95em;
    }

    .auth-info li {
        font-size: 0.85em;
    }
}

/* נעילת כפתורים שדורשים התחברות */
.settings-action-btn[data-requires-auth="true"]::after {
    content: '🔒';
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 0.8em;
    opacity: 0.7;
}

/* Fade animation for inventory section */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.inventory-section-hidden {
    display: none;
    opacity: 0;
}

.inventory-section-visible {
    display: block;
    animation: fadeIn 0.3s ease-in-out forwards;
}

.inventory-section-hiding {
    animation: fadeOut 0.3s ease-in-out forwards;
}

/* Lock inventory section when not authenticated */
.inventory-section-locked {
    position: relative;
    pointer-events: none;
    opacity: 0.5;
}

.inventory-section-locked::before {
    content: '🔒 נדרשת התחברות למערכת';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #ffd700;
    padding: 20px 40px;
    border-radius: 12px;
    font-size: 1.2em;
    font-weight: 700;
    z-index: 10;
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Saving Loader Animation */
@keyframes loaderSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulseGlow {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.4)); }
    50% { filter: drop-shadow(0 0 16px rgba(255, 215, 0, 0.8)); }
}

.saving-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-in-out;
}

.saving-loader .loader-icon {
    margin-bottom: 24px;
    color: #ffd700;
}

.saving-loader .loader-icon svg {
    animation: loaderSpin 1s linear infinite, pulseGlow 1.5s ease-in-out infinite;
}

.saving-loader .loader-icon.success {
    color: #4CAF50;
}

.saving-loader .loader-icon.success svg {
    animation: none;
    filter: drop-shadow(0 0 12px rgba(76, 175, 80, 0.6));
}

.saving-loader .loader-icon.error {
    color: #f44336;
}

.saving-loader .loader-icon.error svg {
    animation: none;
    filter: drop-shadow(0 0 12px rgba(244, 67, 54, 0.6));
}

.saving-loader .loader-text {
    color: #ffd700;
    font-size: 24px;
    font-weight: 700;
    font-family: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-align: center;
    margin-top: 16px;
}

.saving-loader .loader-subtext {
    color: rgba(255, 215, 0, 0.7);
    font-size: 16px;
    font-family: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-align: center;
    margin-top: 8px;
}

/* כפתור דשבורד - עיצוב מקצועי לפי Design Guide */
.dashboard-btn-style {
    flex: 0 0 auto;
    padding: 12px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
}

.dashboard-btn-style:hover {
    background: #5568d3;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.dashboard-btn-style:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.dashboard-btn-style:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Floating Dashboard Button - Bottom Left Corner */
.floating-dashboard-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease, opacity 0.5s ease;
    opacity: 0;
}

.floating-dashboard-btn.show {
    display: flex; /* Show when class added */
    opacity: 1;
}

.floating-dashboard-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.7);
}

.floating-dashboard-btn:active {
    transform: scale(0.95);
}

.floating-dashboard-btn svg {
    color: white;
}

