@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* Theme Variables */
:root {
    --bg-primary: #c8c8c8;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8f9fa;
    --bg-header: #2c3e50;
    --bg-hover: #e9ecef;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-tertiary: #34495e;
    --text-header: #ffffff;
    --text-header-muted: #ecf0f1;
    --border-color: #ddd;
    --border-light: #ecf0f1;
    --border-medium: #bdc3c7;
    --accent-primary: #3498db;
    --accent-primary-hover: #2980b9;
    --accent-success: #27ae60;
    --accent-success-hover: #229954;
    --accent-danger: #e74c3c;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --hover-highlight: yellow;
}

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #242424;
    --bg-header: #000000;
    --bg-hover: #3d3d3d;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --text-tertiary: #b0b0b0;
    --text-header: #e0e0e0;
    --text-header-muted: #a0a0a0;
    --border-color: #404040;
    --border-light: #333333;
    --border-medium: #505050;
    --accent-primary: #5dade2;
    --accent-primary-hover: #3498db;
    --accent-success: #58d68d;
    --accent-success-hover: #27ae60;
    --accent-danger: #e74c3c;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --hover-highlight: #5dade2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: background-color 0.3s ease;
}

.settings-container {
    width: 100%;
    max-width: 500px;
    animation: fadeIn 0.5s ease;
}

.settings-card {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.settings-header {
    background-color: var(--bg-header);
    color: var(--text-header);
    padding: 30px;
    text-align: center;
    transition: background-color 0.3s ease;
}

.settings-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
    font-weight: 600;
}

.settings-header .subtitle {
    font-size: 14px;
    color: var(--text-header-muted);
    font-weight: 400;
}

.settings-body {
    padding: 30px;
}

/* Not Signed In State */
.not-signed-in-state {
    text-align: center;
    padding: 20px;
}

.warning-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background-color: #f39c12;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
}

.not-signed-in-state p {
    margin-bottom: 12px;
    color: var(--text-primary);
    font-size: 15px;
}

.not-signed-in-state strong {
    color: #f39c12;
    font-size: 18px;
    display: block;
    margin-bottom: 8px;
}

/* Settings Sections */
.settings-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

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

.settings-section h2 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-weight: 600;
}

.settings-group {
    margin-bottom: 20px;
}

.settings-group:last-child {
    margin-bottom: 0;
}

.settings-group > label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.settings-group input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.2s;
    font-family: inherit;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.settings-group input[type="text"]:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.input-with-button {
    display: flex;
    gap: 10px;
}

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

.field-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
}

/* Action Buttons - matches main app style */
.action-btn {
    padding: 5.76px 15px;
    border: 1px solid var(--border-medium);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 4px;
    font-size: 12.6px;
    font-weight: 500;
    transition: all 0.2s;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.action-btn:hover {
    background-color: var(--hover-highlight);
    color: var(--text-primary);
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn-primary {
    background-color: var(--accent-success);
    color: white;
    border-color: var(--accent-success);
}

.action-btn-primary:hover {
    background-color: var(--accent-success-hover);
    border-color: var(--accent-success-hover);
    color: white;
}

/* Settings Message */
.settings-message {
    min-height: 0;
    font-size: 13px;
    padding: 0;
    border-radius: 4px;
    margin-top: 8px;
    transition: all 0.3s ease;
}

.settings-message.show {
    min-height: 20px;
    padding: 8px 12px;
}

.settings-message.error {
    color: #c0392b;
    background-color: #fadbd8;
    border: 1px solid #f1948a;
}

.settings-message.success {
    color: #27ae60;
    background-color: #d5f4e6;
    border: 1px solid #82e0aa;
}

/* Email Display */
.email-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background-color: var(--bg-tertiary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.email-display span:first-child {
    color: var(--text-primary);
    font-size: 15px;
}

.email-badge {
    font-size: 11px;
    padding: 3px 8px;
    background-color: var(--accent-success);
    color: white;
    border-radius: 12px;
    font-weight: 500;
}

/* Theme Toggle */
.theme-toggle-container {
    display: flex;
    gap: 12px;
}

.theme-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background-color: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    color: var(--text-primary);
}

.theme-option:hover {
    border-color: var(--accent-primary);
    background-color: var(--bg-hover);
}

.theme-option.active {
    border-color: var(--accent-primary);
    background-color: rgba(52, 152, 219, 0.1);
}

.theme-option svg {
    color: var(--text-secondary);
    transition: color 0.2s;
}

.theme-option.active svg {
    color: var(--accent-primary);
}

.theme-option span {
    font-size: 14px;
    font-weight: 500;
}

/* Settings Footer */
.settings-footer {
    padding: 20px 30px;
    background-color: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--accent-primary-hover);
}

.back-link svg {
    transition: transform 0.2s;
}

.back-link:hover svg {
    transform: translateX(-3px);
}

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

/* Responsive Design */
@media (max-width: 600px) {
    .settings-card {
        border-radius: 8px;
    }

    .settings-header {
        padding: 25px 20px;
    }

    .settings-header h1 {
        font-size: 24px;
    }

    .settings-body {
        padding: 25px 20px;
    }

    .settings-footer {
        padding: 15px 20px;
    }

    .theme-toggle-container {
        flex-direction: column;
    }

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

    .input-with-button .action-btn {
        width: 100%;
    }
}
