:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --accent-color: #10b981;
    /* Emerald Green */
    --accent-glow: rgba(16, 185, 129, 0.4);
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(15, 23, 42, 0.6);
    --ad-bg: rgba(0, 0, 0, 0.2);
    --font-main: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    background-image: radial-gradient(circle at 50% 0%, #1e293b 0%, #0f172a 100%);
    overflow-x: hidden;
}

/* Main Header Navigation */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 1.5rem !important;
}

.main-header .logo {
    font-size: 1rem !important;
}

.main-header .logo-icon {
    width: 28px;
    height: 28px;
    display: block;
    flex-shrink: 0;
}

.main-header nav ul {
    flex-wrap: wrap;
    gap: 0.75rem !important;
}

.main-header nav ul li a {
    font-size: 0.85rem !important;
    padding: 0.4rem 0.75rem;
    white-space: nowrap;
}

.main-header nav ul li a:hover {
    color: var(--accent-color) !important;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.app-container {
    display: flex;
    height: 100%;
    width: 100%;
}

/* Ad Spaces */
.ad-space {
    width: 250px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--glass-border);
    border-right: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.1);
    align-items: center;
    justify-content: center;
}

.ad-left {
    border-right: 1px solid var(--glass-border);
    border-left: none;
    display: none;
}

@media (min-width: 1024px) {
    .ad-left {
        display: flex;
    }
}

/* AdSense Styling */
.ad-space ins.adsbygoogle {
    display: block;
    width: 100%;
    min-height: 200px;
}

.ad-space ins.adsbygoogle[data-ad-format="auto"] {
    width: 100%;
    height: auto;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    padding: 2rem;
    position: relative;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    align-items: center;
    justify-content: center;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 2.5rem;
    width: 100%;
    max-width: 1400px;
    min-height: fit-content;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto 1fr auto;
    gap: 2rem;
    grid-template-areas:
        "header header"
        "display display"
        "controls breakdown"
        "footer footer";
}

.glass-panel:has(.guide-content):not(:has(.dashboard-controls)) {
    grid-template-columns: 1fr;
    grid-template-areas:
        "header"
        "guide-content"
        "footer";
}

