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

:root {
    --bg: #0b0d14;
    --surface: #131620;
    --surface-hover: #1a1d2b;
    --border: rgba(255, 255, 255, 0.06);
    --border-focus: rgba(139, 92, 246, 0.4);
    --text: #e8e9ec;
    --text-secondary: #7a7f94;
    --text-muted: #4e5366;
    --accent: #8b5cf6;
    --accent-light: #a78bfa;
    --accent-dark: #7c3aed;
    --success: #22c55e;
    --error: #ef4444;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app {
    max-width: 560px;
    margin: 0 auto;
    padding: 0 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.app-header {
    padding: 32px 0 24px;
    text-align: center;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.logo svg {
    color: var(--accent);
    flex-shrink: 0;
}

.app-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 6px;
    font-weight: 400;
}

/* Main */
.app-main {
    flex: 1;
    padding-bottom: 24px;
}

/* Card */
.prompt-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

.prompt-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.prompt-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: rgba(139, 92, 246, 0.12);
    color: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.prompt-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.01em;
}

.prompt-desc {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Editor */
.editor-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.editor {
    width: 100%;
    min-height: 360px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.875rem;
    line-height: 1.7;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.editor:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.08);
}

.editor::placeholder {
    color: var(--text-muted);
}

/* Buttons */
.actions {
    display: flex;
    gap: 10px;
}

.btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: -0.01em;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

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

.btn-secondary:hover:not(:disabled) {
    background: var(--surface-hover);
    color: var(--text);
    border-color: rgba(255,255,255,0.1);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    color: var(--text);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    font-size: 0.8125rem;
    font-weight: 500;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.toast.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(12px);
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 16px 0 24px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.14);
}
