* {
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
    padding: 0;
    background: #050816;
    color: #f5f5f5;
}

.wrapper {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 16px 48px;
}

.card {
    background: radial-gradient(circle at top, #281b5a 0, #0b0f24 50%, #050816 100%);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.08);
}

h1 {
    margin: 0 0 8px;
    font-size: 2.2rem;
}

p {
    line-height: 1.6;
    margin: 0 0 12px;
}

.subtitle {
    color: #c3c8ff;
    font-size: 0.98rem;
    margin-bottom: 20px;
}

.controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin-top: 18px;
    margin-bottom: 18px;
}

label {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #c3c8ff;
    display: block;
    margin-bottom: 4px;
}

select {
    width: 100%;
    padding: 8px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(0,0,0,0.3);
    color: #f5f5f5;
    font-size: 0.9rem;
    outline: none;
}

select:focus {
    border-color: #9b8cff;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 8px;
    margin-bottom: 8px;
    transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.1s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #f97316, #e11d48, #8b5cf6);
    color: #050816;
    box-shadow: 0 10px 25px rgba(0,0,0,0.55);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: wait;
    box-shadow: none;
}

.btn-primary:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.65);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.5);
}

.btn-secondary:hover {
    background: rgba(30, 64, 175, 0.5);
}

.output {
    margin-top: 16px;
    padding: 16px 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.4);
    min-height: 120px;
    font-size: 0.97rem;
    white-space: pre-wrap;
}

.output-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #9ca3af;
    margin-bottom: 6px;
}

.status {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 4px;
}

.chat {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.5);
    display: none;
}

.chat textarea {
    width: 100%;
    min-height: 70px;
    border-radius: 12px;
    padding: 8px 10px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7eb;
    font-size: 0.9rem;
    resize: vertical;
    outline: none;
}

.chat textarea:focus {
    border-color: #a855f7;
}

.chat-response {
    margin-top: 10px;
    padding: 10px 10px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.5);
    font-size: 0.95rem;
    white-space: pre-wrap;
}

.footer {
    margin-top: 32px;
    font-size: 0.85rem;
    color: #9ca3af;
}

.universes {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.uni-btn {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(15, 23, 42, 0.95);
    color: #e5e7eb;
    font-size: 0.85rem;
    cursor: pointer;
}

.uni-btn:hover {
    background: rgba(30, 64, 175, 0.6);
}

@media (min-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
}
