/* Settings Panel Styles */

.settings-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ui-primary);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Setting Item */
.setting-item {
    margin-bottom: 20px;
}

.setting-item label {
    display: block;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 10px;
}

/* Volume Sliders */
.setting-item input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.setting-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--ui-primary);
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.setting-item input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.setting-item input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--ui-primary);
    cursor: pointer;
    border: none;
}

.volume-value {
    display: inline-block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Card Back Options */
.card-back-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.card-back-option {
    width: 60px;
    height: 84px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 3px solid transparent;
    background: none;
    padding: 0;
    overflow: hidden;
}

.card-back-option:hover {
    transform: translateY(-3px);
}

.card-back-option.selected {
    border-color: var(--ui-primary);
    box-shadow: 0 0 15px rgba(201, 162, 39, 0.5);
}

.card-back-preview {
    width: 100%;
    height: 100%;
    border-radius: 4px;
}

.card-back-preview.classic {
    background: linear-gradient(135deg, #1e3a5f 0%, #2a4a6f 100%);
    border: 2px solid #c9a227;
    box-sizing: border-box;
}

.card-back-preview.geometric {
    background: linear-gradient(135deg, #8b0000 0%, #a52a2a 100%);
    border: 2px solid #ffd700;
    box-sizing: border-box;
}

.card-back-preview.floral {
    background: linear-gradient(135deg, #2d5a27 0%, #3d6a37 100%);
    border: 2px solid #c9a227;
    box-sizing: border-box;
}

.card-back-preview.modern {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #4a69bd;
    box-sizing: border-box;
}

/* Color Picker */
.color-picker-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

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

.color-picker-item span {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.color-picker-item input[type="color"] {
    width: 50px;
    height: 35px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: none;
    padding: 0;
}

.color-picker-item input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.color-picker-item input[type="color"]::-webkit-color-swatch {
    border-radius: 4px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Background Options */
.background-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.bg-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s;
    color: white;
    font-size: 0.8rem;
}

.bg-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.bg-option.selected {
    border-color: var(--ui-primary);
    background: rgba(201, 162, 39, 0.1);
}

.bg-preview {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.bg-preview.green-felt {
    background: #1a5f2a;
}

.bg-preview.blue-felt {
    background: #1a3f5f;
}

.bg-preview.red-felt {
    background: #5f1a1a;
}

.bg-preview.wood {
    background: #8b5a2b;
}

.bg-preview.dark {
    background: #1a1a1a;
}

.bg-preview.custom {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    background-size: 200% 200%;
}

/* Toggle Setting */
.setting-item.toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.setting-item.toggle label {
    margin-bottom: 0;
}

.setting-item.toggle input[type="checkbox"] {
    width: 50px;
    height: 26px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 13px;
    cursor: pointer;
    transition: background 0.3s;
    position: relative;
}

.setting-item.toggle input[type="checkbox"]::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.setting-item.toggle input[type="checkbox"]:checked {
    background: var(--ui-primary);
}

.setting-item.toggle input[type="checkbox"]:checked::before {
    transform: translateX(24px);
}

/* Select Dropdown */
.setting-item select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.setting-item select:focus {
    outline: none;
    border-color: var(--ui-primary);
}

.setting-item select option {
    background: #2a2a2a;
    color: white;
}

/* Toggle Button Group */
.toggle-group {
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
    border-radius: 8px;
}

.toggle-btn {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.toggle-btn.selected {
    background: var(--ui-primary);
    color: #000;
    font-weight: bold;
}

/* Stats Panel Styles */
.stats-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.stats-tab {
    padding: 10px 15px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-size: 0.9rem;
}

.stats-tab:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.stats-tab.active {
    background: var(--ui-primary);
    color: #000;
    font-weight: bold;
}

.stats-content {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    color: rgba(255, 255, 255, 0.7);
}

.stat-value {
    font-weight: bold;
    color: var(--ui-primary);
}

.reset-stats-btn {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    border: 1px solid rgba(255, 100, 100, 0.5);
    background: rgba(255, 100, 100, 0.1);
    color: #ff6b6b;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.reset-stats-btn:hover {
    background: rgba(255, 100, 100, 0.2);
    border-color: #ff6b6b;
}

/* Responsive Settings */
@media (max-width: 400px) {
    .background-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-back-options {
        justify-content: center;
    }

    .color-picker-group {
        flex-direction: column;
        gap: 15px;
    }
}
