/* Nyx AI - Story Generator Styles */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --background: #0f172a;
    --surface: #1e293b;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --success: #22c55e;
    --error: #ef4444;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

header {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    color: rgba(255,255,255,0.8);
}

main {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

#wizard-container {
    background: var(--surface);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* Progress Bar */
.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.progress-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

.progress-step.active {
    background: var(--primary);
}

.progress-line {
    width: 60px;
    height: 2px;
    background: var(--border);
}

/* Form Steps */
.step {
    animation: fadeIn 0.3s ease;
}

.step.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.step h2 {
    margin-bottom: 0.5rem;
    color: var(--text);
}

.hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--background);
    color: var(--text);
    font-size: 1rem;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
}

textarea {
    resize: vertical;
}

/* Buttons */
.buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

button {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-next, .btn-generate {
    background: var(--primary);
    color: white;
}

.btn-next:hover, .btn-generate:hover {
    background: var(--primary-dark);
}

.btn-prev {
    background: var(--border);
    color: var(--text);
}

.btn-prev:hover {
    background: #475569;
}

.btn-restart {
    background: var(--secondary);
    color: white;
}

/* Summary */
.summary {
    background: var(--background);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.summary h3 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

#summary-content p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

/* Loading */
#loading {
    text-align: center;
    padding: 2rem;
}

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

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

/* Result */
#result {
    animation: fadeIn 0.3s ease;
}

#story-content {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 0.5rem;
    white-space: pre-wrap;
    line-height: 1.8;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.story-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    header h1 {
        font-size: 1.8rem;
    }

    #wizard-container {
        padding: 1rem;
    }

    .progress-line {
        width: 30px;
    }

    .progress-step {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .buttons {
        flex-direction: column;
    }

    button {
        width: 100%;
    }
}
