:root {
    --primary: #64748B;
    --secondary: #94A3B8;
    --accent: #38BDF8;
    --background: #0F1219;
    --glass-bg: rgba(15, 18, 25, 0.7);
    --glass-border: rgba(148, 163, 184, 0.15);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    --success: #10b981;
    --warning: #f59e0b;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    min-height: 100vh;
}

/* Abstract modern background */
.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.1), transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(100, 116, 139, 0.15), transparent 40%);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2.5rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-muted);
}

.layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 2rem;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

h2,
h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

textarea {
    width: 100%;
    height: 250px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #e2e8f0;
    padding: 1rem;
    font-family: monospace;
    font-size: 0.85rem;
    resize: vertical;
    transition: border-color 0.2s;
}

textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

input[type="range"] {
    flex: 1;
    accent-color: var(--accent);
}

.input-val {
    min-width: 48px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-family: monospace;
    color: var(--accent);
    font-weight: bold;
}

.btn {
    width: 100%;
    padding: 0.75rem 1rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn.small {
    width: auto;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

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

.primary-btn:hover {
    background: #7dd3fc;
    transform: translateY(-1px);
}

.outline-btn {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--text-main);
}

.outline-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.tips-list {
    list-style: none;
}

.tips-list li {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 0.5rem;
}

.tips-list li.warn::before {
    content: '⚠️';
}

.tips-list li.good::before {
    content: '✅';
}

.summary-cards {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.glass-card {
    flex: 1;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.card-label {
    font-size: 0.85rem;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
}

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

.card-divider {
    width: 2px;
    height: 40px;
    background: var(--glass-border);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.cost-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.cost-tier {
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    text-align: center;
    width: 45%;
    transition: transform 0.2s;
}

.cost-tier.hosted {
    background: rgba(56, 189, 248, 0.05);
    border-color: rgba(56, 189, 248, 0.3);
}

.cost-tier.self-hosted {
    background: rgba(148, 163, 184, 0.05);
}

.tier-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.tier-price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.hosted .tier-price {
    color: var(--accent);
}

.tier-details {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.vs-badge {
    background: var(--glass-border);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--secondary);
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.9rem;
}

th {
    color: var(--secondary);
    font-weight: 600;
}

td {
    color: var(--text-main);
}

.empty-row td {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}

@media (max-width: 1024px) {
    .layout {
        grid-template-columns: 1fr;
    }
}