/* ================= THEME: iLoveTools Style ================= */
:root {
    /* Brand Colors */
    --brand-red: #e5322d;
    --brand-red-hover: #c9211d;
    --brand-dark: #33333b;
    --text-gray: #6d6d76;
    --bg-body: #f4f7f6;
    --bg-card: #ffffff;
    --border-light: #e6e6e6;
    --border: #e6e6e6;
    --shadow: 0 4px 12px rgba(0,0,0,0.05);
    
    /* Chart Colors (Mortgage) */
    --mg-chart-blue: #33333b;
    --mg-chart-green: #e5322d;
    --mg-chart-red: #ff9800;
    --mg-chart-cyan: #9e9e9e;
    
    /* Status Colors */
    --success: #2ecc71;
    --warning: #f39c12;
    --error: #e74c3c;
    --info: #3498db;
    
    /* Dark Mode Colors */
    --dark-bg: #1a1a1a;
    --dark-card: #2d2d2d;
    --dark-text: #e0e0e0;
    --dark-border: #444;
}

body.dark-mode {
    background: var(--dark-bg);
    color: var(--dark-text);
    --bg-body: var(--dark-bg);
    --bg-card: var(--dark-card);
    --border-light: var(--dark-border);
    --border: var(--dark-border);
    --text-gray: #aaa;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Outfit', sans-serif; 
    -webkit-tap-highlight-color: transparent; 
}

html, body { 
    height: 100%; 
    width: 100%; 
}

body {
    background-color: var(--bg-body);
    color: var(--brand-dark);
    min-height: 100vh;
    display: flex; 
    flex-direction: column;
    transition: background 0.3s, color 0.3s;
}

/* --- HEADER / NAVBAR --- */
header {
    background: #ffffff;
    height: 70px;
    padding: 0 40px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    position: sticky; 
    top: 0; 
    z-index: 100;
    flex-shrink: 0;
}

.dark-mode header {
    background: var(--dark-card);
    border-bottom: 1px solid var(--dark-border);
}

.logo { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    font-size: 22px; 
    font-weight: 700; 
    color: var(--brand-dark);
    cursor: pointer; 
    text-decoration: none;
}
.logo i { color: var(--brand-red); font-size: 24px; }
.logo span { font-weight: 700; }

.dark-mode .logo {
    color: var(--dark-text);
}

.nav-right { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
}
.nav-link { 
    color: var(--brand-dark); 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 14px; 
    padding: 8px 12px;
    border-radius: 6px; 
    transition: all 0.2s;
}
.nav-link:hover { 
    color: var(--brand-red); 
    background: rgba(229, 50, 45, 0.05); 
}
.nav-link.active { 
    color: var(--brand-red); 
    background: rgba(229, 50, 45, 0.1); 
}

.dark-mode .nav-link {
    color: var(--dark-text);
}

.btn-auth {
    padding: 8px 20px; 
    border-radius: 6px; 
    font-weight: 600; 
    font-size: 14px; 
    cursor: pointer; 
    transition: 0.2s;
    border: none;
}
.btn-login { 
    background: transparent; 
    color: var(--brand-dark); 
}
.btn-signup { 
    background: var(--brand-dark); 
    color: white; 
}
.btn-signup:hover { background: #000; }

.dark-mode .btn-login {
    color: var(--dark-text);
}

.dark-mode .btn-signup {
    background: var(--dark-text);
    color: var(--dark-bg);
}

/* THEME TOGGLE */
.theme-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-gray);
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: rgba(229, 50, 45, 0.1);
    color: var(--brand-red);
}

