/* ==================== SETTINGS PANEL STYLES ==================== */

.settings-panel {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.settings-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.settings-container {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideInUp 0.3s ease;
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 2px solid #e0e0e0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.settings-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.settings-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    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-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.settings-tabs {
    width: 200px;
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    padding: 20px 0;
    overflow-y: auto;
}

.tab-btn {
    width: 100%;
    padding: 14px 20px;
    background: none;
    border: none;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.tab-btn:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.tab-btn.active {
    background: white;
    color: #667eea;
    border-left-color: #667eea;
    font-weight: 600;
}

.settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.tab-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid #e0e0e0;
}

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

.tab-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 20px 0;
}

.tab-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
    margin: 16px 0 8px 0;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

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

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 28px;
}

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

input:checked + .slider {
    background-color: #667eea;
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* Avatar Selector */
.avatar-selector {
    display: flex;
    align-items: center;
    gap: 16px;
}

.current-avatar {
    font-size: 48px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea20, #764ba220);
    border-radius: 50%;
    border: 3px solid #667eea;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.stat-item {
    background: linear-gradient(135deg, #667eea10, #764ba210);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Button Group */
.button-group {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn-primary,
.btn-secondary,
.btn-danger {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-danger {
    background: linear-gradient(135deg, #f44336, #e53935);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

/* Input with Button */
.input-with-button {
    display: flex;
    gap: 12px;
}

.input-with-button input {
    flex: 1;
}

/* Info Boxes */
.info-box {
    background: #e3f2fd;
    border-left: 4px solid #2196F3;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.info-box p {
    margin: 0;
    font-size: 14px;
    color: #1976d2;
}

.info-box.warning {
    background: #fff3e0;
    border-left-color: #ff9800;
}

.info-box.warning p {
    color: #f57c00;
}

.info-box.danger {
    background: #ffebee;
    border-left-color: #f44336;
}

.info-box.danger p {
    color: #c62828;
}

/* Help Text */
.help-text {
    font-size: 13px;
    color: #999;
    margin-top: 16px;
    line-height: 1.6;
}

.help-text a {
    color: #667eea;
    text-decoration: none;
}

.help-text a:hover {
    text-decoration: underline;
}

/* About Tab */
.about-header {
    text-align: center;
    margin-bottom: 32px;
}

.about-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.about-header h3 {
    margin: 0 0 12px 0;
    font-size: 24px;
}

.version-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.changelog-section {
    margin-bottom: 24px;
}

.changelog-section ul {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.changelog-section li {
    padding: 8px 0 8px 24px;
    position: relative;
    font-size: 14px;
    color: #666;
}

.changelog-section li:before {
    content: "•";
    position: absolute;
    left: 8px;
    color: #667eea;
    font-weight: bold;
}

.system-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.info-row span:first-child {
    font-weight: 600;
    color: #666;
}

.info-row span:last-child {
    color: #333;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .settings-container {
        width: 95%;
        max-height: 95vh;
    }

    .settings-body {
        flex-direction: column;
    }

    .settings-tabs {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        display: flex;
        overflow-x: auto;
        padding: 0;
    }

    .tab-btn {
        flex-shrink: 0;
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 12px 16px;
    }

    .tab-btn.active {
        border-left: none;
        border-bottom-color: #667eea;
    }

    .settings-content {
        padding: 20px;
    }

    .button-group {
        flex-direction: column;
    }

    .input-with-button {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
