:root {
    --bg-deep: #020617;
    --bg-elevated: #0f172a;
    --bg-card: #111827;
    --bg-input: #1e293b;
    --fg-primary: #f8fafc;
    --fg-secondary: #cbd5e1;
    --fg-muted: #94a3b8;
    --accent-emerald: #10b981;
    --accent-emerald-glow: rgba(16, 185, 129, 0.2);
    --accent-pink: #ec4899;
    --accent-pink-glow: rgba(236, 72, 153, 0.2);
    --border-color: #1e293b;
    --border-light: #334155;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-card: 0 4px 24px rgba(0,0,0,0.3), 0 1px 4px rgba(0,0,0,0.2);
    --transition: 200ms ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-deep);
    color: var(--fg-primary);
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(236,72,153,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(139,92,246,0.04) 0%, transparent 50%);
}

.app-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 32px 24px 60px;
}

/* Header */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 20px 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

.app-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.app-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    flex-shrink: 0;
}

.app-header-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent-pink), #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    box-shadow: 0 4px 16px var(--accent-pink-glow);
}

.app-header h1 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--fg-primary), var(--fg-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-header p {
    font-size: 13px;
    color: var(--fg-muted);
    margin-top: 2px;
}

.header-link {
    color: var(--fg-muted);
    text-decoration: none;
    font-size: 13px;
    transition: color var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.header-link:hover { color: var(--accent-pink); }

/* Section Card */
.section-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-bottom: 24px;
}

.section-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: linear-gradient(135deg, rgba(236,72,153,0.08) 0%, var(--bg-elevated) 60%);
    border-bottom: 1px solid var(--border-color);
    border-top: 2px solid rgba(236,72,153,0.25);
}

.section-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--fg-primary);
}

.section-card-title i {
    color: var(--accent-pink);
    font-size: 20px;
}

.section-card-body {
    padding: 24px;
}

/* Form */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.form-label i {
    margin-right: 4px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--fg-primary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    color-scheme: dark;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}

.form-input:focus {
    border-color: var(--accent-pink);
    box-shadow: 0 0 0 3px var(--accent-pink-glow);
}

.form-textarea {
    width: 100%;
    padding: 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--fg-primary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    outline: none;
    resize: vertical;
    min-height: 180px;
    transition: border-color var(--transition), box-shadow var(--transition);
    color-scheme: dark;
}

.form-textarea:focus {
    border-color: var(--accent-pink);
    box-shadow: 0 0 0 3px var(--accent-pink-glow);
}

.form-textarea::placeholder {
    color: var(--fg-muted);
}

/* Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    height: 42px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-emerald {
    background: linear-gradient(135deg, var(--accent-emerald), #059669);
    color: #fff;
    box-shadow: 0 2px 12px var(--accent-emerald-glow);
}
.btn-emerald:hover { box-shadow: 0 4px 20px var(--accent-emerald-glow); }

/* Editor */
.editor-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
}

.editor-message {
    font-size: 14px;
    font-weight: 600;
}

.editor-message-success {
    color: var(--accent-emerald);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--fg-muted); }

/* Responsive */
@media (max-width: 768px) {
    .app-wrapper { padding: 20px 16px 40px; }
    .app-header { flex-direction: column; align-items: flex-start; gap: 14px; }
    .app-header-right { flex-wrap: wrap; }
}
