:root {
    color-scheme: light;
    --bg-start: #0f4c81;
    --bg-end: #1a8bb8;
    --surface: rgba(255, 255, 255, 0.9);
    --surface-strong: #ffffff;
    --text: #14213d;
    --muted: #5b6475;
    --primary: #0b84ff;
    --primary-dark: #065fc2;
    --border: rgba(15, 23, 42, 0.08);
    --shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
    --highlight: #e9f5ff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
    color: var(--text);
    display: flex;
    flex-direction: column;
}

body.focus-mode .section-card,
body.focus-mode .hero-card {
    box-shadow: 0 0 0 2px rgba(11, 132, 255, 0.18), var(--shadow);
}

nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(10, 16, 30, 0.92);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 10;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    padding: 0.65rem 1rem;
    border-radius: 999px;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.12);
}

.content {
    flex: 1;
    width: min(1120px, calc(100% - 32px));
    margin: 32px auto;
}

.page-shell {
    display: grid;
    gap: 24px;
}

.hero-card,
.section-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.hero-card {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 24px;
    padding: 32px;
}

.hero-text,
.section-card p,
.section-card li {
    color: var(--muted);
    line-height: 1.6;
}

.eyebrow {
    margin: 0 0 12px;
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    font-weight: 800;
    color: var(--primary);
}

h1,
h2,
h3 {
    margin-top: 0;
}

.hero-actions,
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.primary-action,
.secondary-action,
.ai-form button,
.quick-actions button {
    border: none;
    border-radius: 14px;
    padding: 0.9rem 1.2rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
}

.primary-action,
.ai-form button {
    background: var(--primary);
    color: white;
}

.secondary-action,
.quick-actions button {
    background: #eef5ff;
    color: var(--primary-dark);
}

.primary-action:hover,
.secondary-action:hover,
.ai-form button:hover,
.quick-actions button:hover {
    transform: translateY(-1px);
}

.hero-panel {
    background: linear-gradient(180deg, #0f172a, #1e293b);
    color: white;
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
}

.status-pill {
    align-self: flex-start;
    background: rgba(34, 197, 94, 0.18);
    color: #bbf7d0;
    border: 1px solid rgba(187, 247, 208, 0.22);
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 700;
}

.digital-clock {
    font-size: 2.9rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.panel-copy {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
}

.stats-grid,
.stack-grid,
.code-map-grid,
.ai-layout,
.command-panel {
    display: grid;
    gap: 16px;
}

.stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card,
.stack-item,
.code-map-card,
.command-block,
.ai-response-card {
    background: var(--surface-strong);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-dark);
}

.stat-label {
    color: var(--muted);
}

.section-card {
    padding: 28px;
}

.section-heading {
    margin-bottom: 20px;
}

.stack-grid,
.code-map-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stack-item span,
.command-label {
    display: inline-block;
    margin-top: 14px;
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.92rem;
}

.stack-item.highlight {
    background: var(--highlight);
    border-color: rgba(11, 132, 255, 0.28);
}

.code-map-card ul {
    padding-left: 18px;
    margin: 0;
}

.command-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 20px;
}

.command-block code {
    display: block;
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #0f172a;
    color: #dbeafe;
    overflow-x: auto;
}

.ai-layout {
    grid-template-columns: 1.1fr 0.9fr;
}

.ai-console,
.ai-response-card {
    min-height: 100%;
}

.ai-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.ai-form input {
    width: 100%;
    padding: 0.95rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    font-size: 1rem;
}

.response-label {
    margin: 0 0 12px;
    font-weight: 800;
    color: var(--primary-dark);
}

.ai-output {
    min-height: 120px;
    padding: 18px;
    border-radius: 16px;
    background: #eff6ff;
    color: #1e3a8a;
    line-height: 1.6;
}

.project-structure-tree {
    background: var(--surface-strong);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    overflow-x: auto;
}

.project-structure-root {
    margin: 0 0 10px;
    font-weight: 800;
    color: var(--primary-dark);
}

.project-structure-list {
    margin: 0;
    padding-left: 20px;
}

.project-structure-item {
    margin: 6px 0;
}

.structure-label {
    font-family: "Consolas", "Monaco", monospace;
    font-size: 0.92rem;
}

.structure-label.directory {
    color: #0f172a;
    font-weight: 700;
}

.structure-label.file {
    color: var(--muted);
}

.site-footer {
    padding: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.84);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 900px) {
    .hero-card,
    .ai-layout,
    .stack-grid,
    .code-map-grid,
    .command-panel,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .hero-card,
    .section-card {
        padding: 22px;
    }

    .ai-form {
        grid-template-columns: 1fr;
    }
}
