@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap");

:root {
    --bg: #0d1016;
    --bg-2: #141924;
    --panel: #141a26;
    --panel-2: #101623;
    --border: rgba(255, 255, 255, 0.08);
    --accent: #f6c445;
    --accent-2: #3ccf91;
    --text: #eef2f7;
    --muted: rgba(238, 242, 247, 0.65);
    --danger: #f05d5e;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top left, #1f2533 0%, var(--bg) 40%),
        radial-gradient(circle at 70% 20%, #1a2940 0%, var(--bg) 45%),
        var(--bg);
    min-height: 100vh;
}

.page {
    padding: 32px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    background: linear-gradient(135deg, rgba(246, 196, 69, 0.12), rgba(60, 207, 145, 0.12));
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 28px 32px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(246, 196, 69, 0.2);
    top: -120px;
    right: -80px;
    filter: blur(0.5px);
}

.hero-title h1 {
    margin: 6px 0 8px;
    font-size: 32px;
    letter-spacing: -0.02em;
}

.kicker {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.24em;
    color: var(--accent);
    margin: 0;
}

.subtitle {
    margin: 0;
    color: var(--muted);
    max-width: 480px;
}

.hero-card {
    align-self: center;
    background: rgba(17, 22, 35, 0.8);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 20px;
    min-width: 220px;
}

.hero-label {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--muted);
}

.hero-value {
    font-size: 18px;
    margin-top: 8px;
}

.hero-note {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.card {
    background: linear-gradient(180deg, rgba(16, 22, 35, 0.95), rgba(14, 19, 30, 0.9));
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.card-header h2 {
    margin: 0 0 8px;
}

.card-header p {
    margin: 0;
    color: var(--muted);
}

.mode-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 22px 0;
}

.mode-card {
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 14px 16px;
    background: var(--panel-2);
    transition: transform 0.2s ease, border 0.2s ease;
}

.mode-card.selected {
    border-color: rgba(246, 196, 69, 0.6);
    box-shadow: 0 0 0 1px rgba(246, 196, 69, 0.2);
}

.mode-card.disabled {
    opacity: 0.4;
}

.mode-title {
    font-weight: 600;
    margin-bottom: 6px;
}

.mode-desc {
    color: var(--muted);
    font-size: 13px;
}

.form-grid {
    display: grid;
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.field span {
    font-size: 13px;
    color: var(--muted);
}

input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 14px;
    color: var(--text);
    font-size: 14px;
}

input:focus {
    outline: none;
    border-color: rgba(246, 196, 69, 0.7);
    box-shadow: 0 0 0 3px rgba(246, 196, 69, 0.2);
}

.test-mode {
    margin-top: 22px;
}

.test-mode-header h3 {
    margin: 0 0 4px;
}

.test-mode-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.toggle-group {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.toggle-btn {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 18px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-btn.active {
    background: rgba(60, 207, 145, 0.2);
    border-color: rgba(60, 207, 145, 0.6);
    color: var(--accent-2);
}

.actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}

.btn {
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25);
}

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

.btn.secondary {
    background: rgba(60, 207, 145, 0.2);
    border-color: rgba(60, 207, 145, 0.5);
    color: var(--accent-2);
}

.btn.ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--muted);
}

.status {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    font-size: 13px;
}

.status[data-tone="error"] {
    border-color: rgba(240, 93, 94, 0.5);
    color: var(--danger);
}

.status[data-tone="success"] {
    border-color: rgba(60, 207, 145, 0.5);
    color: var(--accent-2);
}

.session-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 18px 0 16px;
}

.meta-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
}

.meta-label {
    display: block;
    font-size: 12px;
    color: var(--muted);
}

.meta-value {
    font-size: 14px;
    margin-top: 4px;
    display: block;
    font-family: "JetBrains Mono", monospace;
}

.chat-panel {
    background: rgba(8, 12, 20, 0.8);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    min-height: 220px;
    position: relative;
}

.chat-empty {
    color: var(--muted);
    font-size: 13px;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-bubble {
    padding: 12px 14px;
    border-radius: 14px;
    max-width: 85%;
    font-size: 14px;
    line-height: 1.4;
}

.chat-bubble.user {
    align-self: flex-end;
    background: rgba(246, 196, 69, 0.2);
    border: 1px solid rgba(246, 196, 69, 0.4);
}

.chat-bubble.assistant {
    align-self: flex-start;
    background: rgba(60, 207, 145, 0.15);
    border: 1px solid rgba(60, 207, 145, 0.4);
}

.chat-input {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.chat-input input {
    flex: 1;
}

@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        align-items: flex-start;
    }
}
