/* =============================================================================
   SETTINGS PANEL STYLES
   ============================================================================= */

.settings-toggle-btn {
    position: fixed;
    top: 10px;
    left: 10px;
    background: #2c3e50;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    z-index: 1001;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.settings-toggle-btn:hover {
    background: #34495e;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
}

.settings-toggle-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Help Button - positioned next to settings */
.help-toggle-btn {
    position: fixed;
    top: 10px;
    left: 140px;
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    z-index: 1001;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.help-toggle-btn:hover {
    background: #2ecc71;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
}

.help-toggle-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.settings-panel {
    position: fixed;
    top: 60px;
    left: 10px;
    width: 350px;
    max-height: 80vh;
    overflow-y: auto;
    background: rgba(44, 62, 80, 0.98);
    color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    animation: slideIn 0.3s ease;
}

.settings-panel.visible {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.settings-panel h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #3498db;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.setting-group {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.setting-group:last-of-type {
    border-bottom: none;
}

.setting-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 14px;
    color: #ecf0f1;
}

.setting-group label span {
    color: #3498db;
    font-family: monospace;
    font-size: 15px;
}

.setting-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
}

.setting-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    transition: all 0.2s ease;
}

.setting-group input[type="range"]::-webkit-slider-thumb:hover {
    background: #5dade2;
    transform: scale(1.2);
}

/* Language selector */
.language-select {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #ecf0f1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.language-select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.language-select:focus {
    border-color: #3498db;
    background: rgba(255, 255, 255, 0.2);
}

.language-select option {
    background: #2c3e50;
    color: #ecf0f1;
}


.setting-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.setting-group input[type="range"]::-moz-range-thumb:hover {
    background: #5dade2;
    transform: scale(1.2);
}

.setting-group small {
    display: block;
    margin-top: 5px;
    color: #95a5a6;
    font-size: 12px;
    font-style: italic;
}

/* Toggle checkbox styling */
.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.toggle-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #3498db;
}

.toggle-label span {
    color: #ecf0f1 !important;
    font-weight: normal !important;
    font-size: 14px !important;
    font-family: inherit !important;
}

.reset-btn {
    width: 100%;
    background: #e74c3c;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.reset-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.help-text {
    display: block;
    margin-top: 15px;
    padding: 10px;
    background: rgba(52, 152, 219, 0.2);
    border-left: 3px solid #3498db;
    border-radius: 4px;
    color: #ecf0f1;
    font-size: 12px;
}

/* Scrollbar styling for settings panel */
.settings-panel::-webkit-scrollbar {
    width: 8px;
}

.settings-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.settings-panel::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

.settings-panel::-webkit-scrollbar-thumb:hover {
    background: #5dade2;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .settings-panel {
        width: calc(100% - 20px);
        right: 10px;
        left: 10px;
        max-height: 70vh;
    }
}

/* =============================================================================
   HELP PANEL STYLES
   ============================================================================= */

.help-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.help-panel.visible {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.help-content {
    background: #2c3e50;
    color: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.help-content h3 {
    margin: 0 0 25px 0;
    font-size: 28px;
    color: #27ae60;
    border-bottom: 3px solid #27ae60;
    padding-bottom: 12px;
    text-align: center;
}

.help-section {
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid #27ae60;
}

.help-section h4 {
    margin: 0 0 12px 0;
    font-size: 18px;
    color: #2ecc71;
}

.help-section p {
    margin: 10px 0;
    line-height: 1.6;
    font-size: 14px;
}

.help-section ul {
    margin: 10px 0;
    padding-left: 25px;
}

.help-section li {
    margin: 8px 0;
    line-height: 1.5;
    font-size: 14px;
}

.help-section strong {
    color: #3498db;
}

.help-section em {
    color: #f39c12;
    font-style: normal;
}

.help-close-btn {
    width: 100%;
    background: #e74c3c;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.help-close-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.help-close-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Scrollbar styling for help panel */
.help-content::-webkit-scrollbar {
    width: 8px;
}

.help-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.help-content::-webkit-scrollbar-thumb {
    background: #27ae60;
    border-radius: 4px;
}

.help-content::-webkit-scrollbar-thumb:hover {
    background: #2ecc71;
}

/* Responsive help panel */
@media (max-width: 768px) {
    .help-content {
        width: calc(100% - 20px);
        max-width: 100%;
        padding: 20px;
        max-height: 90vh;
    }

    .help-toggle-btn {
        left: 120px;
        padding: 10px 15px;
        font-size: 14px;
    }
}
