/* XBILL - Modern Plain CSS */
:root {
    --bg-primary: #0a1118;
    --bg-surface: #101c28;
    --bg-card: rgba(20, 36, 52, 0.7);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --accent: #10b981;
    --accent-hover: #059669;
    --accent-glow: rgba(16, 185, 129, 0.35);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.18);
    --success: #10b981;
    --warning: #f59e0b;
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

[data-theme="light"] {
    --bg-primary: #f0fdf4;
    --bg-surface: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.9);
    --text-main: #064e3b;
    --text-muted: #374151;
    --text-dim: #6b7280;
    --accent: #059669;
    --accent-hover: #047857;
    --accent-glow: rgba(5, 150, 105, 0.2);
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
    --success: #059669;
    --warning: #d97706;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-stack);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.page-container {
    max-width: 1050px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* Navigation */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    margin-bottom: 2.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.brand-badge {
    background: var(--accent);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    letter-spacing: 0.05em;
}

.brand-title {
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.brand-divider {
    color: var(--text-dim);
}

.brand-sub {
    color: var(--accent);
    font-weight: 700;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--border-hover);
}

.status-indicator-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    text-decoration: none;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
}

.status-dot.pulse {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(0.95); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 8px var(--success); }
    100% { transform: scale(0.95); opacity: 0.7; }
}

/* Hero Section */
.hero-section {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-bottom: auto;
}

.hero-content {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1rem 1rem;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 1.25rem;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, var(--text-main) 40%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-main);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-hover);
    transform: translateY(-1px);
}

/* Health Probe Card */
.health-response-card {
    margin-top: 1.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.2rem;
    text-align: left;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.card-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.badge-latency {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    font-family: var(--font-mono);
}

.code-block {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-main);
    overflow-x: auto;
    white-space: pre-wrap;
    max-height: 240px;
}

/* Invoice Demo Section */
.calc-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.calc-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.calc-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-input {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    border-color: var(--accent);
}

.calc-summary {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    align-items: flex-end;
}

.summary-line {
    display: flex;
    gap: 1.5rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.summary-line.total {
    font-size: 1.2rem;
    color: var(--accent);
    margin-top: 0.5rem;
    border-top: 1px dashed var(--border-color);
    padding-top: 0.5rem;
}

/* Metrics Section */
.metrics-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.metric-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.metric-item:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.metric-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.metric-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    word-break: break-word;
}

.metric-value.highlight {
    color: var(--accent);
}

.metric-value.monospace {
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.text-success { color: var(--success); }
.text-warning { color: var(--warning); }

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.tech-pill {
    font-size: 0.78rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-weight: 600;
}

/* Footer */
.site-footer {
    text-align: center;
    padding-top: 3rem;
    font-size: 0.85rem;
    color: var(--text-dim);
}

.footer-sub {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}