/* --- HERO SECTION --- */
.hero {
    text-align: center;
    padding: 50px 20px 30px;
    background: linear-gradient(135deg, rgba(229, 50, 45, 0.05) 0%, rgba(229, 50, 45, 0.02) 100%);
    border-bottom: 1px solid rgba(0,0,0,0.03);
}
.hero h1 { 
    font-size: 38px; 
    font-weight: 700; 
    color: var(--brand-dark); 
    margin-bottom: 15px; 
}
.hero p { 
    font-size: 18px; 
    color: var(--text-gray); 
    font-weight: 400; 
    max-width: 600px; 
    margin: 0 auto 20px; 
}
.hero-buttons { 
    margin-top: 25px; 
    display: flex; 
    gap: 15px; 
    justify-content: center; 
    flex-wrap: wrap; 
}
.hero-btn {
    padding: 12px 24px; 
    border-radius: 8px; 
    font-weight: 600; 
    cursor: pointer;
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    transition: 0.2s;
    font-size: 15px;
    border: none;
}
.hero-btn-primary { 
    background: var(--brand-dark); 
    color: white; 
}
.hero-btn-primary:hover { background: #000; }
.hero-btn-secondary { 
    background: transparent; 
    color: var(--brand-dark); 
    border: 1px solid var(--border-light); 
}
.hero-btn-secondary:hover { 
    border-color: var(--brand-red); 
    color: var(--brand-red); 
    background: rgba(229, 50, 45, 0.05); 
}

.dark-mode .hero {
    background: linear-gradient(135deg, rgba(229, 50, 45, 0.1) 0%, rgba(229, 50, 45, 0.05) 100%);
    border-bottom: 1px solid var(--dark-border);
}

.dark-mode .hero h1 {
    color: var(--dark-text);
}

.dark-mode .hero-btn-primary {
    background: var(--dark-text);
    color: var(--dark-bg);
}

.dark-mode .hero-btn-secondary {
    color: var(--dark-text);
    border-color: var(--dark-border);
}

/* --- TOOLS GRID --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
    flex: 1;
}

.section-header {
    margin: 40px 0 20px; 
    border-bottom: 1px solid var(--border-light); 
    padding-bottom: 10px;
}
.section-label {
    font-size: 16px; 
    font-weight: 700; 
    color: var(--brand-dark);
    text-transform: uppercase; 
    letter-spacing: 1px;
}

.dark-mode .section-label {
    color: var(--dark-text);
}

.tools-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); 
    gap: 20px;
    animation: fadeIn 0.5s ease;
}

.tool-card {
    background: var(--bg-card);
    padding: 30px 20px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 12px;
    text-decoration: none;
    box-shadow: var(--shadow);
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: var(--border-light);
}

.tool-icon {
    font-size: 38px;
    color: var(--brand-red);
    margin-bottom: 5px;
}

.tool-title { 
    font-size: 18px; 
    font-weight: 700; 
    color: var(--brand-dark); 
}
.tool-desc { 
    font-size: 14px; 
    color: var(--text-gray); 
    line-height: 1.4; 
}

.dark-mode .tool-title {
    color: var(--dark-text);
}

/* --- WORKSPACE VIEW (The Calculator Itself) --- */
.hidden { display: none !important; }

.workspace-view {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    width: 100%;
}

.workspace-header {
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    margin-bottom: 30px;
}

.back-btn {
    background: var(--bg-card); 
    border: 1px solid var(--border-light);
    color: var(--text-gray); 
    font-size: 14px; 
    font-weight: 600;
    padding: 8px 16px; 
    border-radius: 6px; 
    cursor: pointer;
    display: flex; 
    align-items: center; 
    gap: 8px; 
    transition: 0.2s;
}
.back-btn:hover { 
    background: var(--bg-body); 
    color: var(--brand-dark); 
}

.workspace-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    width: 100%;
}

#calc-title {
    text-align: center; 
    font-size: 28px; 
    font-weight: 700;
    margin-bottom: 30px; 
    color: var(--brand-dark);
}

.dark-mode #calc-title {
    color: var(--dark-text);
}

/* --- FORM ELEMENTS --- */
.input-group { 
    margin-bottom: 20px; 
    text-align: left; 
}
.input-group label { 
    display: block; 
    font-size: 13px; 
    font-weight: 600; 
    margin-bottom: 8px; 
    color: var(--text-gray); 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
}

.input-group input, 
.input-group select,
.form-input {
    width: 100%; 
    padding: 14px 15px; 
    border: 1px solid var(--border-light);
    border-radius: 6px; 
    font-size: 16px; 
    background: var(--bg-body); 
    outline: none; 
    transition: 0.2s;
    color: var(--brand-dark);
}
.input-group input:focus, 
.input-group select:focus,
.form-input:focus { 
    border-color: var(--brand-red); 
    background: var(--bg-card); 
    box-shadow: 0 0 0 3px rgba(229, 50, 45, 0.1);
}