.dashboard-header {
    grid-area: header;
    padding-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Main Navigation */
.main-navigation {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.nav-link {
    padding: 0.5rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: var(--font-main);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #cbd5e1;
}

.nav-link.active {
    background: var(--accent-color);
    color: #022c22;
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
}

.dashboard-display {
    grid-area: display;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 180px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.dashboard-controls {
    grid-area: controls;
    text-align: left;
    display: grid;
    grid-template-rows: auto 1fr;
    padding-right: 0;
    align-items: start;
    position: relative;
    width: 100%;
}

.dashboard-controls::after {
    content: '';
    position: absolute;
    right: -1rem;
    top: 4rem;
    bottom: 1.5rem;
    width: 1px;
    background: var(--glass-border);
}

.dashboard-controls h3 {
    font-size: 1rem;
    color: #cbd5e1;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    text-align: left;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    height: 2.5rem;
    margin-top: 0;
}

.dashboard-breakdown {
    grid-area: breakdown;
    display: grid;
    grid-template-rows: auto 1fr;
    padding-left: 0;
    align-items: start;
    align-self: stretch;
    width: 100%;
}

.dashboard-footer {
    grid-area: footer;
    border-top: 1px solid var(--glass-border);
    padding-top: 1.25rem;
    margin-top: 1rem;
}

.feedback-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.feedback-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

header h1 {
    font-weight: 800;
    font-size: 2.5rem;
    margin-bottom: 0;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

/* Controls */
.controls-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    margin-top: 0;
    text-align: left;
    align-items: stretch;
    padding-top: 0;
    grid-auto-rows: 1fr;
}

/* Match the height of breakdown-header (2.5rem) + margin-bottom (1.25rem) = 3.75rem total */
/* Add margin-top to controls-container to align with breakdown-grid */
.dashboard-controls h3 + .controls-container {
    margin-top: 0;
}

/* Ensure both headers have the same total height including margin-bottom */
.dashboard-controls h3 {
    box-sizing: border-box;
}

.breakdown-header {
    box-sizing: border-box;
}

.input-group {
    background: rgba(0, 0, 0, 0.25);
    padding: 1.25rem;
    border-radius: 14px;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: flex-start;
    align-items: flex-start;
    transition: all 0.2s ease;
    min-height: 100%;
    height: 100%;
    box-sizing: border-box;
}

.input-group:hover {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 0;
}

input,
select {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    color: var(--accent-color);
    font-size: 1.25rem;
    font-weight: 700;
    font-family: var(--font-main);
    transition: all 0.3s ease;
    width: 100%;
    outline: none;
}

input::placeholder {
    color: #64748b;
    font-weight: 400;
    font-size: 1rem;
}

select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2310b981' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right center;
    padding-right: 1.5rem;
}

input:focus,
select:focus {
    outline: none;
    color: var(--accent-color);
}

.input-group:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

option {
    background-color: var(--bg-color);
    color: white;
    padding: 0.5rem;
}

/* Settings Toggle */
.settings-toggle {
    margin-bottom: 1rem;
    text-align: right;
}

.btn-text {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: underline;
    transition: color 0.2s;
}

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

.hidden-settings {
    display: none;
    animation: fadeIn 0.3s ease;
}

.hidden-settings.show {
    display: grid;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.btn {
    padding: 0.875rem 1.75rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    flex: 1;
}

.btn.primary {
    background: var(--accent-color);
    color: #022c22;
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--accent-glow);
}

.btn.secondary {
    background: #ef4444;
    color: white;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.btn.secondary:disabled {
    background: #334155;
    color: #64748b;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.btn.outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: #cbd5e1;
}

.btn.outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: white;
}

/* Display */
.label {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.money-value {
    font-size: 4.5rem;
    font-weight: 800;
    color: var(--accent-color);
    text-shadow: 0 0 50px var(--accent-glow);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    margin: 0;
    text-align: center;
    width: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0 1rem;
    box-sizing: border-box;
}

.money-value.negative {
    color: #ef4444;
    text-shadow: 0 0 50px rgba(239, 68, 68, 0.5);
}

.time-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    letter-spacing: 2px;
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1;
    white-space: nowrap;
}

/* Target Progress */
.target-container {
    margin-top: 1rem;
    opacity: 1;
    transition: opacity 0.3s ease;
    width: 100%;
    max-width: 400px;
}

.target-container.hidden {
    opacity: 0;
    pointer-events: none;
}

.progress-bar-bg {
    height: 8px;
    background: #334155;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent-color);
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px var(--accent-glow);
}

.target-status {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 0.5rem;
}

#percentage-display {
    color: white;
    font-weight: 600;
}

/* Breakdown */
.breakdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    min-height: 2.5rem;
    height: 2.5rem;
    margin-top: 0;
}

.dashboard-breakdown h3 {
    font-size: 1rem;
    color: #cbd5e1;
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    text-align: left;
}

.net-gross-toggle {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 0.25rem;
    border: 1px solid var(--glass-border);
}

.toggle-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toggle-btn:hover {
    color: #cbd5e1;
}

.toggle-btn.active {
    background: var(--accent-color);
    color: #022c22;
    box-shadow: 0 0 10px var(--accent-glow);
}

.breakdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: stretch;
    margin-top: 0;
    grid-auto-rows: 1fr;
}

.breakdown-card {
    background: rgba(0, 0, 0, 0.25);
    padding: 1.25rem;
    border-radius: 14px;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: flex-start;
    align-items: flex-start;
    transition: all 0.2s ease;
    min-height: 100%;
    height: 100%;
    box-sizing: border-box;
}

.breakdown-card:hover {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}


.breakdown-label {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0;
}

.breakdown-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-color);
}

.breakdown-value.negative-value {
    color: #ef4444;
}

.breakdown-input {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--accent-color);
    font-size: 1.25rem;
    font-weight: 700;
    font-family: var(--font-main);
    width: 100%;
    text-align: left;
    padding: 0;
    transition: border-color 0.2s ease;
}

.breakdown-input:focus {
    outline: none;
    border-bottom-color: var(--accent-color);
}

.breakdown-input::placeholder {
    color: var(--accent-color);
    opacity: 0.7;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.tab-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.75rem 2rem;
    color: #94a3b8;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #cbd5e1;
}

