﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
}

html, body {
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* گرادیان مدرن و زیبا */
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: scroll;
    position: relative;
}

body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 0.5rem;
    transition: background 0.3s ease;
}

.container {
    width: 100%;
    max-width: 500px;
    margin: auto;
    padding: 1rem;
    transition: max-width 0.3s ease;
}

/* Support for larger wheel sizes */
@media (min-width: 768px) {
    .container {
        max-width: 600px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 700px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 800px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 900px;
    }
}

h1 {
    color: #1a1a2e; /* رنگ متن تیره‌تر و مدرن */
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.1); /* سایه متن */
}

h2 {
    color: #16213e; /* رنگ متن مدرن */
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

h3 {
    color: #0f3460; /* رنگ متن مدرن */
    margin-bottom: 0.6rem;
    font-size: 1.1rem;
}

.wheel-section {
    position: relative;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.prize-indicator {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: #e74c3c;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: translateX(-50%) scale(1);
    }

    50% {
        transform: translateX(-50%) scale(1.1);
    }

    100% {
        transform: translateX(-50%) scale(1);
    }
}

.wheel-container {
    position: relative;
    width: 100%;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
    max-width: 100%;
    margin: 0 auto;
    /* transition: all 0.3s ease; */
    display: flex;
    align-items: center;
    justify-content: center;
}

#wheelCanvas {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
    margin: 0;
    display: block;
}

.wheel-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 85px;
    height: 85px;
    transform: translate(-50%, -50%);
    z-index: 2;
    border-radius: 50%;
/*    padding: 8px;*/
    object-fit: contain;
}

.letsgo-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    margin: 2rem auto 0 auto;
    padding: 1rem 2.5rem;
    color: white;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
    letter-spacing: 1px;
    outline: none;
    text-shadow: 0 1px 0 #000;
    width: 70%;
    height: 61px;
    place-content: center;
}

    .letsgo-button i {
        font-size: 1.5rem;
    color: white;
    }

    .letsgo-button:hover {
        transform: scale(1.06) translateY(-2px);
    }

.spin-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1;
}

    .spin-button:hover {
        transform: translate(-50%, -50%) scale(1.1);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    }

    .spin-button:disabled {
        opacity: 0.7;
        cursor: not-allowed;
        transform: translate(-50%, -50%) scale(1);
    }

.prize-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem; /* اضافه کردن margin-top */
}

.prize-input-section,
.prize-list-section {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 50%, #e2e8f0 100%); /* گرادیان مدرن */
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15); /* سایه مدرن */
    border: 1px solid rgba(255, 255, 255, 0.2); /* border شفاف */
    backdrop-filter: blur(10px); /* افکت blur مدرن */
}

.section-title {
    font-size: 17px;
    color: #1e293b; /* رنگ متن مدرن */
    display: flex;
    align-items: center;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid; /* خط جداکننده با گرادیان */
    border-image: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899) 1; /* گرادیان رنگی */
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

    .section-title i {
        color: #3498db;
        margin-left: 8px;
    }

.prize-input-group {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.remaining-chances {
    background: transparent;
    padding: 0.3rem 0;
    text-align: right;
    color: #95a5a6;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.2rem;
}

    .remaining-chances i {
        color: #95a5a6;
        font-size: 0.7rem;
    }

    .remaining-chances span {
        font-weight: normal;
        color: #95a5a6;
    }

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .input-group label {
        color: #2c3e50;
        font-size: 0.9rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

        .input-group label i {
            color: #3498db;
        }

.text-input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e2e8f0; /* رنگ border مدرن */
    border-radius: 12px; /* گردی بیشتر */
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%); /* پس‌زمینه ظریف */
    color: #1e293b; /* رنگ متن مدرن */
}

    .text-input:focus {
        outline: none;
        border-color: #3b82f6; /* رنگ focus مدرن */
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1); /* سایه focus */
        background: #ffffff;
        transform: translateY(-1px); /* حرکت ظریف */
    }

.color-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .color-input-group label {
        color: #878787;
        font-size: 13px;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        text-align: center;
        justify-content: center;
    }

        .color-input-group label i {
            color: #3498db;
        }

.color-input {
    width: 100%;
    height: 40px;
    padding: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    border-radius: 9px;
}

    .color-input:hover {
        transform: scale(1.02);
        border-color: #3498db;
    }

.weight-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

    .weight-input-group label {
        color: #2c3e50;
        font-size: 0.9rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

        .weight-input-group label i {
            color: #3498db;
        }

.weight-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.weight-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: #ecf6ff;
    color: #2c3e50;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

    .weight-btn:hover {
        background: #3498db;
        color: white;
        transform: scale(1.05);
    }

.weight-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    background: #e0e0e0;
    border-radius: 3px;
    outline: none;
}

    .weight-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 20px;
        height: 20px;
        background: #3498db;
        border-radius: 50%;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
    }