.dark-mode .input-group input,
.dark-mode .input-group select,
.dark-mode .form-input {
    background: var(--dark-bg);
    color: var(--dark-text);
    border-color: var(--dark-border);
}

.btn-calc,
.btn-action {
    width: 100%; 
    padding: 16px; 
    background: var(--brand-red); 
    color: white;
    border: none; 
    border-radius: 8px; 
    font-size: 18px; 
    font-weight: 600; 
    cursor: pointer; 
    margin-top: 10px; 
    transition: 0.2s;
}
.btn-calc:hover,
.btn-action:hover { 
    background: var(--brand-red-hover); 
}

.btn-calc:disabled,
.btn-action:disabled {
    background: var(--border-light);
    cursor: not-allowed;
    color: var(--text-gray);
}

.result-box {
    margin-top: 30px; 
    padding: 25px;
    background: #f4fbf6;
    border: 1px solid #d4ece0; 
    border-radius: 8px; 
    text-align: center;
}
.result-box h3 { 
    margin-bottom: 5px; 
    color: #2e7d32; 
    font-size: 13px; 
    text-transform: uppercase; 
    font-weight: 700;
}
#result-value { 
    font-size: 32px; 
    font-weight: 700; 
    color: #1b5e20; 
    line-height: 1.3; 
}

/* ================= SPECIAL: MORTGAGE CALCULATOR RE-SKIN ================= */
.mortgage-layout { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 30px; 
}
.mortgage-form { 
    background: var(--bg-body); 
    padding: 25px; 
    border-radius: 8px; 
    border: 1px solid var(--border-light); 
}
.mg-row { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    margin-bottom: 15px; 
}
.mg-row label { 
    flex: 1; 
    font-weight: 600; 
    font-size: 14px; 
    color: var(--text-gray); 
    text-align: right; 
}
.mg-row .field-group { 
    flex: 1.5; 
    display: flex; 
    gap: 5px; 
}
.mg-row input, 
.mg-row select { 
    padding: 8px 10px; 
    border: 1px solid var(--border-light); 
    border-radius: 4px; 
    font-size: 14px; 
    width: 100%;
    background: var(--bg-body);
    color: var(--brand-dark);
}
.mg-row .suffix { 
    width: 40px; 
    background: var(--bg-body); 
    text-align: center; 
    line-height: 35px; 
    border-radius: 4px; 
    font-size: 13px; 
    color: var(--text-gray); 
}

.mg-result-header { 
    background: var(--brand-dark); 
    color: white; 
    padding: 20px; 
    border-radius: 8px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 20px; 
}
.mg-main-val { 
    font-size: 24px; 
    font-weight: 700; 
}

.mg-table-row { 
    display: flex; 
    justify-content: space-between; 
    padding: 8px 0; 
    border-bottom: 1px solid var(--border-light); 
    font-size: 14px; 
}
.mg-table-row.head { 
    font-weight: 700; 
    border-bottom: 2px solid var(--border-light); 
    color: var(--brand-dark); 
}
.mg-table-row.total { 
    font-weight: 700; 
    background: var(--bg-body); 
    padding: 10px 5px; 
    margin-top: 10px; 
}

.mg-chart-container { 
    display: flex; 
    align-items: center; 
    gap: 20px; 
    margin: 30px 0; 
    justify-content: center; 
}
.donut-chart { 
    width: 120px; 
    height: 120px; 
    border-radius: 50%; 
    position: relative; 
}
.donut-hole { 
    width: 60px; 
    height: 60px; 
    background: var(--bg-card); 
    border-radius: 50%; 
    position: absolute; 
    top: 30px; 
    left: 30px; 
}
.chart-legend { 
    font-size: 13px; 
    line-height: 1.8; 
}
.legend-item { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}
.dot { 
    width: 10px; 
    height: 10px; 
    border-radius: 50%; 
}

.mg-summary { 
    background: var(--bg-body); 
    padding: 15px; 
    border-radius: 8px; 
    font-size: 13px; 
    margin-top: 20px; 
    border: 1px solid var(--border-light); 
}
.mg-sum-row { 
    display: flex; 
    justify-content: space-between; 
    padding: 6px 0; 
}