.tab-btn.active {
    background: var(--accent-color);
    color: #022c22;
    border-color: var(--accent-color);
    box-shadow: 0 0 20px var(--accent-glow);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Guide Content Section */
.guide-content {
    grid-area: guide-content;
    width: 100%;
}

.content-guide-inner {
    color: #e2e8f0;
    line-height: 1.6;
    text-align: left;
    width: 100%;
}

.content-guide-inner h2 {
    color: var(--accent-color);
    font-size: 1.8rem;
    margin-bottom: 1.25rem;
    font-weight: 800;
}

.content-guide-inner h3 {
    color: #fff;
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.content-guide-inner p {
    margin-bottom: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
}

.content-guide-inner ul {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.content-guide-inner li {
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
}

.content-guide-inner strong {
    color: var(--accent-color);
    font-weight: 600;
}

.content-guide-inner em {
    color: #cbd5e1;
    font-style: italic;
}

.faq-item {
    margin-bottom: 1.5rem;
}

.faq-item strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.faq-item p {
    margin-bottom: 0;
    margin-top: 0.5rem;
}

/* Inflation Calculator Specific Styles */
.inflation-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.inflation-label {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    z-index: 1;
}

.inflation-value {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    font-variant-numeric: tabular-nums;
}

.inflation-value.negative {
    color: #ef4444;
    text-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
}


.breakdown-description {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 0.5rem;
    line-height: 1.4;
}

.glass-panel:has(.guide-content) {
    grid-template-columns: 1fr;
    grid-template-areas:
        "header"
        "guide-content"
        "footer";
}

.glass-panel:has(.dashboard-controls):has(.guide-content):not(:has(.dashboard-layout:has(.tab-content))) {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto auto auto;
    grid-template-areas:
        "header"
        "dashboard-controls"
        "display"
        "breakdown"
        "guide-content"
        "footer";
}

/* Inflation Calculator Layout - Force single column */
.glass-panel.dashboard-layout:has(.inflation-impact),
.glass-panel:has(.inflation-impact),
.glass-panel.dashboard-layout:has(#annual-salary) {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto auto auto auto auto !important;
    grid-template-areas:
        "header"
        "controls"
        "display"
        "breakdown"
        "inflation-impact"
        "footer" !important;
    width: 100% !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
}

/* Override grid-areas for inflation calculator elements */
.glass-panel:has(.inflation-impact) .dashboard-controls {
    grid-area: controls !important;
    width: 100% !important;
    padding-right: 0 !important;
    text-align: center !important;
}

.glass-panel:has(.inflation-impact) .dashboard-controls::after {
    display: none !important;
}

.glass-panel:has(.inflation-impact) .dashboard-controls h3 {
    text-align: center !important;
}

.glass-panel:has(.inflation-impact) .dashboard-display {
    grid-area: display !important;
    width: 100% !important;
}

.glass-panel:has(.inflation-impact) .dashboard-breakdown {
    grid-area: breakdown !important;
    width: 100% !important;
    padding-left: 0 !important;
}

.glass-panel:has(.inflation-impact) .inflation-impact {
    grid-area: inflation-impact !important;
    width: 100% !important;
}

.inflation-impact {
    grid-area: inflation-impact;
    margin-top: 2rem;
}

/* Tariff Calculator - full width within main content */
.glass-panel.tariff-calc-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    margin: 0;
}

/* Product price, Origin, Custom tariff in one row */
.tariff-calc-panel .controls-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.tariff-title {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.chip-btn {
    padding: 0.5rem 0.875rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--glass-border);
    color: #e2e8f0;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
}

.chip-btn:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-1px);
}

.tariff-calc-panel .dashboard-display {
    text-align: center;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    min-height: auto;
    overflow: visible;
}

.tariff-calc-panel .dashboard-display .tariff-output-label,
.tariff-calc-panel .dashboard-display .money-value,
.tariff-calc-panel .dashboard-display .tariff-cost {
    position: static;
    transform: none;
    width: auto;
}

.tariff-output-label {
    font-size: 0.9rem;
    color: #94a3b8;
    margin: 0;
}

.tariff-calc-panel .money-value {
    font-size: 2.5rem;
    margin: 0;
    line-height: 1.2;
}

