:root {
    --bg-main: #0f172a;
    --bg-surface: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --accent: #10b981;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border: #334155;
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.5);
    --border-radius: 8px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-anchor: none;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
}

/* Header */
header {
    background-color: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(8px);
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* Buttons */
.btn {
    background-color: var(--primary);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    font-family: inherit;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
    background-color: var(--bg-surface);
}

.btn-large {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 1rem;
    background: radial-gradient(circle at top, var(--bg-surface) 0%, var(--bg-main) 100%);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-inline: auto;
}

/* Language Toggle */
.lang-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.25rem;
}

.lang-toggle:hover {
    color: var(--text-main);
}

/* Forms & Cards */
.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    color: var(--text-main);
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.auth-container {
    max-width: 400px;
    margin: 4rem auto;
}

/* Config Editor Layout */
.config-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.config-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.config-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 250px;
    flex-shrink: 0;
}

.tab-btn {
    background: transparent;
    border: none;
    text-align: left;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 1rem;
}

.tab-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.tab-btn.active {
    background-color: var(--bg-surface);
    color: var(--primary);
    border-left: 3px solid var(--primary);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.config-content {
    flex-grow: 1;
    min-height: 500px;
}

/* Lists */
.list-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.list-item {
    padding: 0.75rem 1rem;
    background-color: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.list-item:hover {
    border-color: var(--text-muted);
}

.list-item ul li {
    padding: 0.35rem 0.5rem;
    margin: 0 -0.5rem 0.25rem -0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.list-item ul li:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.5), 0 8px 10px -6px rgb(0 0 0 / 0.5);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-surface);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-main);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--danger);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

/* FAQ Styling */
.faq-section {
    margin-bottom: 1.5rem;
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.faq-section-title {
    font-weight: 700;
    font-size: 1.1rem;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    user-select: none;
}

.faq-items {
    padding: 0.5rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
}

.faq-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.faq-item summary {
    font-weight: 500;
    color: var(--primary);
    cursor: pointer;
    margin-bottom: 0.5rem;
    user-select: none;
}

.faq-item summary:hover {
    color: var(--primary-hover);
}

.faq-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
    padding-left: 1.2rem;
    margin: 0;
    line-height: 1.6;
}
