:root {
    --bg: #f5f8ff;
    --surface: #ffffff;
    --surface-soft: #eff4ff;
    --surface-strong: #dbe9ff;
    --text: #1f2937;
    --muted: #475569;
    --accent: #2874f0;
    --accent-2: #0f5cd4;
    --accent-alt: #fb641b;
    --accent-soft: #e7f0ff;
    --border: #dbe4f8;
    --line: #c7d2fe;
    --shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 14px 40px rgba(15, 23, 42, 0.06);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(180deg, #edf4ff 0%, #f8fbff 100%);
    color: var(--text);
    min-height: 100vh;
}

body.theme-dark {
    --bg: #0f172a;
    --surface: #111827;
    --surface-soft: #1f2937;
    --surface-strong: #111827;
    --text: #e5e7eb;
    --muted: #94a3b8;
    --accent: #60a5fa;
    --accent-soft: #1e293b;
    --border: #334155;
    --line: #334155;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
    background: #020617;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.site-main {
    margin: 0 auto;
    max-width: 1320px;
    padding: 40px 24px 40px;
    transition: padding 0.25s ease;
}

.message-panel {
    max-width: 1180px;
    margin: 0 auto 24px;
    display: grid;
    gap: 12px;
}

.message {
    padding: 16px 20px;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    box-shadow: var(--shadow-soft);
}

.message.success {
    border-color: #34d399;
    background: #ecfdf5;
}

.message.error,
.message.danger,
.message.warning {
    border-color: #fca5a5;
    background: #fef2f2;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    border: none;
    padding: 12px 20px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    box-shadow: 0 16px 34px rgba(40, 116, 240, 0.24);
}

.btn-secondary {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn.disabled,
.btn[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.btn.small {
    padding: 10px 16px;
}

.page-header {
    max-width: 1180px;
    margin: 0 auto 28px;
    padding: 24px 28px;
    background: #fff;
    border-radius: 24px;
    border: 1px solid #dbe4f8;
    box-shadow: var(--shadow-soft);
}

.page-header h1 {
    font-size: clamp(2.2rem, 3vw, 3rem);
    margin-bottom: 8px;
}

.page-header p {
    color: var(--muted);
    max-width: 760px;
    line-height: 1.8;
}

.empty-state {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px 28px;
    text-align: center;
    color: var(--muted);
    box-shadow: var(--shadow-soft);
}

.empty-state h2 {
    margin-bottom: 14px;
    color: var(--text);
}

@media (max-width: 1024px) {
    .site-main {
        padding: 32px 20px 32px;
    }
}

@media (max-width: 768px) {
    .site-main {
        padding: 24px 16px 24px;
    }
}

/* Settings Page Styles */
.settings-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
}

.settings-header {
    text-align: center;
    margin-bottom: 40px;
}

.settings-header h1 {
    font-size: 2.5rem;
    color: var(--text);
    margin-bottom: 10px;
}

.settings-header p {
    color: var(--muted);
    font-size: 1.1rem;
}

.settings-grid {
    display: grid;
    gap: 24px;
}

.settings-card {
    background: linear-gradient(to bottom right, var(--surface), var(--surface-soft));
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05), inset 0 2px 4px rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.settings-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.settings-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12), inset 0 2px 4px rgba(255, 255, 255, 0.8);
}

.settings-card:hover::before {
    opacity: 1;
}

.settings-card h3 {
    font-size: 1.4rem;
    color: var(--text);
    margin: 0;
}

.settings-card p {
    color: var(--muted);
    margin: 0;
    line-height: 1.6;
}

.settings-action {
    margin-top: 10px;
    display: flex;
    align-items: center;
}

.form-select {
    width: 100%;
    max-width: 300px;
    padding: 14px 20px;
    border: 2px solid transparent;
    border-radius: 12px;
    background-color: var(--surface-soft);
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%232874f0%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat, repeat;
    background-position: right .7em top 50%, 0 0;
    background-size: .65em auto, 100%;
}

.form-select:hover, .form-select:focus {
    border-color: var(--accent);
    outline: none;
}