.tariff-cost {
    color: #ef4444;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

.pass-through-group {
    margin-top: 0.5rem;
}

.pass-through-group input[type="range"] {
    width: 100%;
    margin-top: 0.5rem;
    accent-color: var(--accent-color);
}

.input-hint {
    display: block;
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.35rem;
}

.guide-content {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.fact-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 1.25rem;
    margin-top: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.fact-box strong {
    color: var(--accent-color);
}

/* Insights page: one panel per article */
.insights-panels {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
}

.insights-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.insights-badge {
    font-size: 0.75rem;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 12px;
}

.insight-card {
    padding: 1.5rem;
    text-align: left;
}

.insight-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.insight-link:hover {
    text-decoration: underline;
}

/* Insights Hub (News Hub) */
.insights-hub {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.insights-hub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.insights-date-heading {
    color: #94a3b8;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
}

.insights-date-heading:first-of-type {
    margin-top: 0;
}

.insights-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.insight-hub-card {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 1.5rem;
    text-align: left;
    transition: transform 0.2s, box-shadow 0.2s;
}

.insight-hub-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.5);
}

.insight-card-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.insight-card-title {
    color: #e2e8f0;
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
    line-height: 1.35;
}

.insight-card-summary {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0 0 0.75rem 0;
}

.insight-card-link {
    color: var(--accent-color);
    font-size: 0.85rem;
    font-weight: 600;
}

.insight-hub-card:hover .insight-card-link {
    text-decoration: underline;
}

/* Article pages: centered in main content area */
.main-content:has(.article-panel) {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.article-panel {
    width: 100%;
    max-width: 800px;
    margin: 2rem auto;
    margin-left: auto;
    margin-right: auto;
    padding: 2.5rem 2rem;
    box-sizing: border-box;
    display: block;
}

/* Header og overskrifter sentrert */
.article-panel article header {
    text-align: center;
}

.article-panel article h1,
.article-panel article h3 {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* Brødtekst venstrejustert, men i en sentrert kolonne for lesbarhet */
.article-panel article > div {
    text-align: left;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* Privacy Page Styles */
.privacy-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    overflow-y: auto;
    max-height: 90vh;
}

.privacy-text {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 2rem;
    text-align: left;
}

.privacy-text h2 {
    color: var(--accent-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.privacy-text p {
    margin-bottom: 1rem;
}

.privacy-text a {
    color: var(--accent-color);
    text-decoration: none;
}

.privacy-text a:hover {
    text-decoration: underline;
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    color: var(--text-color);
    font-size: 0.9rem;
    max-width: 600px;
}

.cookie-btn {
    background: var(--accent-color);
    color: #022c22;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px var(--accent-glow);
}

.cookie-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* Responsive */
@media (max-width: 1024px) {
    .glass-panel {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "display"
            "controls"
            "breakdown"
            "footer";
        max-width: 700px;
        height: auto;
        max-height: none;
        overflow-y: visible;
        padding: 2rem;
        gap: 1.5rem;
    }

    .glass-panel:has(.guide-content) {
        grid-template-areas:
            "header"
            "guide-content"
            "footer";
    }

    .main-content {
        height: auto;
        overflow-y: auto;
        padding: 1.5rem;
    }

    .dashboard-controls {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        padding-bottom: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .dashboard-controls::after {
        display: none;
    }

    .dashboard-breakdown {
        padding-left: 0;
        padding-top: 1.5rem;
    }

    .breakdown-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--glass-border);
    }

    .money-value {
        font-size: 3.5rem;
    }
    
    .time-value {
        font-size: 1.25rem;
        top: 0.75rem;
        right: 0.75rem;
    }
}

@media (max-width: 768px) {
    .main-header {
        flex-direction: row !important;
        align-items: center !important;
        padding: 1rem !important;
        position: relative;
    }

    .main-header .logo {
        font-size: 0.9rem !important;
        flex: 1;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .main-header nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-top: 1px solid var(--glass-border);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        width: 100%;
    }

    .main-header nav.active {
        max-height: 500px;
        transition: max-height 0.3s ease-in;
    }

    .main-header nav ul {
        flex-direction: column !important;
        gap: 0 !important;
        width: 100%;
        padding: 1rem 0;
    }

    .main-header nav ul li {
        width: 100%;
    }

    .main-header nav ul li a {
        display: block;
        width: 100%;
        padding: 0.75rem 1rem !important;
        text-align: left;
        background: transparent;
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 0;
        font-size: 0.9rem !important;
    }

    .main-header nav ul li:last-child a {
        border-bottom: none;
    }

    .main-header nav ul li a:hover {
        background: rgba(255, 255, 255, 0.05);
        color: var(--accent-color) !important;
    }

    .app-container {
        flex-direction: column;
        overflow-y: auto;
    }

    /* Hide left ad space on mobile */
    .ad-left {
        display: none;
    }

    /* Show right ad space at bottom on mobile */
    .ad-space {
        width: 100%;
        padding: 1rem;
        flex-direction: row;
        border: none;
        border-top: 1px solid var(--glass-border);
        order: 3; /* Place after main content */
        min-height: auto;
        max-height: 120px;
        justify-content: center;
    }

    .ad-space ins.adsbygoogle {
        width: 100%;
        max-width: 100%;
        min-height: 100px;
        max-height: 100px;
    }

    .main-content {
        order: 1; /* Ensure main content comes first */
        padding: 1rem;
        padding-bottom: 0.5rem;
        height: auto;
        overflow-y: auto;
        width: 100%;
        flex: 1;
    }

    .glass-panel {
        padding: 1.5rem;
        gap: 1.5rem;
        max-height: none;
        width: 100%;
        max-width: 100%;
    }

    .money-value {
        font-size: 2.5rem;
        padding: 0 0.5rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .time-value {
        font-size: 1rem;
        top: 0.5rem;
        right: 0.5rem;
        letter-spacing: 1px;
    }

    .dashboard-display {
        padding: 3rem 1rem 1.5rem 1rem;
        min-height: 140px;
        position: relative;
    }

    .dashboard-header {
        text-align: center;
    }

    .dashboard-header h1 {
        font-size: 1.75rem;
        line-height: 1.2;
    }

    .dashboard-controls {
        padding-bottom: 1.5rem;
        margin-bottom: 1.5rem;
        border-bottom: 1px solid var(--glass-border);
    }

    .dashboard-controls h3 {
        text-align: center;
        margin-bottom: 1rem;
    }

    .controls-container {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .dashboard-breakdown {
        padding-top: 0;
    }

    .breakdown-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1rem;
        gap: 1rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--glass-border);
    }

    .breakdown-header h3 {
        margin: 0;
        flex: 1;
    }

    .net-gross-toggle {
        flex-shrink: 0;
        width: auto;
    }

    .breakdown-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .input-group {
        padding: 1rem;
    }

    .breakdown-card {
        padding: 1rem;
    }

    .action-buttons {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1rem;
    }

    .btn {
        width: 100%;
    }

    .cookie-banner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem;
    }

    .cookie-content {
        font-size: 0.85rem;
    }

    .tab-navigation {
        margin-bottom: 1.5rem;
        padding: 0 1rem;
        gap: 0.75rem;
    }

    .tab-btn {
        padding: 0.625rem 1.5rem;
        font-size: 0.9rem;
    }


    .content-guide-inner {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .content-guide-inner h2 {
        font-size: 1.5rem;
    }

    .content-guide-inner h3 {
        font-size: 1.2rem;
        margin-top: 1.5rem;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding: 0.75rem !important;
    }

    .main-header .logo {
        font-size: 0.85rem !important;
    }

    .main-header nav ul li a {
        font-size: 0.8rem !important;
        padding: 0.6rem 0.75rem !important;
    }

    .main-content {
        padding: 0.75rem;
    }

    .glass-panel {
        padding: 1.25rem;
        gap: 1.25rem;
        border-radius: 20px;
    }

    .dashboard-header h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .main-navigation {
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    .tab-navigation {
        margin-top: 0.25rem;
        gap: 0.5rem;
    }

    .money-value {
        font-size: 2.5rem;
    }

    .inflation-label {
        font-size: 0.75rem;
        bottom: 0.5rem;
    }

    .money-value {
        font-size: 2rem;
        padding: 0 0.25rem;
    }

    .time-value {
        font-size: 0.9rem;
        top: 0.5rem;
        right: 0.5rem;
        letter-spacing: 1px;
    }

    .dashboard-display {
        padding: 2.5rem 0.75rem 1rem 0.75rem;
        min-height: 120px;
    }

    .dashboard-controls h3 {
        font-size: 0.9rem;
    }

    .controls-container {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .tariff-calc-panel .controls-container {
        grid-template-columns: 1fr;
    }

    .input-group,
    .breakdown-card {
        padding: 0.875rem;
    }

    .input-group label,
    .breakdown-label {
        font-size: 0.7rem;
    }

    input,
    select,
    .breakdown-value {
        font-size: 1.1rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .breakdown-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .breakdown-header h3 {
        font-size: 0.9rem;
        margin: 0;
    }

    .net-gross-toggle {
        flex-shrink: 0;
        width: auto;
    }

    .toggle-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }

    .breakdown-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .tab-navigation {
        margin-bottom: 1rem;
        padding: 0 0.75rem;
        gap: 0.5rem;
    }

    .tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }


    .content-guide-inner {
        padding: 1.25rem;
        border-radius: 16px;
    }

    .content-guide-inner h2 {
        font-size: 1.3rem;
    }

    .content-guide-inner h3 {
        font-size: 1.1rem;
        margin-top: 1.25rem;
    }

    .content-guide-inner p,
    .content-guide-inner li {
        font-size: 0.9rem;
    }
}