:root {
    --bg-color: #0f172a;
    --surface-color: rgba(30, 41, 59, 0.7);
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --accent: #10b981;
    --accent-2: #f43f5e;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border: rgba(148, 163, 184, 0.15);
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --radius-lg: 1.25rem;
    --radius-md: 0.75rem;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%);
}

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

/* Header & Nav */
header {
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

nav a:hover,
nav a.active {
    color: var(--primary);
}

/* Glass Card */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(to bottom, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

p.subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

/* Footer */
footer {
    margin-top: auto;
    padding: 2rem 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Grid for Calculators */
.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.calculator-card {
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.calculator-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
}

.icon-box {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.calculator-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.calculator-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Input Groups */
.input-group {
    margin-bottom: 1.5rem;
    position: relative;
}

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

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--glass);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s ease;
}

.input-group input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.input-group .unit {
    position: absolute;
    right: 1rem;
    top: 2.3rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.input-group small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Toggle Switch */
.toggle-switch {
    display: inline-flex;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0.25rem;
    gap: 0.25rem;
}

.toggle-switch button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: calc(var(--radius-md) - 4px);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.toggle-switch button.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Results Display */
.result-item.big {
    background: rgba(99, 102, 241, 0.05);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    border: 1px dashed var(--primary);
}

.result-item.big .label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.result-item.big .value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.detail-row.highlight {
    border-bottom: none;
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th,
.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: rgba(255, 255, 255, 0.03);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.data-table td.highlight {
    color: var(--accent);
    font-weight: 600;
}

.projection-chart {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    min-height: 180px;
    background: rgba(255, 255, 255, 0.02);
    overflow-x: auto;
}

.projection-bar-item {
    min-width: 28px;
    height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
}

.projection-bar-wrap {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: flex-end;
}

.projection-bar {
    width: 100%;
    border-radius: 8px 8px 2px 2px;
    background: linear-gradient(180deg, var(--accent), var(--primary));
    transform-origin: bottom;
    animation: growBar 0.5s ease;
}

.projection-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

@keyframes growBar {
    from {
        transform: scaleY(0);
    }

    to {
        transform: scaleY(1);
    }
}

.seo-assist-block h3 {
    margin-bottom: 0.75rem;
}

.faq-list details {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.6rem;
    background: rgba(255, 255, 255, 0.02);
}

.faq-list summary {
    cursor: pointer;
    font-weight: 600;
}

.faq-list p {
    margin-top: 0.55rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.related-link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.related-link-list a {
    display: inline-flex;
    padding: 0.45rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.85rem;
}

.related-link-list a:hover {
    border-color: var(--primary);
}

.result-share-card pre {
    white-space: pre-wrap;
    word-break: break-word;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.8rem;
    margin: 0.75rem 0 0.9rem;
    color: var(--text-secondary);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.83rem;
    line-height: 1.5;
}

.table-explanation {
    white-space: pre-line;
    line-height: 1.8;
}

@media (max-width: 900px) {
    .container {
        padding: 1.25rem;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    nav ul {
        gap: 0.75rem 1rem;
    }

    nav a {
        font-size: 0.9rem;
    }

    h1 {
        font-size: 2rem;
    }

    .glass-card {
        padding: 1.25rem;
    }

    .result-item.big .value {
        font-size: 1.6rem;
    }

    .projection-chart {
        min-height: 160px;
    }
}

/* Hidden Utility */
.hidden {
    display: none !important;
}

/* Transitions */
#app-content>* {
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* AdSense Sidebars */
.main-layout-wrapper {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
    margin: 0 auto;
}

.sidebar-ad {
    width: 160px;
    min-width: 160px;
    margin-top: 4rem;
    position: sticky;
    top: 2rem;
    height: fit-content;
}

@media (max-width: 1400px) {
    .sidebar-ad {
        display: none;
    }
}

.adsbygoogle {
    min-height: 90px; /* Standard minimum for most display ads */
}