/* ================= SPECIAL: PASSWORD GEN & AGE RE-SKIN ================= */
.pwd-container { 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
}
.pwd-display-box {
    position: relative; 
    background: var(--bg-body); 
    border: 1px solid var(--border-light);
    border-radius: 6px; 
    padding: 5px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between;
}
.pwd-display-box input { 
    background: transparent; 
    border: none; 
    font-family: monospace; 
    font-size: 18px; 
    color: var(--brand-dark); 
    width: 100%; 
    padding: 10px; 
}
.pwd-actions { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    padding-right: 10px; 
}
.pwd-refresh { 
    cursor: pointer; 
    color: var(--text-gray); 
    transition: 0.3s; 
    font-size: 18px; 
}
.pwd-refresh:hover { 
    color: var(--brand-red); 
    transform: rotate(180deg); 
}
.btn-copy { 
    background: var(--brand-dark); 
    color: white; 
    border: none; 
    padding: 8px 15px; 
    border-radius: 4px; 
    font-weight: 600; 
    cursor: pointer; 
    white-space: nowrap;
}

.strength-track { 
    height: 6px; 
    background: var(--bg-body); 
    border-radius: 3px; 
    margin: 5px 0; 
    overflow: hidden; 
}
.strength-fill { 
    height: 100%; 
    width: 0%; 
    transition: 0.3s; 
}

.pwd-controls-card { 
    background: var(--bg-card); 
    border: 1px solid var(--border-light); 
    padding: 20px; 
    border-radius: 8px; 
}
.pwd-slider-row { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    margin-bottom: 20px; 
}
.pwd-options-grid { 
    display: flex; 
    gap: 15px; 
    flex-wrap: wrap; 
}
.pwd-checkbox { 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    font-size: 14px; 
    cursor: pointer; 
    user-select: none; 
    color: var(--brand-dark);
}

.dark-mode .pwd-checkbox {
    color: var(--dark-text);
}

/* Age Calc Reskin */
.age-header-result { 
    background: var(--brand-red); 
    color: white; 
    padding: 15px 20px; 
    border-radius: 8px 8px 0 0; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.age-main-result { 
    background: var(--bg-card); 
    padding: 20px; 
    border: 1px solid var(--border-light); 
    border-top: none; 
    margin-bottom: 20px; 
    color: var(--brand-dark); 
}
.age-big-text { 
    font-size: 26px; 
    font-weight: 700; 
    margin-bottom: 10px; 
    color: var(--brand-dark); 
}
.age-form-container { 
    background: var(--bg-body); 
    border: 1px solid var(--border-light); 
    padding: 25px; 
    border-radius: 8px; 
}
.age-row { 
    display: flex; 
    gap: 15px; 
    justify-content: center; 
    align-items: center; 
    margin-bottom: 15px; 
}

.dark-mode .age-big-text {
    color: var(--dark-text);
}

.dark-mode .age-main-result {
    color: var(--dark-text);
}

/* Scientific Calc Reskin */
.sci-display { 
    width: 100%; 
    padding: 20px; 
    font-size: 32px; 
    text-align: right; 
    background: var(--dark-bg); 
    color: var(--dark-text); 
    border-radius: 8px; 
    margin-bottom: 15px; 
    font-family: monospace; 
    border: 1px solid var(--border-light);
}
.sci-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 10px; 
}
.sci-btn { 
    padding: 15px; 
    border-radius: 6px; 
    background: var(--bg-body); 
    color: var(--brand-dark); 
    font-size: 18px; 
    border: 1px solid var(--border-light);
    cursor: pointer; 
    font-weight: 600; 
    transition: 0.1s;
}
.sci-btn:hover { 
    background: var(--border-light); 
}
.sci-btn.op { 
    background: var(--bg-body); 
    color: var(--brand-red); 
    border-color: var(--border-light);
}
.sci-btn.eq { 
    background: var(--brand-red); 
    color: white; 
    grid-column: span 4; 
    border: none;
}
.sci-btn.eq:hover { 
    background: var(--brand-red-hover); 
}