.weight-value {
    font-size: 0.9rem;
    color: #2980b9;
    font-weight: 500;
    text-align: center;
}

.weight-percentage {
    font-size: 0.8rem;
    color: #7f8c8d;
    }

.prize-image-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .prize-image-group label {
        color: #2c3e50;
        font-size: 0.9rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

        .prize-image-group label i {
            color: #3498db;
        }

.prize-image-input {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 15px;
    min-height: 150px;
}

.prize-image-input:hover {
    border-color: #666;
}

.prize-image-input input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.prize-image-input i {
    font-size: 24px;
    color: #666;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.prize-image-text {
    display: block;
    color: #666;
    font-size: 14px;
    margin-top: 62px;
}

.image-preview {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    height: 100%;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.prize-image-input.has-image {
    border-style: solid;
    border-color: #4CAF50;
}

.prize-image-input.has-image i {
    display: none;
}

.prize-image-input.has-image .background-image-text {
    display: none;
}

.prize-image-input.has-image .background-image-hint {
    display: none;
}

.add-button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* گرادیان مدرن */
    color: white;
    border: none;
    border-radius: 12px; /* گردی بیشتر */
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3); /* سایه رنگی */
}

    .add-button:hover {
        background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%); /* گرادیان hover */
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4); /* سایه بیشتر */
    }

.prize-list-container {
    background: linear-gradient(145deg, #f1f5f9 0%, #e2e8f0 100%); /* پس‌زمینه مدرن */
    border-radius: 12px; /* گردی بیشتر */
    padding: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.2); /* border ظریف */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05); /* سایه داخلی */
}

.prize-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 400px;
    overflow-y: auto;
}

/* بهبود ظاهر آیتم‌های لیست */
.prize-list li {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%); /* پس‌زمینه مدرن */
    border-radius: 12px; /* گردی بیشتر */
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    border: 1px solid rgba(226, 232, 240, 0.8); /* border ظریف */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); /* سایه ظریف */
    color: #1e293b; /* رنگ متن مدرن */
}

    .prize-list li:hover {
        background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%); /* پس‌زمینه hover */
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); /* سایه بیشتر */
        border-color: #3b82f6; /* رنگ border hover */
    }

/* Responsive Adjustments */
@media (max-width: 768px) {
    .prize-colors {
        grid-template-columns: 1fr;
    }

    .prize-input-section,
    .prize-list-section {
        padding: 1rem;
        border-radius: 10px; /* بهبود border-radius برای موبایل */
    }

    .prize-list {
        max-height: 300px;
        gap: 0.6rem; /* کاهش فاصله برای موبایل */
    }
    
    .prize-list li {
        padding: 12px; /* کاهش padding برای موبایل */
        border-radius: 8px;
    }
    
    .section-title {
        font-size: 16px;
        margin-bottom: 18px;
    }
}

.preview-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem auto;
    padding: 0.8rem 1.5rem;
    background: #2c3034;
    color: #ffffff;
    border-color: rgb(0 0 0);
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

    .preview-button:hover {
        transform: translateY(-2px);
        background: rgba(52, 152, 219, 0.3);
        box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
    }

    .preview-button i {
        font-size: 1rem;
    }

    .preview-button.preview-mode {
        background: #2c3034;
        color: #ffffff;
        border-color: rgb(0 0 0);
    }

        .preview-button.preview-mode:hover {
            background: rgba(46, 204, 113, 0.3);
            box-shadow: 0 4px 12px rgba(46, 204, 113, 0.2);
        }

        .preview-button.preview-mode i {
            transform: rotate(180deg);
        }

.prize-header {
    margin-bottom: 1rem;
}

.prize-list li {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

    .prize-list li:hover {
        background: rgba(255, 255, 255, 1);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

.prize-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    margin-bottom: 8px;
    background-color: #f8f9fa;
    border: 1px solid #e2e6ea;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease-in-out;
    }

.prize-item-content {
    display: flex;
    align-items: center;
    flex-grow: 1;
    gap: 15px; /* Adjust gap as needed */
    }

.drag-handle {
    cursor: grab;
    color: #6c757d;
    font-size: 1.2em;
    margin-right: 10px;
}

.prize-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-grow: 1;
    text-align: right;
    width: 159px;
}

.prize-name {
    font-size: 14px;
    font-weight: 600; /* وزن بیشتر */
    color: #1e293b; /* رنگ متن مدرن */
    margin-bottom: 2px;
}

