/* Settings Page Styles */
#settings-page {
    padding: 24px;
}

.settings-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 32px;
    min-height: 600px;
}

/* Settings Navigation */
.settings-nav {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    height: fit-content;
    position: sticky;
    top: 24px;
}

.settings-nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 4px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.settings-nav-item.active {
    background: rgba(145, 70, 255, 0.2);
    color: #9146FF;
}

.settings-nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Settings Content */
.settings-content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 32px;
}

.settings-section {
    display: none;
}

.settings-section.active {
    display: block;
}

.settings-section-title {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 32px;
}

/* Setting Groups */
.setting-group {
    margin-bottom: 32px;
}

.setting-group h3 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
}

.setting-group label {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
}

.setting-description {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 6px;
}

/* Form Controls */
.setting-input,
.setting-select {
    width: 100%;
    max-width: 400px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    transition: all 0.2s ease;
}

.setting-input:focus,
.setting-select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: #9146FF;
}

.setting-select option {
    background: #1e1e1e;
    color: #fff;
}

/* Toggle Switches */
.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.toggle-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    transition: background 0.3s ease;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle-input:checked + .toggle-switch {
    background: #9146FF;
}

.toggle-input:checked + .toggle-switch::after {
    transform: translateX(24px);
}

.toggle-text {
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

/* Connected Accounts */
.connected-accounts {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.connected-account {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.account-icon {
    font-size: 24px;
}

.account-name {
    flex: 1;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
}

.btn-link {
    background: none;
    border: none;
    color: #9146FF;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
}

.btn-link:hover {
    color: #7c2ff2;
    text-decoration: underline;
}

/* Danger Zone */
.danger-zone {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 71, 71, 0.3);
}

.danger-zone h3 {
    color: #ff4747;
}

.btn-danger {
    background: transparent;
    border: 1px solid #ff4747;
    color: #ff4747;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: rgba(255, 71, 71, 0.1);
}

/* Settings Actions */
.settings-actions {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

#save-settings {
    padding: 12px 32px;
}

#save-settings.has-changes {
    animation: pulse 2s infinite;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #9146FF;
    color: white;
}

.btn-primary:hover {
    background: #7c2ff2;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(145, 70, 255, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Guest State */
.guest-state-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.guest-state-content {
    text-align: center;
    max-width: 400px;
}

.guest-icon {
    font-size: 64px;
    display: block;
    margin-bottom: 24px;
    opacity: 0.5;
}

.guest-state-content h2 {
    font-size: 24px;
    color: #fff;
    margin-bottom: 12px;
}

.guest-state-content p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .settings-container {
        grid-template-columns: 1fr;
    }
    
    .settings-nav {
        position: static;
        display: flex;
        overflow-x: auto;
        padding: 8px;
    }
    
    .settings-nav-item {
        white-space: nowrap;
        margin-bottom: 0;
        margin-right: 8px;
    }
}

@media (max-width: 768px) {
    .settings-content {
        padding: 20px;
    }
    
    .setting-input,
    .setting-select {
        max-width: 100%;
    }
}