:root {
    --background: #0f172a;
    --sidebar-bg: #1e293b;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --border: #334155;
    --input-bg: #1e293b;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
}

.container {
    display: flex;
    min-height: 100vh;
    transition: all 0.3s ease;
}

.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    padding: 2rem;
    border-right: 1px solid var(--border);
    transition: width 0.3s;
}

.sidebar ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.sidebar li {
    margin-bottom: 0.5rem;
}

.sidebar a {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-weight: 500;
}

.sidebar a:hover,
.sidebar a.active {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

.sidebar a i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    pointer-events: none; /* Prevents icon from intercepting clicks */
}

.sidebar a span {
    pointer-events: none; /* Prevents text from intercepting clicks */
}

.content {
    flex-grow: 1;
    padding: 2rem 3rem;
    max-width: 800px;
    margin: 0 auto;
    transition: padding 0.3s;
}

header {
    margin-bottom: 2.5rem;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
}

p {
    font-size: 16px;
    color: var(--text-muted);
}

/* Form Controls */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="date"],
select,
textarea {
    width: 100%;
    max-width: none;
    height: 40px; /* Set a consistent height */
    padding: 0.75rem 1rem;
    background-color: var(--input-bg);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

textarea {
    height: 100%;
    min-height: 80px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

/* Toggle switch styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: .4s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background-color: var(--primary);
}

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

/* Form layout */
form {
    display: grid;
    gap: 1.5rem;
    max-width: 100%;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
    margin-bottom: 1rem;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.form-row > * {
    flex: 1;
    min-width: 250px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 280px;
    padding-right: 1rem;
}

label {
    font-weight: 500;
    color: var(--text);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#settings-content {
    animation: fadeIn 0.3s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%; /* Full width sidebar on mobile */
        height: auto;
    }

    .content {
        padding: 10px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row > * {
        width: 100%;
    }

    .form-group {
        padding-right: 0;
        min-width: 100%;
    }
}

/* Header layout */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

/* Return button styles */
.return-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1.25rem;
    background-color: var(--sidebar-bg);
    color: var(--text);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.return-button:hover {
    background-color: var(--border);
    transform: translateY(-2px);
}

.return-button i {
    font-size: 0.9em;
}

/* Notification box styles */
.settings-box {
    background-color: var(--sidebar-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.settings-box h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toggle-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toggle-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Update responsive styles */
@media (max-width: 768px) {
    .settings-box {
        margin-bottom: 1rem;
    }
    
    .toggle-option {
        flex-direction: row;
        align-items: center;
    }
}

/* Checkbox grid layout */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.checkbox-item {
    position: relative;
    padding: 0.75rem;
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.checkbox-item:hover {
    border-color: var(--primary);
    background-color: rgba(59, 130, 246, 0.1);
}

.checkbox-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

.checkbox-item label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    color: var(--text-muted);
}

.checkbox-item input[type="checkbox"]:checked + label {
    color: var(--primary);
}

.checkbox-item label i {
    font-size: 1.1rem;
    width: 1.5rem;
}

/* Font preview styles */
.font-preview-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.font-preview {
    padding: 1rem;
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1.1rem;
    color: var(--text);
}

/* Theme selection styles */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.theme-option-card {
    position: relative;
}

.theme-option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.theme-option-card label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background-color: var(--background);
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-preview {
    width: 100%;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-size: 1.5rem;
}

.light-preview {
    background-color: #ffffff;
    color: #1a1a1a;
}

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

.theme-option-card input[type="radio"]:checked + label {
    border-color: var(--primary);
    background-color: rgba(59, 130, 246, 0.1);
}

/* Form group with icons */
.form-group label i {
    margin-right: 0.5rem;
    width: 1.2rem;
    color: var(--text-muted);
}

/* Update responsive styles */
@media (max-width: 768px) {
    .checkbox-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .theme-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Modern notification styles */
.notification-preferences h3,
.email-preferences h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.notification-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification-option {
    position: relative;
}

.notification-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.notification-option label {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-option label:hover {
    border-color: var(--primary);
    background-color: rgba(59, 130, 246, 0.05);
}

.notification-option input[type="radio"]:checked + label {
    border-color: var(--primary);
    background-color: rgba(59, 130, 246, 0.1);
}

.option-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--sidebar-bg);
    border-radius: 0.5rem;
    color: var(--primary);
}

.option-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.option-title {
    font-weight: 500;
    color: var(--text);
}

.option-description {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Email notification styles */
.email-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.email-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.email-option:hover {
    border-color: var(--primary);
    background-color: rgba(59, 130, 246, 0.05);
}

.option-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .notification-option label {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .option-icon {
        margin-bottom: 0.5rem;
    }

    .email-option {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* Profile styles */
.profile-header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    align-items: start;
    margin-bottom: 1rem;
}

.avatar-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.avatar-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: var(--background);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.avatar-preview:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.upload-button {
    background-color: var(--background);
    color: var(--text);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

.upload-button:hover {
    background-color: var(--border);
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.social-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.input-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .profile-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .avatar-upload {
        margin: 0 auto 1.5rem;
    }

    .social-links {
        grid-template-columns: 1fr;
    }
}