.prize-sub-details {
    font-size: 0.85em;
    color: #64748b; /* رنگ متن فرعی مدرن */
    white-space: nowrap;
    margin-top: 3px;
    display: flex;
    gap: 8px;
}

.prize-type-text {
    font-weight: normal;
    background: #3498db24;
    padding: 0px 6px;
    font-size: 11px;
        display: flex;
        align-items: center;
}

.prize-weight-text {
    font-weight: normal;
    font-size: 11px;
    }

.prize-count-text {
    font-weight: normal;
    font-size: 11px;
    color: #059669;
    display: block;
    margin-top: 4px;
    }

.prize-type-badge {
    font-size: 0.8rem;
    padding: 6px 12px; /* padding بیشتر */
    border-radius: 20px; /* گردی کامل */
    white-space: nowrap;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); /* پس‌زمینه مدرن */
    color: #1e40af; /* رنگ متن مدرن */
    order: 3;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1); /* سایه ظریف */
}

    .prize-type-badge.normal {
        background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
        color: #1e40af;
    }

    .prize-type-badge.empty {
        background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
        color: #64748b;
    }

    .prize-type-badge.retry {
        background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
        color: #92400e;
    }

    .prize-type-badge.general {
        background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
        color: #166534;
    }

.prize-weight {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); /* پس‌زمینه مدرن */
    padding: 8px 12px; /* padding بیشتر */
    border-radius: 12px; /* گردی بیشتر */
    min-width: 70px; /* عرض بیشتر */
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 3px;
    order: 4;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.15); /* سایه ظریف */
    border: 1px solid rgba(59, 130, 246, 0.1); /* border ظریف */
}

.prize-weight span:first-child {
    font-size: 0.9rem;
    color: #1e40af; /* رنگ متن مدرن */
    font-weight: 600;
}

.prize-percentage {
    font-size: 0.75rem;
    color: #64748b; /* رنگ متن فرعی مدرن */
}

.prize-actions {
    display: flex;
    gap: 8px;
}

