/* style.css - Exact Screenshot Match (Unit Converter Variant) */

:root {
    /* Dark Mode (Flumi exact colors) */
    --bg-page: #0a0e17;       
    --bg-card: #141c2b;       /* Slightly lighter blue for calc box */
    --bg-input: #101622;      /* Inputs/grids */
    --border-card: #1f2a40;
    --border-input: #2a3855;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-blue: #3b82f6;   
    --accent-blue-hover: #2563eb;
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;  /* Match the 0,001 color */
    
    --logo-color: #0ea5e9;    
    --logo-bg: rgba(14, 165, 233, 0.1);
    
    --gradient-hero: linear-gradient(90deg, #38bdf8, #a78bfa, #34d399);
}

[data-theme="light"] {
    --bg-page: #f0f4f8;       
    --bg-card: #ffffff;       
    --bg-input: #f8fafc;      
    --border-card: #e2e8f0;
    --border-input: #cbd5e1;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --accent-green: #059669; 
}

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

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    font-size: 16px;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.text-white { color: var(--text-primary); }
.text-green { color: var(--accent-green) !important; font-weight: 700; }
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }

/* Icon Colors */
.icon-blue { color: #60a5fa; }
.icon-purple { color: #a78bfa; }
.icon-pink { color: #f472b6; }
.icon-red { color: #f87171; }
.icon-green { color: #34d399; }
.icon-yellow { color: #fbbf24; }
.icon-cyan { color: #22d3ee; }
.icon-orange { color: #fb923c; }
.icon-brown { color: #a16207; }
.icon-white { color: #e2e8f0; }

/* Top Navigation */
.top-nav {
    background-color: var(--bg-page);
    border-bottom: 1px solid var(--border-card);
    position: sticky; top: 0; z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left, .nav-right { display: flex; align-items: center; gap: 2rem; }

/* Logo */
.logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; cursor: pointer; }
.logo-icon-wrapper {
    width: 30px; height: 30px; border-radius: 50%;
    background-color: var(--logo-bg); display: flex; align-items: center; justify-content: center;
    color: var(--logo-color); font-size: 1.1rem; border: 1px solid rgba(14, 165, 233, 0.3);
}
.logo-text { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.5px; color: var(--logo-color); }

/* Menu Links */
.main-menu { display: flex; gap: 1.5rem; }
.main-menu a {
    color: var(--text-secondary); text-decoration: none; font-weight: 700;
    font-size: 0.75rem; letter-spacing: 1px; text-transform: uppercase;
}
.main-menu a:hover, .main-menu a.active { color: var(--text-primary); }

/* Language Dropdown */
.nav-lang-dropdown {
    background: transparent; border: 1px solid var(--border-input); color: var(--text-secondary);
    padding: 0.4rem 0.6rem; border-radius: 6px; font-size: 0.8rem; font-weight: 600; cursor: pointer; outline: none;
}
.nav-lang-dropdown option { background: var(--bg-card); color: var(--text-primary); }

/* Fancy Oval Theme Toggle */
.theme-switch {
    width: 54px; height: 28px; border-radius: 20px; background-color: var(--border-input);
    border: 1px solid var(--border-card); position: relative; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 0 6px;
    color: var(--text-secondary); font-size: 0.75rem; transition: background-color 0.3s;
}
.switch-handle {
    position: absolute; left: 4px; top: 3px; width: 20px; height: 20px; border-radius: 50%;
    background-color: var(--accent-blue); display: flex; align-items: center; justify-content: center; color: white;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-theme="light"] .theme-switch { background-color: #cbd5e1; }
[data-theme="light"] .switch-handle { transform: translateX(24px); background-color: white; color: #f59e0b; border: 1px solid #cbd5e1; }
[data-theme="dark"] .light-icon { display: none; }
[data-theme="light"] .dark-icon { display: none; }

/* Main Content */
.main-content { max-width: 1200px; margin: 0 auto; padding: 0 2rem 4rem 2rem; }
.text-center { text-align: center; }

/* Hero */
.hero { padding: 4rem 0 2rem 0; }
.badge-pill {
    background: rgba(14, 165, 233, 0.1); border: 1px solid rgba(14, 165, 233, 0.2);
    padding: 0.35rem 1.2rem; border-radius: 20px; font-size: 0.65rem; font-weight: 700;
    letter-spacing: 1.5px; color: var(--logo-color); margin-bottom: 1.5rem; display: inline-flex; align-items: center; gap: 0.5rem;
}
.hero h1 { font-size: 3.5rem; font-weight: 900; line-height: 1.2; margin-bottom: 1.5rem; letter-spacing: -1.5px; }
.gradient-text { background: var(--gradient-hero); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.subtitle { color: var(--text-secondary); font-size: 0.95rem; max-width: 600px; margin: 0 auto; font-weight: 500;}

/* Layout */
.content-grid { display: block; max-width: 850px; margin: 0 auto; }
.left-main-column { display: flex; flex-direction: column; gap: 2rem; width: 100%; min-width: 0; }

/* Ad Placeholders */
.ad-wrapper { display: flex; flex-direction: column; align-items: center; }
.center-ad { margin-bottom: 2rem; }
.ad-label { font-size: 0.65rem; color: var(--text-muted); letter-spacing: 2px; margin-bottom: 0.5rem; text-transform: uppercase; }
.ad-banner { background: var(--bg-card); border: 1px dashed var(--border-input); border-radius: 8px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 1rem; color: var(--text-secondary); width: 100%;}
.ad-banner strong { color: var(--text-primary); font-size: 0.9rem; display: block; margin-bottom: 0.2rem; }
.ad-banner p { font-size: 0.75rem; }
.ad-red-icon { font-size: 1.2rem; margin-bottom: 0.5rem; color: #f43f5e; }
.ad-leaderboard { max-width: 728px; height: 90px; }
.ad-in-article { height: 120px; }
.ad-rectangle { height: 250px; }
.ad-halfpage { height: 600px; }
.sidebar-sticky { position: sticky; top: 5rem; }

/* Calculator Card */
.calc-card {
    background-color: var(--bg-card); border: 1px solid var(--border-card);
    border-radius: 16px; padding: 1.5rem 2rem;
}

/* Category Pills Inside Card */
.calc-categories {
    display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 2rem; border-bottom: 1px solid var(--border-card); padding-bottom: 1.5rem;
}
.cat-pill {
    background: transparent; border: 1px solid var(--border-input); color: var(--text-primary);
    padding: 0.6rem 1.2rem; border-radius: 8px; font-size: 0.8rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 0.5rem; transition: all 0.2s ease; font-family: inherit;
}
.cat-pill.active { background-color: var(--accent-blue); border-color: var(--accent-blue); color: white; }
.cat-pill.active i { color: white !important; }

/* Inputs Row: VON - Swap - NACH */
.calc-inputs-row { display: flex; align-items: flex-end; gap: 1.5rem; margin-bottom: 1.5rem; }
.input-col { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.input-col label { font-size: 0.65rem; font-weight: 700; letter-spacing: 1px; color: var(--text-muted); text-transform: uppercase; }

.col-stack { display: flex; flex-direction: column; gap: 0.5rem; }
.huge-select, .huge-input {
    background-color: var(--bg-input); border: 1px solid var(--border-input); color: var(--text-primary);
    padding: 0 1rem; border-radius: 8px; font-size: 0.95rem; font-family: inherit; outline: none; height: 48px; width: 100%;
}
.huge-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2394a3b8%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"); background-repeat: no-repeat; background-position: right 1rem top 50%; background-size: 0.65rem auto; font-weight: 600; }
.huge-input { font-weight: 500; }
.result-highlight { border: 1px solid rgba(16, 185, 129, 0.4); background: rgba(16, 185, 129, 0.05); }

/* Removing spinners */
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.swap-col { display: flex; align-items: center; justify-content: center; height: 100px; }
.swap-btn {
    width: 44px; height: 44px; border-radius: 50%; background-color: var(--bg-card);
    border: 1px solid var(--border-input); color: var(--text-secondary); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1rem; transition: all 0.2s ease;
}
.swap-btn:hover { color: var(--text-primary); border-color: var(--text-primary); }

/* Huge Result Block */
.calc-result-banner {
    background-color: var(--bg-input); border: 1px solid var(--border-input); border-radius: 12px;
    padding: 1.5rem 2rem; display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem;
}
.result-massive { font-size: 2.2rem; font-weight: 900; color: var(--text-primary); margin-bottom: 0.2rem; line-height: 1.1; }
.result-formula { font-size: 0.8rem; color: var(--text-secondary); }
.copy-btn-outline {
    background: transparent; border: 1px solid var(--border-input); color: var(--text-secondary);
    padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.75rem; font-weight: 700; cursor: pointer; transition: all 0.2s ease;
}
.copy-btn-outline:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-primary); }

/* Quick Convert Grid (The small square boxes) */
.quick-convert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.8rem; }
.qc-box {
    background-color: var(--bg-input); border: 1px solid var(--border-input); border-radius: 8px;
    padding: 0.8rem; display: flex; flex-direction: column; gap: 0.4rem;
}
.qc-unit { font-size: 0.65rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.qc-val { font-size: 0.95rem; font-weight: 800; color: var(--text-primary); word-break: break-all;}

/* Weitere Rechner - Grid */
.weitere-rechner-section { margin-top: 1rem; }
.section-title { font-size: 0.75rem; font-weight: 700; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 1.5rem; text-transform: uppercase; }
.rechner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
.small-card {
    background-color: var(--bg-card); border: 1px solid var(--border-card); border-radius: 12px;
    padding: 1.2rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.8rem; transition: transform 0.2s ease; cursor: pointer;
}
.small-card:hover { transform: translateY(-3px); border-color: var(--border-input); }
.sc-icon { font-size: 1.5rem; }
.small-card h4 { font-size: 0.85rem; font-weight: 800; }
.small-card p { font-size: 0.7rem; color: var(--text-muted); line-height: 1.4; }

/* Footer */
.site-footer {
    display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 3rem 0; border-top: 1px solid var(--border-card); margin-top: 4rem; text-align: center; background-color: var(--bg-card);
}
.footer-logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 800; font-size: 1.2rem; color: var(--logo-color); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.8rem; font-weight: 600; }
.footer-copy { color: var(--text-muted); font-size: 0.75rem; margin-top: 1rem;}

/* Responsive Overrides */
@media (max-width: 1024px) {
    .content-grid { grid-template-columns: 1fr; }
    .right-sidebar { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
    .hero h1 { font-size: 2.8rem; }
}

@media (max-width: 768px) {
    #main-nav-links { display: none; }
    .calc-inputs-row { flex-direction: column; align-items: stretch; gap: 1rem; }
    .swap-col { height: auto; transform: rotate(90deg); margin: 0.5rem 0; }
    .calc-result-banner { flex-direction: column; text-align: center; gap: 1rem; align-items: stretch;}
    .result-right { text-align: center; }
    .copy-btn-outline { width: 100%; }
}
