@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: 600px;
    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;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-state p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 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;
}

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

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.stat-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.stat-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    color: var(--accent-primary);
}

.stat-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-empty {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

.activity-empty a {
    color: var(--accent-primary);
    text-decoration: none;
}

.activity-empty a:hover {
    text-decoration: underline;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.activity-item:hover {
    border-color: var(--accent-primary);
}

.activity-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-secondary);
    border-radius: 6px;
    color: var(--accent-primary);
}

.activity-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.activity-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.activity-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Projects Summary */
.projects-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.project-item:hover {
    border-color: var(--accent-primary);
}

.project-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.project-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.project-badge {
    font-size: 11px;
    padding: 4px 10px;
    background-color: var(--bg-secondary);
    color: var(--accent-primary);
    border-radius: 12px;
    font-weight: 500;
    white-space: nowrap;
}

/* 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);
}

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

.footer-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.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;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 14px;
    }

    .footer-links {
        flex-direction: column;
        gap: 12px;
    }

    .project-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-badge {
        align-self: flex-start;
    }
}