.dark-mode .sci-btn {
    background: var(--dark-card);
    color: var(--dark-text);
    border-color: var(--dark-border);
}

.dark-mode .sci-btn:hover {
    background: var(--dark-border);
}

.dark-mode .sci-btn.op {
    background: var(--dark-bg);
}

/* ================= SEO CONTENT ================= */
.seo-content, 
.tool-seo-content {
    background: var(--bg-card); 
    padding: 40px 20px; 
    margin-top: 40px; 
    border-top: 1px solid var(--border-light);
    width: 100%;
}
.seo-container { 
    max-width: 1000px; 
    margin: 0 auto; 
    color: var(--text-gray); 
    font-size: 15px; 
    line-height: 1.6; 
}
.seo-container h1, 
.seo-container h2 { 
    color: var(--brand-dark); 
}
.seo-container p { 
    margin-bottom: 15px; 
}

.dark-mode .seo-container h1,
.dark-mode .seo-container h2 {
    color: var(--dark-text);
}

.seo-categories, 
.tool-category-seo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.seo-category, 
.tool-category-seo {
    background: var(--bg-body);
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid var(--brand-red);
}

.seo-category h2, 
.tool-category-seo h2 {
    color: var(--brand-dark);
    font-size: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.seo-faq {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 30px;
    margin: 40px 0;
}

.faq-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-light);
}

.faq-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.faq-item h3 {
    color: var(--brand-dark);
    font-size: 18px;
    margin-bottom: 10px;
}

.seo-cta {
    background: linear-gradient(135deg, rgba(229, 50, 45, 0.1), rgba(229, 50, 45, 0.05));
    border: 1px solid rgba(229, 50, 45, 0.2);
    border-radius: 12px;
    padding: 25px;
    margin-top: 40px;
    text-align: center;
}

.seo-cta h2 {
    color: var(--brand-dark);
    margin-bottom: 15px;
}

.seo-link {
    color: var(--brand-red);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: 0.2s;
}

.seo-link:hover {
    border-bottom-color: var(--brand-red);
}

.seo-benefits ul {
    list-style: none;
    padding: 0;
}

.seo-benefits li {
    padding: 8px 0;
    padding-left: 30px;
    position: relative;
    color: var(--text-gray);
}

.seo-benefits li:before {
    content: "✓";
    color: var(--brand-red);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.dark-mode .faq-item h3 {
    color: var(--dark-text);
}

.dark-mode .seo-cta h2 {
    color: var(--dark-text);
}

/* ================= TOASTS ================= */
.toast-container { 
    position: fixed; 
    bottom: 30px; 
    left: 50%; 
    transform: translateX(-50%); 
    z-index: 2000; 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    pointer-events: none; 
}

.toast { 
    background: var(--brand-dark); 
    color: white; 
    padding: 12px 24px; 
    border-radius: 8px; 
    font-size: 15px; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); 
    animation: slideUpToast 0.3s ease; 
    max-width: 90vw; 
    pointer-events: auto; 
}

.toast.error { background: var(--error); }
.toast.success { background: var(--success); }
.toast.warning { background: var(--warning); }
.toast.info { background: var(--info); }

