/* 08-ai-mcp-evals — dark theme stylesheet */
/* Dark theme stylesheet (shares TechToday design tokens) */
:root {
    --bg: #121212;
    --bg-elevated: #1e1e1e;
    --bg-elevated-2: #2a2a2a;
    --border: #2c2c2c;
    --text: #e0e0e0;
    --text-muted: #9e9e9e;
    --text-faint: #757575;
    --accent: #90caf9;
    --primary: #1565c0;
    --primary-hover: #1976d2;
    --danger: #ef9a9a;
    --success: #4caf50;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a {
    color: var(--accent);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: 90%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header / Nav */
header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--border);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--text);
}

.brand:hover {
    text-decoration: none;
}

.brand .logo {
    width: 24px;
    height: 24px;
    display: inline-block;
    background: url('logo.svg') no-repeat center / contain;
    flex-shrink: 0;
}

.nav-back-link {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.nav-back-link:hover {
    color: var(--text);
}

/* Project Shell & App Header */
.project-shell {
    padding: 1rem 0 2rem;
}

.app-header {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(144, 202, 249, 0.12);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.brand-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--accent);
    margin: 0;
}

.brand-tagline {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-badge {
    background: rgba(76, 175, 80, 0.12);
    color: #a5d6a7;
    border: 1px solid rgba(76, 175, 80, 0.25);
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.825rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.85);
    }
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
    counter-reset: project-card;
}

.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.9rem 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    counter-increment: project-card;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-break: break-word;
}

.card-half {
    grid-column: span 2;
    min-width: 0;
}

.card-wide,
.card-full {
    grid-column: 1 / -1;
    min-width: 0;
}

.card h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.card h2::before {
    content: counter(project-card);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border: 1px solid #4caf50;
    border-radius: 50%;
    color: #ff9800;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1;
}

.card-title {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* Green ⓘ info icon */
.info-link {
    margin-left: auto;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #4caf50;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: color 0.15s ease, background 0.15s ease;
}

.info-link:hover,
.info-link:focus-visible {
    color: #ff9800;
    background: rgba(255, 152, 0, 0.12);
    text-decoration: none;
}

.info-link::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    right: 0;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--bg-elevated-2);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateY(2px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 5;
}

.info-link:hover::after,
.info-link:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
}

.card p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.card p.card-concept {
    color: #ffd54f;
    font-size: 1rem;
}

.card p code {
    background: var(--bg-elevated-2);
    padding: 1px 5px;
    border-radius: 3px;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--accent);
}

/* Preset rows & chips */
.preset-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

.preset-label {
    font-size: 0.72rem;
    color: var(--text-faint);
    font-weight: 500;
}

.preset-chip {
    background: var(--bg-elevated-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 3px;
    cursor: pointer;
    text-transform: none;
    font-weight: 400;
    letter-spacing: normal;
    box-shadow: none;
}

.preset-chip:hover {
    border-color: var(--accent);
    color: var(--text);
    background: var(--bg-elevated-2);
}

.preset-chip.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(144, 202, 249, 0.14);
    font-weight: 500;
}

/* Dropdown row for choices */
.options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.option select {
    background: var(--bg-elevated-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 8px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    color: var(--text);
    cursor: pointer;
    outline: none;
}

.option select:hover,
.option select:focus {
    border-color: var(--accent);
}

/* Form controls */
input[type="text"],
input[type="number"],
textarea {
    width: 100%;
    padding: 8px 0;
    border: none;
    border-bottom: 1px solid #424242;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
    background: transparent;
    outline: none;
}

textarea {
    resize: vertical;
    line-height: 1.5;
}

input[type="text"]::placeholder,
input[type="number"]::placeholder,
textarea::placeholder {
    color: #616161;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus {
    border-bottom-color: var(--accent);
}

button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    align-self: flex-start;
}

button:hover {
    background: var(--primary-hover);
}

button:disabled {
    background: #424242;
    color: var(--text-faint);
    cursor: not-allowed;
    box-shadow: none;
}

/* Results */
.result {
    display: none;
    font-size: 1rem;
    line-height: 1.6;
    color: #bdbdbd;
    background: var(--bg-elevated-2);
    border-left: 3px solid var(--primary);
    padding: 10px 12px;
    white-space: pre-wrap;
    border-radius: 2px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.result.visible {
    display: block;
}

.result.error {
    border-left-color: var(--danger);
    color: var(--danger);
}

.validation {
    font-size: 0.75rem;
    color: var(--danger);
    margin-top: -6px;
}

.validation:empty {
    display: none;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

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

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 1rem 0;
    text-align: center;
    color: var(--text-faint);
    font-size: 0.8125rem;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .app-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .header-status {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 0 0.5rem;
    }
    .brand-wrapper {
        align-items: flex-start;
        gap: 12px;
    }
    .brand-tagline {
        font-size: 1rem;
    }
    .brand-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    .grid {
        grid-template-columns: 1fr;
    }
    .card-half,
    .card-wide,
    .card-full {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .project-shell {
        padding: 0.35rem 0 1rem;
    }

    .app-header {
        padding: 10px 14px;
        margin-bottom: 12px;
        border-radius: var(--radius-sm);
        gap: 8px;
    }

    .brand-wrapper {
        align-items: center;
        gap: 10px;
    }

    .brand-icon {
        width: 32px;
        height: 32px;
        font-size: 18px;
        border-radius: var(--radius-sm);
        flex-shrink: 0;
    }

    .brand-title {
        font-size: 1.15rem;
    }

    .brand-tagline {
        font-size: 1rem;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .grid {
        gap: 12px;
    }

    .card {
        padding: 12px 14px;
        margin-bottom: 12px;
        border-radius: var(--radius-sm);
    }

    .card h2 {
        font-size: 1.05rem;
        margin-bottom: 6px;
    }

    .card-concept {
        font-size: 1rem;
        margin-bottom: 6px;
        line-height: 1.5;
    }

    .card p {
        font-size: 1rem;
        margin-bottom: 8px;
        line-height: 1.5;
    }

    .preset-row {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.3rem;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .preset-row::-webkit-scrollbar {
        display: none;
    }

    .preset-chip {
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 0.75rem;
        padding: 2px 7px;
    }

    .options {
        flex-direction: column;
        gap: 6px;
    }

    button {
        padding: 0.45rem 1rem;
        font-size: 1rem;
    }

    input[type="text"],
    textarea,
    select {
        font-size: 1rem;
        padding: 0.5rem 0.65rem;
    }

    footer {
        margin-top: 14px;
        padding: 0.75rem 0;
    }
}