.prize-actions button {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    font-size: 1.1em;
    padding: 5px;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.prize-actions button:hover {
    background-color: #e9ecef;
}

.prize-actions .delete-prize {
    color: #dc3545;
}

.edit-prize:hover {
    color: #2196F3;
    }

.delete-prize:hover {
    color: #f44336;
}

.edit-prize, .remove-prize {
    padding: 0.5rem 0.8rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.edit-prize {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.remove-prize {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

    .edit-prize:hover, .remove-prize:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

#prizeList li .prize-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    cursor: default;
}

@keyframes win {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

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

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
    overflow-y: auto;
}

    .modal.active {
        display: flex;
    }

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s ease;
    overflow: hidden;
    margin: auto;
    display: flex;
    flex-direction: column;
}

.modal.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-header {
    padding: 0.8rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: white;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

    .modal-header h3 {
        margin: 0;
        color: #2c3e50;
    }

.close-button {
    background: none;
    border: none;
    font-size: 30px;
    color: #95a5a6;
    cursor: pointer;
    padding: 0.4rem;
    transition: color 0.3s ease;
}

    .close-button:hover {
        color: #e74c3c;
    }

.modal-body {
    padding: 0.8rem;
    flex: 1;
    overflow-y: auto;
}

.input-group {
    margin-bottom: 0.8rem;
}

    .input-group label {
        display: block;
        margin-bottom: 0.4rem;
        color: #2c3e50;
        font-size: 0.9rem;
    }

.modal-footer {
    padding: 0.8rem;
    border-top: 1px solid #eee;
    text-align: left;
    flex-shrink: 0;
    background: white;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.save-button {
    width: 100%;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.9rem;
}

    .save-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    }

/* Mobile Optimizations */
@media (max-width: 480px) {
    body {
        padding: 0.3rem;
    }

    .container {
        padding: 0.8rem;
    }

    h1 {
        font-size: 1.3rem;
        margin-bottom: 0.8rem;
    }

    h2 {
        font-size: 1.1rem;
        margin-bottom: 0.6rem;
    }

    h3 {
        font-size: 1rem;
        margin-bottom: 0.4rem;
    }

    #prizeList li {
        padding: 8px;
    }

    .prize-info img {
        width: 24px;
        height: 24px;
    }

    .prize-info span {
        font-size: 13px;
    }

    .prize-weight {
        padding: 3px 6px;
        font-size: 11px;
    }

    .prize-actions button {
        width: 24px;
        height: 24px;
    }

    .modal {
        padding: 0.2rem;
        align-items: flex-start;
    }

    .modal-content {
        margin: 0.2rem;
        max-height: 95vh;
        max-width: 95%;
    }

    .modal-body {
        padding: 0.6rem;
        max-height: 60vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .input-group label {
        font-size: 0.85rem;
    }

    .save-button {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }

    .preview-button {
        width: 100%;
        margin: 0.8rem auto;
    }

    .letsgo-button {
        width: 100%;
        padding: 1rem 0.5rem;
        font-size: 1.1rem;
    }

    .wheel-logo {
        width: 90px;
        height: 90px;
        padding: 0px;
    }
    
    .prize-input-section,
    .prize-list-section {
        padding: 0.8rem;
        border-radius: 8px;
    }

    .prize-list {
        max-height: 250px; /* کاهش بیشتر ارتفاع برای موبایل کوچک */
    }
    
    .prize-list li {
        padding: 8px;
        gap: 8px;
        border-radius: 6px;
    }
    
    .section-title {
        font-size: 15px;
        margin-bottom: 15px;
        padding-bottom: 8px;
    }
}

/* Additional mobile fixes for very small screens */
@media (max-width: 360px) {
    .modal {
        padding: 0.1rem;
    }
    
    .modal-content {
        margin: 0.1rem;
        max-height: 98vh;
        max-width: 98%;
    }
    
    .modal-body {
        max-height: 70vh;
        padding: 0.5rem;
    }
    
    .modal-header {
        padding: 0.6rem;
    }
    
    .modal-footer {
        padding: 0.6rem;
    }
}

.title-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
}

.main-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.8rem;
}

.sub-title {
    font-size: 1rem;
    color: #7f8c8d;
    margin-bottom: 0;
    text-align: center;
}

.title-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.title-input {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    border: none;
    background: transparent;
    text-align: center;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

    .title-input:focus {
        outline: none;
        background: rgba(255, 255, 255, 0.9);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

.subtitle-input {
    font-size: 1rem;
    color: #7f8c8d;
    border: none;
    background: transparent;
    text-align: center;
    padding: 0.3rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

    .subtitle-input:focus {
        outline: none;
        background: rgba(255, 255, 255, 0.9);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

.theme-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

    .theme-section h3 {
        color: #2c3e50;
        margin-bottom: 1rem;
        font-size: 1.1rem;
        text-align: center;
    }

.theme-selector {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

    .theme-selector label {
        color: #2c3e50;
        font-size: 0.9rem;
        font-weight: 500;
    }

.theme-select {
    width: 100%;
    max-width: 300px;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    color: #2c3e50;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .theme-select:focus {
        outline: none;
        border-color: #3498db;
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    }

.custom-gradient {
    width: 100%;
    max-width: 300px;
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
/*    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);*/
}

.gradient-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gradient-colors {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.gradient-color {
    width: 50px;
    height: 50px;
    padding: 0;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .gradient-color:hover {
        transform: scale(1.05);
        border-color: #3498db;
    }

.gradient-type {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

    .gradient-type label {
        color: #2c3e50;
        font-size: 0.9rem;
        text-align: center;
    }

.gradient-type-select {
    width: 100%;
    max-width: 200px;
    padding: 0.6rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    color: #2c3e50;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .gradient-type-select:focus {
        outline: none;
        border-color: #3498db;
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    }

    .gradient-type-select:hover {
        border-color: #3498db;
    }

.gradient-angle {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.angle-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.angle-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    background: #e0e0e0;
    border-radius: 3px;
    outline: none;
}

    .angle-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 18px;
        height: 18px;
        background: #3498db;
        border-radius: 50%;
        cursor: pointer;
        transition: all 0.3s ease;
    }

        .angle-slider::-webkit-slider-thumb:hover {
            transform: scale(1.1);
            box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
        }

.angle-value {
    min-width: 50px;
    text-align: center;
    color: #2c3e50;
    font-size: 0.9rem;
}

/* تم‌های آماده */
body[data-theme="default"] {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%) !important;
}

body[data-theme="midnight"] {
    background: linear-gradient(135deg, #232526 0%, #414345 100%) !important;
}

body[data-theme="sunset"] {
    background: linear-gradient(135deg, #ff9966 0%, #ff5e62 100%) !important;
}

body[data-theme="ocean"] {
    background: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%) !important;
}

body[data-theme="forest"] {
    background: linear-gradient(135deg, #134E5E 0%, #71B280 100%) !important;
}

body[data-theme="lavender"] {
    background: linear-gradient(135deg, #8E2DE2 0%, #4A00E0 100%) !important;
}

body[data-theme="cherry"] {
    background: linear-gradient(135deg, #EB3349 0%, #F45C43 100%) !important;
}

body[data-theme="nordic"] {
    background: linear-gradient(135deg, #2C3E50 0%, #3498DB 100%) !important;
}

body[data-theme="sunny"] {
    background: linear-gradient(135deg, #F7971E 0%, #FFD200 100%) !important;
}

body[data-theme="mint"] {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
}

body[data-theme="royal"] {
    background: linear-gradient(135deg, #141E30 0%, #243B55 100%) !important;
}

body[data-theme="rose"] {
    background: linear-gradient(135deg, #E55D87 0%, #5FC3E4 100%) !important;
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .title-section {
        padding: 0.8rem;
    }

    .title-input {
        font-size: 1.3rem;
    }

    .subtitle-input {
        font-size: 0.9rem;
    }

    .theme-select {
        max-width: 100%;
    }

    .custom-gradient {
        padding: 0.8rem;
    }

    .gradient-colors {
        flex-direction: column;
        align-items: center;
    }

    .gradient-color {
        width: 100%;
        max-width: 200px;
    }

    .prize-section {
        padding: 1rem;
    }

    .theme-section {
        margin-top: 1.5rem;
        padding-top: 1rem;
    }
}

.winner-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.winner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 300px;
    transition: all 0.3s ease;
}

#prizeContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

#prizeContainer img {
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.button-text-control {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

    .button-text-control label {
        color: #2c3e50;
        font-size: 0.9rem;
        font-weight: 500;
    }

    .button-text-control .text-input {
        width: 100%;
        max-width: 300px;
        padding: 0.8rem;
        border: 2px solid #e0e0e0;
        border-radius: 8px;
        background: white;
        color: #2c3e50;
        font-size: 0.9rem;
        text-align: center;
        transition: all 0.3s ease;
    }

        .button-text-control .text-input:focus {
            outline: none;
            border-color: #3498db;
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
        }

        .button-text-control .text-input:hover {
            border-color: #3498db;
        }

.button-text-section {
    margin-top: 2rem;
}

.section-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.logo-section {
    margin-top: 2rem;
}

.logo-control {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

    .logo-control label {
        color: #2c3e50;
        font-size: 0.9rem;
        font-weight: 500;
    }

.logo-upload-container {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.logo-upload {
    display: none;
}

.logo-upload-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: #3498db;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

    .logo-upload-label:hover {
        background: #2980b9;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
    }

.remove-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

    .remove-logo:hover {
        background: #c0392b;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(231, 76, 60, 0.2);
    }

.logo-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #3498db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

    .logo-preview:hover {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    }

    .logo-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* Mobile Optimizations */
@media (max-width: 480px) {
    .logo-upload-container {
        flex-direction: column;
        width: 100%;
    }

    .logo-upload-label,
    .remove-logo {
        width: 100%;
        justify-content: center;
    }

    .logo-preview {
        width: 80px;
        height: 80px;
    }
}

.prize-image-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
}

.image-label {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
}

.prize-image-input {
    height: 80px;
    padding: 0.6rem;
    border: 2px dashed #e0e0e0;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

    .prize-image-input:hover {
        border-color: #3498db;
        background: rgba(52, 152, 219, 0.05);
    }


    .prize-image-input.has-image::before {
        display: none;
    }

    .prize-image-input input[type="file"] {
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        opacity: 0;
        cursor: pointer;
    }

.image-preview {
    width: 100%;
    height: 100px;
    margin-top: 10px;
    border-radius: 6px;
    overflow: hidden;
    display: none;
}

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

#prizeList li .prize-image {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: 10px;
}

@media (max-width: 480px) {
    .prize-image-group {
        width: 100%;
    }

    .prize-image-input {
        width: 100%;
        height: 60px;
    }

    .image-preview {
        height: 80px;
    }
}

#prizeName,
#editName {
    background: #f3f3f3;
    border: none;
    width: 100%;
    font-size: 15px;
    font-weight: bold;
    color: #2c3e50;
}

.title-colors {
    width: 100%;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.color-control {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

    .color-control label {
        color: #2c3e50;
        font-size: 0.9rem;
        font-weight: 500;
    }

    .color-control .color-input {
        width: 100%;
        height: 40px;
        padding: 0;
        border: 2px solid #e0e0e0;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
        background: white;
    }

        .color-control .color-input:hover {
            transform: scale(1.02);
            border-color: #3498db;
        }

        .color-control .color-input::-webkit-color-swatch-wrapper {
            padding: 0;
        }

        .color-control .color-input::-webkit-color-swatch {
            border: none;
            border-radius: 4px;
        }

/* Tab Styles */
.nav-tabs {
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    flex-direction: row-reverse;
}

    .nav-tabs .nav-link {
        color: #666;
        border: none;
        padding: 12px 24px;
        font-size: 16px;
        transition: all 0.3s ease;
        position: relative;
        text-align: right;
    }

        .nav-tabs .nav-link:hover {
            color: #333;
            background-color: #f8f9fa;
            border: none;
        }

        .nav-tabs .nav-link.active {
            color: #3498db;
            background-color: transparent;
            border: none;
            font-weight: 500;
        }

            .nav-tabs .nav-link.active::after {
                content: '';
                position: absolute;
                bottom: -2px;
                right: 0;
                width: 100%;
                height: 2px;
                background-color: #3498db;
            }

        .nav-tabs .nav-link i {
            margin-left: 8px;
            margin-right: 0;
        }

.tab-content {
    padding: 20px 0;
}

.tab-pane {
    animation: fadeIn 0.3s ease;
}

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

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

/* Form Controls */
.form-control, .form-select, .form-range {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    transition: all 0.3s ease;
}

    .form-control:focus, .form-select:focus {
        border-color: #4CAF50;
        box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
    }

    .form-range::-webkit-slider-thumb {
        background: #4CAF50;
    }

        .form-range::-webkit-slider-thumb:hover {
            background: #45a049;
        }

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

    .btn-danger:hover {
        background-color: #c82333;
        border-color: #bd2130;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
    }

/* Adjust existing container styles */
.prize-container {
    background: white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

/* Hide elements */
.hidden {
    display: none !important;
}

.prize-type-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 8px;
    white-space: nowrap;
}

    .prize-type-badge.normal {
        background-color: #e8f4f8;
        color: #2980b9;
    }

    .prize-type-badge.empty {
        background-color: #f8f9fa;
        color: #95a5a6;
    }

    .prize-type-badge.retry {
        background-color: #fff3cd;
        color: #856404;
    }

    .prize-type-badge.general {
        background-color: #d4edda;
        color: #155724;
    }

#editType {
    width: 100%;
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .weight-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .weight-slider::-webkit-slider-thumb {
        width: 18px;
        height: 18px;
    }
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.edit-icon {
    position: absolute;
    right: 10px;
    color: #666;
    font-size: 14px;
    pointer-events: none;
}

/* Hide edit icons in preview mode */
.preview-mode .input-with-icon .edit-icon {
    display: none !important;
}

.input-with-icon input {
    width: 100%;
    padding-right: 30px;
}

.background-customization {
    margin-bottom: 2rem;
    padding: 1rem;


}

.settings-section {
    background: #fafafa;
    border: 1px solid #d5d5d599;
    margin-bottom: 36px;
    padding: 30px 10px;
    border-radius: 10px;
}

    .background-customization h4 {
        color: #2c3e50;
        margin-bottom: 1rem;
        font-size: 1.2rem;
        text-align: center;
    }

#backgroundTabs {
    margin-bottom: 1.5rem;
}

    #backgroundTabs .nav-link {
        color: #666;
        border: none;
        padding: 12px 24px;
        font-size: 14px;
        transition: all 0.3s ease;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

        #backgroundTabs .nav-link:hover {
            color: #333;
            background-color: #f8f9fa;
            border: none;
        }

        #backgroundTabs .nav-link.active {
            color: #4CAF50;
            background-color: transparent;
            border: none;
            font-weight: 500;
        }

            #backgroundTabs .nav-link.active::after {
                content: '';
                position: absolute;
                bottom: -2px;
                left: 0;
                width: 100%;
                height: 2px;
                background-color: #4CAF50;
            }

#backgroundTabsContent {
    padding: 1rem 0;
}

    #backgroundTabsContent .tab-pane {
        animation: fadeIn 0.3s ease;
    }

.background-image-control,
.theme-select {
    margin-bottom: 1.5rem;
}

.background-upload-container {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.background-image-input {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 15px;
    min-height: 150px;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
    user-select: none;
}

.background-image-input:hover {
    border-color: #3498db;
    background-color: rgba(52, 152, 219, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.background-image-input:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.1);
}

.background-image-input.clicked {
    animation: clickEffect 0.3s ease;
}

@keyframes clickEffect {
    0% { transform: scale(1); }
    50% { transform: scale(0.98); }
    100% { transform: scale(1); }
}

.background-image-input input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

.background-image-input i {
    font-size: 24px;
    color: #666;
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.background-image-input:hover i {
    color: #3498db;
    transform: translate(-50%, -50%) scale(1.1);
}

.background-image-text {
    display: block;
    color: #666;
    font-size: 14px;
    margin-top: 0;
    transition: color 0.3s ease;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}

.background-image-input:hover .background-image-text {
    color: #3498db;
}

.background-image-hint {
    display: block;
    color: #999;
    font-size: 12px;
    margin-top: 0;
    font-style: italic;
    transition: color 0.3s ease;
    text-align: center;
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
}

.background-image-input:hover .background-image-hint {
    color: #3498db;
}

.background-image-input.has-image {
    border-style: solid;
    border-color: #4CAF50;
}

.background-image-input.has-image i {
    display: none;
}

.background-image-input.has-image .background-image-text {
    display: none;
}

.background-image-input.has-image .background-image-hint {
    display: none;
}

.background-image-preview {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    height: 100%;
}

.background-image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Remove button styles */
#removeBackground {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 100;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    padding: 0;
    display: none !important;
    align-items: center;
    justify-content: center;
    background-color: #dc3545;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    opacity: 1 !important;
    visibility: visible !important;
    cursor: pointer;
    pointer-events: auto;
}

#removeBackground:hover {
    background-color: #c82333;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

#removeBackground {
    color: white;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
}

#removeBackground.show {
    display: flex !important;
}



.background-upload {
    display: none;
}

.background-style-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.background-position,
.background-size,
.background-repeat,
.background-attachment {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .background-position label,
    .background-size label,
    .background-repeat label,
    .background-attachment label {
        color: #2c3e50;
        font-size: 0.9rem;
    }

    .background-position select,
    .background-size select,
    .background-repeat select,
    .background-attachment select {
        padding: 0.5rem;
        border: 1px solid #ddd;
        border-radius: 4px;
        background-color: white;
        color: #2c3e50;
    }

        .background-position select:focus,
        .background-size select:focus,
        .background-repeat select:focus,
        .background-attachment select:focus {
            outline: none;
            border-color: #3498db;
            box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
        }

.theme-select {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

    .theme-select label {
        color: #2c3e50;
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        display: block;
    }

.custom-gradient {
    width: 100%;
    max-width: 300px;
    margin: 1rem auto 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.gradient-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.gradient-colors {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.gradient-color {
    width: 50px;
    height: 50px;
    padding: 0;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .gradient-color:hover {
        transform: scale(1.05);
        border-color: #3498db;
    }

.gradient-type {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

    .gradient-type label {
        color: #2c3e50;
        font-size: 0.9rem;
        text-align: center;
    }

.gradient-angle {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.angle-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.angle-value {
    min-width: 50px;
    text-align: center;
    color: #2c3e50;
    font-size: 0.9rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .settings-panel {
        padding: 15px;
    }

    .background-style-controls {
        grid-template-columns: 1fr;
    }

    .title-colors {
        grid-template-columns: 1fr;
    }

    .gradient-colors {
        justify-content: center;
    }
}
.prize-colors .color-input-group {
    width: 102px;
}

/* Improved SortableJS Styles */
.sortable-ghost {
    opacity: 0.5;
    background: #f8f9fa;
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sortable-drag {
    opacity: 0.9;
    background: white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: scale(1.02) rotate(1deg);
    cursor: grabbing;
}

#prizeList li.dragging {
    opacity: 0.9;
    background: #f8f9fa;
    transform: scale(1.02) rotate(1deg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    cursor: grabbing;
}

#prizeList li.drag-over {
    transform: translateY(10px);
    border-top: 2px solid #4CAF50;
    box-shadow: 0 -4px 12px rgba(76, 175, 80, 0.1);
}

#prizeList li.drag-over-top {
    transform: translateY(-10px);
    border-bottom: 2px solid #4CAF50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.1);
}

#prizeList li .prize-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1;
    flex-wrap: wrap;
}

    #prizeList li .prize-info:hover .drag-handle {
        color: #666;
        transform: scale(1.1);
    }

#prizeList li .prize-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    cursor: default;
}

.edit-prize, .remove-prize {
    padding: 0.5rem 0.8rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.edit-prize {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.remove-prize {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

    .edit-prize:hover, .remove-prize:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

@property --border-angle {
    syntax: "<angle>";
    inherits: true;
    initial-value: 0turn;
}

@keyframes bg-spin {
    to {
        --border-angle: 1turn;
    }
}

.animated-border {
    width: 70%;
    height: 61px;
    place-content: center;
    color: white;
    text-shadow: 0 1px 0 #000;
    --border-angle: 0turn;
    --main-bg: conic-gradient(from var(--border-angle), #213, #112 5%, #112 60%, #213 95%);
    border: solid 3px transparent;
    border-radius: 2em;
    --gradient-border: conic-gradient(from var(--border-angle), transparent 25%, #08f, #f03 99%, transparent);
    background: var(--main-bg) padding-box,
                var(--gradient-border) border-box,
                var(--main-bg) border-box;
    background-position: center center;
    animation: bg-spin 3s linear infinite;
}



button#spinButton {
    margin-left: auto;
    margin-right: auto;
    display: block;
    margin-top: 40px;
    margin-bottom: 30px;
    font-size: 18px;
    gap: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

a#selectPlanButton {
    margin-left: auto;
    margin-right: auto;
    display: block;
    margin-top: 40px;
    margin-bottom: 30px;
    font-size: 18px;
    gap: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    text-shadow: 0 1px 0 #000;
}

.winner-code {
    text-align: center;
    padding: 20px;
}

.winner-code h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.discount-code {
    background-color: #f8f9fa;
    border: 2px dashed #6c757d;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    font-family: monospace;
    font-size: 1.2em;
    color: #28a745;
    letter-spacing: 1px;
}

#editDiscountCodes {
    font-family: monospace;
    resize: vertical;
    min-height: 100px;
    width: 100%;
    margin-top: 10px;
}

#discountCodesGroup {
    width: 100%;
    margin-top: 10px;
}

#discountCodesGroup label {
    display: block;
    margin-bottom: 5px;
}
#saveIndicator {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: #28a745;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s, visibility 0.5s;
}

    #saveIndicator.show {
        opacity: 1;
        visibility: visible;
    }

    #saveIndicator.error {
        background-color: #dc3545;
    }

.wheelluck-container {
    position: relative;
    z-index: 1;
    border-radius: 15px;
    padding: 20px;
    margin: auto;
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Ensure transparent background and no shadow for embed usage */
.embed-container,
.wheelluck-container {
    background: transparent !important;
    box-shadow: none !important;
}

/* انیمیشن‌های ظریف برای کادر پایین */
.prize-input-section,
.prize-list-section {
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* انیمیشن برای آیتم‌های جدید */
.prize-list li {
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* بهبود رنگ‌بندی کادر پایین */
.prize-input-section {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 50%, #e2e8f0 100%);
    border: 1px solid rgba(59, 130, 246, 0.1); /* border آبی ظریف */
}

.prize-list-section {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 50%, #e2e8f0 100%);
    border: 1px solid rgba(59, 130, 246, 0.1); /* border آبی ظریف */
}

/* بهبود رنگ عنوان‌ها */
.section-title {
    color: #1e293b;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700; /* وزن بیشتر */
}

/* Floating Save Button */
.floating-save-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    pointer-events: none;
    font-family: 'Vazirmatn', sans-serif;
}

.floating-save-button.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
    animation: slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-save-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.floating-save-button:active {
    transform: translateY(0) scale(0.98);
}

.floating-save-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: translateY(0) scale(1);
}

.floating-save-button.saving {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

.floating-save-button i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.floating-save-button i.spin {
    animation: spin 1s linear infinite;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Count info box - subtle gray box for count explanation */
.count-info-box {
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 8px 12px;
    display: inline-block;
    font-size: 0.875rem;
    color: #666;
    line-height: 1.4;
}

.count-info-box span {
    display: block;
}

/* Responsive adjustments for floating save button */
@media (max-width: 768px) {
    .floating-save-button {
        bottom: 15px;
        left: 15px;
        padding: 10px 16px;
        font-size: 13px;
        gap: 6px;
    }
    
    .floating-save-button i {
        font-size: 16px;
    }
}

.wheel-disabled-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0 3rem 0;
}

.wheel-disabled-card {
    max-width: 420px;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    border: 1px solid rgba(231, 76, 60, 0.25);
    box-shadow: 0 20px 45px rgba(231, 76, 60, 0.20);
    padding: 30px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    backdrop-filter: blur(6px);
}

.wheel-disabled-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.15), rgba(192, 57, 43, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c0392b;
    font-size: 34px;
    flex-shrink: 0;
}

.wheel-disabled-content h2 {
    font-size: 1.25rem;
    color: #c0392b;
    font-weight: 700;
    margin-bottom: 12px;
}

.wheel-disabled-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: #7f8c8d;
    margin: 0;
}

.wheel-disabled .wheel-section,
.wheel-disabled #shareButton,
.wheel-disabled #soundToggleBtn,
.wheel-disabled #sizeToggleBtn {
    display: none !important;
}

.wheel-disabled .title-section {
    margin-bottom: 0;
}

@media (max-width: 576px) {
    .wheel-disabled-card {
        padding: 24px;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .wheel-disabled-icon {
        width: 56px;
        height: 56px;
        font-size: 30px;
        margin: 0 auto;
    }

    .wheel-disabled-content h2,
    .wheel-disabled-content p {
        text-align: center;
    }
}