/* Profile Modal Styles */
.profile-modal, .settings-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.profile-modal.show, .settings-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-modal-content, .settings-modal-content {
    background: #2d2d2d;
    border-radius: 20px;
    padding: 0;
    max-width: 680px;
    width: 92%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0,0,0,0.9);
    border: 1px solid #404040;
}

.profile-header, .settings-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profile-header h2, .settings-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-profile, .close-settings {
    background: none;
    border: none;
    color: white;
    font-size: 2.2rem;
    font-weight: 300;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    line-height: 1;
}

.close-profile:hover, .close-settings:hover {
    background-color: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.profile-body, .settings-body {
    padding: 30px;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #404040;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 2rem;
    flex-shrink: 0;
}

.profile-info h3 {
    margin: 0 0 8px 0;
    color: #ffffff;
    font-size: 1.5rem;
}

.profile-info p {
    margin: 0 0 4px 0;
    color: #cccccc;
}

.profile-join-date {
    color: #999 !important;
    font-size: 0.9rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.profile-stats .stat-card {
    background: #1a1a1a;
    border: 1px solid #404040;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.profile-stats .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
}

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

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-actions .btn {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    padding: 12px 20px;
}

.profile-actions .btn .icon {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* Settings Styles */
.settings-section {
    margin-bottom: 0;
    padding: 20px 0;
    border-bottom: 1px solid #404040;
    background: linear-gradient(135deg, #2d2d2d 0%, #353535 100%);
}

.settings-section:first-child {
    padding-top: 0;
}

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

.settings-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    border-radius: 0 0 20px 20px;
}

.settings-section h3 {
    color: #ffffff;
    font-size: 1.2rem;
    margin: 0 0 20px 0;
    padding: 0 30px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-section h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.setting-item {
    margin-bottom: 15px;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.setting-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.setting-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(102, 126, 234, 0.3);
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item label {
    display: block;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.setting-select {
    width: 100%;
    padding: 14px 18px;
    background: #404040;
    border: 2px solid #555555;
    border-radius: 10px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.setting-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    background: #4a4a4a;
}

/* Light Mode Styles */
.theme-light .settings-modal-content {
    background: #ffffff;
    border-color: #e0e0e0;
}

.theme-light .settings-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom-color: #e0e0e0;
}

.theme-light .settings-section h3 {
    color: #333333;
}

.theme-light .settings-section h3::before {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.theme-light .setting-item {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.05);
}

.theme-light .setting-item:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(102, 126, 234, 0.3);
}

.theme-light .setting-item label {
    color: #333333;
}

.theme-light .setting-select {
    background: #f8f9fa;
    border-color: #d0d0d0;
    color: #333333;
}

.theme-light .setting-select:focus {
    background: #ffffff;
    border-color: #667eea;
}

.theme-light .setting-toggle {
    color: #333333;
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.05);
}

.theme-light .setting-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(102, 126, 234, 0.3);
}

.setting-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 0;
    width: 100%;
}

.setting-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(102, 126, 234, 0.3);
}

.setting-toggle input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 24px;
    background: #404040;
    border-radius: 12px;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.setting-toggle input[type="checkbox"]:checked + .toggle-slider {
    background: #667eea;
}

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

.settings-actions {
    margin-top: 0;
    padding: 20px 30px 30px 30px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.settings-actions .btn {
    flex: 1;
    min-width: 120px;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-modal-content, .settings-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .profile-section {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-stats {
        grid-template-columns: 1fr;
    }
    
    .settings-actions {
        flex-direction: column;
    }
    
    .settings-actions .btn {
        flex: none;
    }
}
