/* RAGE OF DRAGONS - SETTINGS SYSTEM CSS */

.settings-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.settings-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.settings-content {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: 2px solid #f39c12;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 800px;
    height: 80%;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.settings-header {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #d35400;
}

.settings-header h2 {
    margin: 0;
    font-size: 1.5em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.settings-close {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.settings-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.settings-close::before {
    content: '×';
}

.settings-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.settings-sidebar {
    width: 220px;
    background: rgba(44, 62, 80, 0.9);
    border-right: 2px solid #34495e;
    overflow-y: auto;
    padding: 10px 0;
}

.settings-menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #bdc3c7;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.settings-menu-item:hover {
    background: rgba(52, 73, 94, 0.7);
    color: white;
    border-left-color: #f39c12;
}

.settings-menu-item.active {
    background: rgba(243, 156, 18, 0.2);
    color: #f39c12;
    border-left-color: #f39c12;
    font-weight: bold;
}

.settings-menu-item img {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    opacity: 0.7;
}

.settings-menu-item.active img {
    opacity: 1;
}

.settings-main {
    flex: 1;
    background: rgba(236, 240, 241, 0.95);
    overflow-y: auto;
    padding: 20px;
}

.settings-section {
    color: #2c3e50;
}

.settings-section h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.3em;
    font-weight: bold;
    padding-bottom: 10px;
    border-bottom: 2px solid #f39c12;
}

.setting-group {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

.setting-label {
    display: block;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
    cursor: pointer;
}

.setting-label input[type="checkbox"] {
    margin-right: 8px;
}

.settings-input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #bdc3c7;
    border-radius: 5px;
    font-size: 1em;
    background: white;
    transition: border-color 0.3s ease;
}

.settings-input:focus {
    outline: none;
    border-color: #f39c12;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-slider {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: #ddd;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.settings-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f39c12;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.settings-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background: #e67e22;
}

.settings-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f39c12;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    border: none;
}

.slider-value {
    min-width: 50px;
    text-align: center;
    font-weight: bold;
    color: #f39c12;
    background: rgba(243, 156, 18, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.settings-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 5px;
}

.btn-primary {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #95a5a6 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.settings-footer {
    background: rgba(52, 73, 94, 0.9);
    padding: 15px 20px;
    border-top: 2px solid #34495e;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .settings-content {
        width: 95%;
        height: 90%;
    }
    
    .settings-body {
        flex-direction: column;
    }
    
    .settings-sidebar {
        width: 100%;
        max-height: 150px;
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 10px;
        border-right: none;
        border-bottom: 2px solid #34495e;
    }
    
    .settings-menu-item {
        flex-shrink: 0;
        padding: 10px 15px;
        border-left: none;
        border-bottom: 4px solid transparent;
        text-align: center;
        flex-direction: column;
        gap: 5px;
        min-width: 80px;
    }
    
    .settings-menu-item:hover,
    .settings-menu-item.active {
        border-left: none;
        border-bottom-color: #f39c12;
    }
    
    .settings-menu-item img {
        margin: 0;
        width: 20px;
        height: 20px;
    }
    
    .settings-menu-item span {
        font-size: 0.8em;
    }
    
    .settings-main {
        padding: 15px;
    }
}

/* Accessibility */
.settings-panel[aria-hidden="true"] {
    display: none;
}

.setting-group:focus-within {
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.3);
}

/* High contrast mode */
body.high-contrast .settings-content {
    background: black;
    border-color: white;
}

body.high-contrast .settings-header {
    background: white;
    color: black;
}

body.high-contrast .settings-main {
    background: white;
    color: black;
}

body.high-contrast .setting-group {
    background: black;
    color: white;
    border-color: white;
}

/* Animation for opening */
.settings-panel {
    animation: settingsFadeIn 0.3s ease-out;
}

@keyframes settingsFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(5px);
    }
}

.settings-content {
    animation: settingsSlideIn 0.3s ease-out;
}

@keyframes settingsSlideIn {
    from {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}