@keyframes slideUpToast { 
    from { opacity: 0; transform: translateY(20px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* ================= MODALS ================= */
.modal-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.5); 
    z-index: 200; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 20px;
}

.modal-content { 
    background: var(--bg-card); 
    width: 90%; 
    max-width: 400px; 
    border-radius: 12px; 
    padding: 0; 
    overflow: hidden; 
    box-shadow: 0 25px 50px rgba(0,0,0,0.2); 
}

.modal-header { 
    padding: 15px 20px; 
    border-bottom: 1px solid var(--border-light); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-weight: 600; 
}

.modal-header h3 {
    color: var(--brand-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dark-mode .modal-header h3 {
    color: var(--dark-text);
}

.modal-header button { 
    background: none; 
    border: none; 
    font-size: 20px; 
    cursor: pointer; 
    color: var(--text-gray);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-header button:hover {
    background: var(--bg-body);
}

.modal-body { 
    padding: 30px 20px; 
    text-align: center; 
}

.modal-footer { 
    padding: 10px; 
    text-align: center; 
    background: var(--bg-body); 
    border-top: 1px solid var(--border-light);
}

/* ================= FOOTER ================= */
footer {
    background: var(--brand-dark); 
    color: #bbb; 
    padding: 40px 20px;
    margin-top: 60px;
    width: 100%;
}
.footer-content { 
    max-width: 1200px; 
    margin: 0 auto; 
    display: flex; 
    justify-content: space-between; 
    flex-wrap: wrap; 
    gap: 30px;
}
.footer-section h3 { 
    color: white; 
    margin-bottom: 15px; 
    font-size: 16px; 
}
.footer-links a { 
    display: block; 
    color: #bbb; 
    text-decoration: none; 
    margin-bottom: 8px; 
}
.footer-links a:hover { 
    color: white; 
    text-decoration: underline; 
}
.copyright { 
    text-align: center; 
    width: 100%; 
    margin-top: 30px; 
    padding-top: 20px; 
    border-top: 1px solid #444; 
}

/* ================= ANIMATIONS & RESPONSIVE ================= */
@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(10px); } 
    to { opacity: 1; transform: translateY(0); } 
}

@keyframes spin { 
    100% { transform: rotate(360deg); } 
}

@media (max-width: 800px) {
    .mortgage-layout { grid-template-columns: 1fr; }
    .age-row { flex-direction: column; align-items: stretch; }
    .age-row label { text-align: left; }
    header { padding: 0 20px; }
    .hero h1 { font-size: 28px; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .hero-btn { width: 100%; max-width: 300px; }
    .footer-content { flex-direction: column; }
    .tools-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

@media (max-width: 480px) {
    .tools-grid { grid-template-columns: 1fr; }
    .workspace-card { padding: 20px; }
    .nav-right { gap: 10px; }
    .btn-auth { padding: 8px 12px; font-size: 13px; }
    .hero { padding: 30px 15px; }
}
/* ================= TOOL-SPECIFIC SEO ================= */
.tool-seo-container {
    background: var(--bg-card);
    margin: 30px 0 0 0;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow);
}

.tool-seo-container.hidden {
    display: none;
}

.tool-seo-content h2 {
    color: var(--brand-dark);
    font-size: 24px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--brand-red);
}

.tool-seo-content h3 {
    color: var(--brand-dark);
    font-size: 18px;
    margin: 20px 0 10px 0;
}

.tool-seo-content ul {
    list-style: none;
    padding-left: 20px;
    margin: 10px 0 20px 0;
}

.tool-seo-content li {
    padding: 5px 0;
    position: relative;
    color: var(--text-gray);
}

.tool-seo-content li:before {
    content: "•";
    color: var(--brand-red);
    font-weight: bold;
    position: absolute;
    left: -15px;
}

.tool-seo-content p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: var(--text-gray);
}

.tool-seo-content strong {
    color: var(--brand-dark);
    font-weight: 600;
}

.tool-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.tool-feature {
    background: var(--bg-body);
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid var(--brand-red);
}

.tool-feature h4 {
    color: var(--brand-dark);
    margin-bottom: 5px;
    font-size: 15px;
}

.tool-calculator-use-cases {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.use-case-tag {
    background: rgba(229, 50, 45, 0.1);
    color: var(--brand-red);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.dark-mode .tool-seo-content h2,
.dark-mode .tool-seo-content h3 {
    color: var(--dark-text);
}

.dark-mode .tool-seo-content strong {
    color: var(--dark-text);
}

.dark-mode .use-case-tag {
    background: rgba(229, 50, 45, 0.2);
    color: #ff8a8a;
}

/* Update for SEO content in workspace */
.workspace-view .seo-content {
    margin-top: 40px;
    padding: 30px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.workspace-view .seo-container {
    max-width: 100%;
}

/* Responsive adjustments for tool SEO */
@media (max-width: 768px) {
    .tool-seo-container {
        padding: 20px;
        margin: 20px 0 0 0;
    }
    
    .tool-feature-grid {
        grid-template-columns: 1fr;
    }
    
    .workspace-view .seo-content {
        padding: 20px;
    }
}

/* Animation for SEO content appearance */
@keyframes fadeInSEO {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-seo-container {
    animation: fadeInSEO 0.4s ease-out;
}