/* Apply Box Sizing to everything so padding doesn't break widths */
*, *::before, *::after {
    box-sizing: border-box;
}

/* css/style.css */
:root {
    /* Light Mode Theme */
    --bg-color: #f4f6f8;
    --surface-color: #ffffff;
    --text-color: #333333;
    --primary-red: #e63946;
    --primary-red-hover: #d62828;
    --shadow: 6px 6px 12px rgba(0,0,0,0.08), -6px -6px 12px rgba(255,255,255,0.9);
    --inset-shadow: inset 4px 4px 8px rgba(0,0,0,0.08), inset -4px -4px 8px rgba(255,255,255,0.9);
    --border-radius: 16px;
}

body.dark-mode {
    /* Dark Mode Theme */
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --text-color: #e0e0e0;
    --shadow: 6px 6px 12px rgba(0,0,0,0.4), -6px -6px 12px rgba(255,255,255,0.05);
    --inset-shadow: inset 4px 4px 8px rgba(0,0,0,0.4), inset -4px -4px 8px rgba(255,255,255,0.05);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    transition: background-color 0.3s, color 0.3s;
}

a { color: var(--text-color); text-decoration: none; transition: color 0.2s;}
a:hover { color: var(--primary-red); }

/* HEADER */
header {
    background-color: var(--primary-red);
    padding: 8px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    position: relative; /* ADD THIS LINE */
}

.logo {
    color: white;
    font-size: 24px; 
    font-weight: 700;
    text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.4); 
}

/* The new .xyz styling */
.domain-ext {
    color: #ffb703; /* Premium Tech Gold */
    font-size: 24px; /* Slightly smaller than the main text */
    font-weight: 600;
    margin-left: 2px; /* Adds a tiny breathing room */
}

.desktop-nav a, .desktop-nav button {
    color: white;
    margin-left: 20px;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
}
.desktop-nav a:hover { color: #ffe6e6; }
.mobile-menu-btn { display: none; background: none; border: none; color: white; font-size: 24px; }

/* CONTAINER & LAYOUT */
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }

.ad-space {
    background-color: var(--surface-color);
    height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #888;
    border-radius: var(--border-radius);
    box-shadow: var(--inset-shadow);
    margin-bottom: 30px;
}

/* HERO SECTION (Side-by-Side Layout) */
.hero-section {
    display: grid;
    grid-template-columns: auto 1fr; 
    gap: 50px;
    align-items: center; 
    margin-bottom: 60px;
}

/* SEARCH & CHIPS (Right Side) */
.search-section { text-align: left; margin-bottom: 0; }
.search-bar {
    display: flex;
    width: 100%;
    margin: 0 0 20px 0;
    box-shadow: var(--shadow);
    border-radius: 50px;
    overflow: hidden;
    background: var(--surface-color);
}
.search-bar input {
    flex: 1; padding: 15px 25px; border: none; background: transparent; color: var(--text-color); font-family: 'Poppins'; font-size: 16px; outline: none;
}
.search-bar button {
    background: var(--primary-red); color: white; border: none; padding: 0 25px; cursor: pointer; font-size: 18px; transition: 0.2s;
}
.search-bar button:hover { background: var(--primary-red-hover); }

.trending-chips { display: flex; justify-content: flex-start; flex-wrap: wrap; gap: 10px; font-size: 14px; }
.chip-label { font-weight: 600; margin-top: 5px; }
.chip {
    background: var(--surface-color); padding: 5px 15px; border-radius: 20px; box-shadow: var(--shadow);
}

/* HOME CALCULATOR (Left Side) */
.home-calculator { 
    margin-bottom: 0; 
}

.calc-wrapper {
    background: var(--primary-red); 
    padding: 15px; 
    border-radius: 20px; 
    box-shadow: 0 10px 25px rgba(230, 57, 70, 0.4); 
    width: 100%; 
    max-width: 500px; 
}

#calc-display {
    width: 100%; 
    box-sizing: border-box; 
    background: #ffffff; 
    border: none; 
    padding: 12px 15px; 
    font-size: 28px; 
    text-align: right; 
    border-radius: 10px; 
    margin-bottom: 15px; 
    color: var(--primary-red); 
    font-family: monospace; 
    font-weight: bold;
    outline: none;
    box-shadow: inset 0 4px 8px rgba(0,0,0,0.1);
}

.calc-keys {
    display: grid; 
    grid-template-columns: repeat(5, 1fr); 
    gap: 8px; 
}

.calc-keys button {
    background: #ffffff; 
    border: none; 
    padding: 10px 0; 
    font-size: 15px; 
    border-radius: 8px; 
    color: var(--primary-red); 
    cursor: pointer; 
    font-family: 'Poppins', sans-serif; 
    font-weight: 600; 
    transition: all 0.2s ease;
    box-shadow: 0 3px 5px rgba(0,0,0,0.1);
}

.calc-keys button:hover { 
    background: #ffe6e6; 
    transform: translateY(-2px);
}

.calc-keys button:active { 
    transform: scale(0.95); 
    box-shadow: none;
}

.calc-keys .op-btn { 
    color: #8b0000; 
    background: #fff0f0;
}

.calc-keys .clear-btn, .calc-keys .del-btn { 
    color: #333333; 
}

.calc-keys .equal-btn { 
    background: #9d0208; 
    color: white; 
    box-shadow: 0 4px 10px rgba(157, 2, 8, 0.4);
}

.calc-keys .equal-btn:hover {
    background: #6a040f;
}

/* CATEGORIES */
.all-calc-btn-wrapper { text-align: center; margin-bottom: 30px; }
.all-calc-btn {
    display: inline-block; background: var(--primary-red); color: white; padding: 12px 30px; border-radius: 30px; font-weight: 600; box-shadow: var(--shadow);
}
.all-calc-btn:hover { color: white; background: var(--primary-red-hover); }

.categories-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 25px; margin-bottom: 50px;
}
.category-card {
    background: var(--surface-color); padding: 25px; border-radius: var(--border-radius); box-shadow: var(--shadow); text-align: center;
}
.category-icon { font-size: 40px; color: var(--primary-red); margin-bottom: 15px; }
.category-card h2 { font-size: 20px; margin-bottom: 15px; }
.category-card ul { list-style: none; padding: 0; text-align: left; }
.category-card li { margin-bottom: 10px; }
.category-card li::before { content: "›"; color: var(--primary-red); margin-right: 8px; font-weight: bold; }

/* FEEDBACK SECTION */
.feedback-section {
    background-color: var(--surface-color); padding: 40px 20px; text-align: center; border-radius: var(--border-radius); box-shadow: var(--shadow); margin-bottom: 40px; border: 1px solid rgba(230, 57, 70, 0.1);
}
.feedback-btn {
    display: inline-block; margin-top: 15px; background: var(--text-color); color: var(--bg-color); padding: 12px 25px; border-radius: 8px; font-weight: 600;
}
.feedback-btn:hover { background: var(--primary-red); color: white;}

/* FOOTER */
footer { text-align: center; padding: 40px 20px; background: var(--surface-color); margin-top: auto; border-top: 2px solid var(--primary-red);}
.footer-logo { font-size: 24px; font-weight: 700; color: var(--primary-red); margin-bottom: 10px; }
.footer-links { margin: 15px 0; font-size: 14px; }
.footer-links a { margin: 0 10px; }
.copyright { font-size: 12px; color: #888; }

/* MOBILE RESPONSIVE */
/* 1. Stacks the Hero Section on tablets and smaller */
@media (max-width: 900px) {
    .hero-section { 
        grid-template-columns: 1fr; 
        gap: 40px; 
    }
    .search-section { text-align: center; }
    .search-bar { margin: 0 auto 20px auto; }
    .trending-chips { justify-content: center; }
    .home-calculator { display: flex; justify-content: center; }
}

/* 2. Adjusts Navigation, Calculator, and Text for mobile phones */
@media (max-width: 768px) {
    /* MOBILE MENU STYLING */
    .desktop-nav { 
        display: none; 
        flex-direction: column;
        position: absolute;
        top: 100%; /* Pushes it directly below the header */
        left: 0;
        width: 100%;
        background-color: var(--primary-red);
        padding: 20px 0;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        z-index: 1000;
    }
    
    /* This is the class JavaScript triggers when clicked */
    .desktop-nav.active {
        display: flex;
    }

    .desktop-nav a, .desktop-nav button {
        margin: 15px 0;
        text-align: center;
        width: 100%;
    }
    .mobile-menu-btn { display: block; }
    
    /* Shrink the main header text so it doesn't break the layout */
    .search-section h1 { font-size: 24px !important; }
    
    /* Make the calculator fit snugly on narrow screens */
    .calc-wrapper { padding: 10px; }
    #calc-display { font-size: 24px; padding: 10px; }
    
    /* Tighter 5-column grid for the buttons */
    .calc-keys { gap: 5px; } 
    .calc-keys button { padding: 10px 0; font-size: 13px; }
}

/* =========================================
   THE NUCLEAR MOBILE OVERFLOW FIX 
   ========================================= */

/* 1. Physically prevents the browser from allowing horizontal scroll */
html, body {
    max-width: 100vw;
    overflow-x: hidden; 
}

/* 2. Forces all major containers to strictly obey the screen width */
.container, .hero-section, .home-calculator, .calc-wrapper, .search-section {
    max-width: 100%;
    box-sizing: border-box;
}

/* 3. The "Magic Fix" for Flexbox text inputs on mobile */
.search-bar {
    width: 100%;
    max-width: 100%;
}
.search-bar input {
    min-width: 0; /* Forces the input to shrink rather than push the screen wider */
    width: 100%;
}

/* 4. Ensures calculator buttons don't force the grid wider than the screen */
.calc-keys button {
    min-width: 0;
    overflow: hidden;
    padding-left: 2px;
    padding-right: 2px;
}

/* =========================================
   TOOL PAGES MASTER TEMPLATE STYLES
   ========================================= */

/* Grid Layout for Tool Pages */
.tool-layout {
    display: grid;
    grid-template-columns: 2.5fr 1fr; /* 70% Content / 30% Sidebar */
    gap: 40px;
    margin-top: 20px;
    margin-bottom: 60px;
}

.breadcrumbs {
    font-size: 14px;
    margin-bottom: 20px;
    color: #888;
}

.breadcrumbs a { 
    color: var(--primary-red); 
    font-weight: 600; 
}

.tool-main h1 {
    font-size: 32px;
    margin-top: 0;
    margin-bottom: 25px;
}

/* Reusing your neumorphic shadow variables for the tool card */
.tool-card {
    background: var(--surface-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

/* Tool Input Neumorphic Styling */
.input-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.tool-input {
    background: var(--bg-color);
    border: 2px solid rgba(150, 150, 150, 0.3); /* Standard solid border */
    padding: 15px;
    border-radius: 12px; /* Nice rounded corners */
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 600;
    /* box-shadow removed */
    outline: none;
    width: 120px;
    text-align: center;
    transition: all 0.3s ease;
}

/* Red highlight when the user clicks the box */
.tool-input:focus {
    border-color: var(--primary-red);
    background: var(--surface-color);
}

.result-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
    font-size: 20px;
    font-weight: bold;
}

.result-input {
    flex: 1;
    text-align: left;
    color: var(--primary-red);
    font-size: 24px;
    width: auto;
    border-color: transparent; /* Makes the read-only result box look a bit cleaner */
}

/* Primary Action Button */
.calc-action-btn {
    background: var(--primary-red);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 8px 15px rgba(230, 57, 70, 0.3);
    transition: all 0.2s;
    width: 100%;
    font-family: 'Poppins', sans-serif;
}

.calc-action-btn:hover {
    background: var(--primary-red-hover);
    transform: translateY(-2px);
}

.calc-action-btn:active {
    transform: scale(0.98);
}

/* SEO & Sidebar Elements */
.tool-seo h2, .tool-seo h3 {
    color: var(--primary-red);
    margin-top: 30px;
}

.formula-box {
    background: var(--bg-color);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--inset-shadow);
    text-align: center;
    font-size: 24px;
    margin: 20px 0;
    color: var(--primary-red);
}

.related-tools ul { list-style: none; padding: 0; }
.related-tools li { margin-bottom: 15px; }
.related-tools li a { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.related-tools i { color: var(--primary-red); width: 20px; }

/* Mobile Formatting for the Grid */
@media (max-width: 900px) {
    .tool-layout { grid-template-columns: 1fr; }
    .tool-input { width: 80px; }
    .input-row h3 { font-size: 16px; }
}

/* =========================================
   FRACTION CALCULATOR SPECIFIC STYLES
   ========================================= */
.fraction-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.fraction-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 90px;
}

.fraction-col .tool-input {
    width: 100%;
    padding: 10px;
}

.fraction-line {
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
}

.operator-select {
    cursor: pointer;
    font-size: 24px;
    padding: 10px 15px;
    width: auto;
    text-align: center;
    appearance: none; /* Removes default browser dropdown arrow */
}

/* =========================================
   STANDARD DEVIATION SPECIFIC STYLES
   ========================================= */
.data-input-area {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.data-input-area .tool-input {
    width: 100%;
    text-align: left;
    padding: 15px 20px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 25px;
    margin-bottom: 25px;
}

.stat-box {
    background: var(--bg-color);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid rgba(150, 150, 150, 0.1);
}

.stat-label {
    font-size: 14px;
    color: #888;
    margin-bottom: 5px;
    font-weight: 600;
}

.stat-value {
    font-size: 20px;
    color: var(--primary-red);
    font-weight: 700;
}

/* =========================================
   RANDOM NUMBER GENERATOR SPECIFIC STYLES
   ========================================= */
.rng-input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.rng-input-col {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.rng-input-col label {
    font-size: 14px;
    font-weight: 600;
    color: #888;
}

.rng-input-col .tool-input {
    width: 100%;
}

.rng-result-box {
    margin-top: 25px;
    padding: 25px;
    background: var(--bg-color);
    border-radius: 12px;
    border: 2px solid rgba(150, 150, 150, 0.1);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    word-break: break-word;
}

.rng-output-text {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-red);
    line-height: 1.4;
}
/* =========================================
   BMI CALCULATOR ADVANCED STYLES
   ========================================= */
.unit-toggle { display: flex; gap: 15px; margin-bottom: 25px; justify-content: center; }
.unit-btn { background: var(--bg-color); border: 2px solid rgba(150, 150, 150, 0.3); padding: 10px 25px; border-radius: 30px; cursor: pointer; font-weight: 600; color: var(--text-color); transition: all 0.3s; font-family: 'Poppins', sans-serif; }
.unit-btn.active { background: var(--primary-red); color: white; border-color: var(--primary-red); }

.input-group-stack { display: flex; flex-direction: column; gap: 15px; margin-bottom: 25px; }
.input-group-stack .tool-input { width: 100%; text-align: left; }

.bmi-result-box { text-align: center; margin-top: 30px; padding: 25px; border-radius: 12px; background: var(--bg-color); border: 2px solid rgba(150, 150, 150, 0.1); display: none; }
.bmi-value { font-size: 42px; font-weight: 700; color: var(--text-color); margin-bottom: 10px; line-height: 1; }
.bmi-category { font-size: 18px; font-weight: 600; padding: 8px 20px; border-radius: 30px; display: inline-block; color: white; }

/* Visual Color Scale */
.bmi-scale-container { position: relative; margin: 30px 0 20px 0; padding-top: 15px; }
.bmi-scale { display: flex; height: 12px; border-radius: 10px; overflow: hidden; }
.scale-under { width: 25%; background-color: #3498db; }
.scale-normal { width: 25%; background-color: #2ecc71; }
.scale-over { width: 25%; background-color: #f39c12; }
.scale-obese { width: 25%; background-color: #e74c3c; }

/* The Moving Arrow */
.bmi-marker {
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 12px solid var(--text-color);
    transform: translateX(-50%);
    transition: left 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Extra Stats List */
.bmi-extra-stats { list-style: none; padding: 0; margin-top: 25px; text-align: left; font-size: 15px; line-height: 1.8; color: var(--text-color); }
.bmi-extra-stats li::before { content: "•"; color: var(--primary-red); font-weight: bold; display: inline-block; width: 1em; }

/* Data Table Styles for SEO Section */
.seo-table { width: 100%; border-collapse: collapse; margin: 20px 0; background: var(--bg-color); border-radius: 8px; overflow: hidden; }
.seo-table th, .seo-table td { padding: 12px 15px; border-bottom: 1px solid rgba(150, 150, 150, 0.2); text-align: left; }
.seo-table th { background: var(--primary-red); color: white; font-weight: 600; }

/* =========================================
   CALORIE CALCULATOR SPECIFIC STYLES
   ========================================= */
.gender-toggle { display: flex; gap: 15px; margin-bottom: 15px; }
.gender-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; color: var(--text-color); }
.gender-label input { accent-color: var(--primary-red); width: 18px; height: 18px; cursor: pointer; }

.calorie-result-container { display: none; margin-top: 30px; }
.calorie-main-result { background: var(--primary-red); color: white; padding: 25px; border-radius: 12px; text-align: center; margin-bottom: 20px; box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3); }
.calorie-main-result h3 { margin: 0 0 10px 0; font-size: 18px; opacity: 0.9; }
.calorie-main-result .cal-value { font-size: 42px; font-weight: 700; line-height: 1; }

.calorie-table { width: 100%; border-collapse: collapse; background: var(--bg-color); border-radius: 12px; overflow: hidden; border: 2px solid rgba(150, 150, 150, 0.1); }
.calorie-table th, .calorie-table td { padding: 15px; border-bottom: 1px solid rgba(150, 150, 150, 0.1); text-align: left; }
.calorie-table th { background: rgba(150, 150, 150, 0.1); font-weight: 700; color: var(--text-color); }
.calorie-table tr:last-child td { border-bottom: none; }
.calorie-table .percentage { font-weight: 700; color: var(--primary-red); }

/* =========================================
   BMR CALCULATOR SPECIFIC STYLES
   ========================================= */
.gender-toggle { display: flex; gap: 15px; margin-bottom: 15px; }
.gender-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; color: var(--text-color); }
.gender-label input { accent-color: var(--primary-red); width: 18px; height: 18px; cursor: pointer; }

.bmr-result-container { display: none; margin-top: 30px; }
.bmr-main-result { background: var(--primary-red); color: white; padding: 30px 20px; border-radius: 12px; text-align: center; box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3); }
.bmr-main-result h3 { margin: 0 0 15px 0; font-size: 20px; opacity: 0.9; }
.bmr-main-result .cal-value { font-size: 48px; font-weight: 700; line-height: 1; }

/* =========================================
   TDEE CALCULATOR SPECIFIC STYLES
   ========================================= */
.gender-toggle { display: flex; gap: 15px; margin-bottom: 15px; }
.gender-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; color: var(--text-color); }
.gender-label input { accent-color: var(--primary-red); width: 18px; height: 18px; cursor: pointer; }

.tdee-result-container { display: none; margin-top: 30px; }
.tdee-main-result { background: var(--primary-red); color: white; padding: 30px 20px; border-radius: 12px; text-align: center; box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3); margin-bottom: 20px; }
.tdee-main-result h3 { margin: 0 0 15px 0; font-size: 20px; opacity: 0.9; }
.tdee-main-result .cal-value { font-size: 48px; font-weight: 700; line-height: 1; }

.tdee-secondary-stats { display: flex; justify-content: space-around; background: var(--bg-color); padding: 20px; border-radius: 12px; border: 2px solid rgba(150, 150, 150, 0.1); text-align: center; }
.tdee-secondary-stats .stat-label { font-size: 14px; font-weight: 600; color: #888; margin-bottom: 5px; }
.tdee-secondary-stats .stat-value { font-size: 22px; font-weight: 700; color: var(--text-color); }

/* =========================================
   MACRO CALCULATOR SPECIFIC STYLES
   ========================================= */
.gender-toggle { display: flex; gap: 15px; margin-bottom: 15px; }
.gender-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; color: var(--text-color); }
.gender-label input { accent-color: var(--primary-red); width: 18px; height: 18px; cursor: pointer; }

.macro-result-container { display: none; margin-top: 30px; }
.macro-target-cals { text-align: center; font-size: 24px; font-weight: 700; color: var(--text-color); margin-bottom: 25px; }
.macro-target-cals span { color: var(--primary-red); font-size: 36px; }

.macro-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 15px; margin-bottom: 20px; }
.macro-box { background: var(--bg-color); border: 2px solid rgba(150, 150, 150, 0.1); border-radius: 12px; padding: 20px; text-align: center; }

.macro-box.protein { border-top: 5px solid #e74c3c; } /* Red */
.macro-box.fat { border-top: 5px solid #f39c12; }     /* Orange */
.macro-box.carbs { border-top: 5px solid #3498db; }   /* Blue */

.macro-label { font-size: 16px; font-weight: 600; color: #888; margin-bottom: 10px; }
.macro-value { font-size: 32px; font-weight: 700; color: var(--text-color); line-height: 1; }
.macro-unit { font-size: 14px; font-weight: 400; color: #888; }
.macro-pct { font-size: 13px; font-weight: 600; margin-top: 10px; display: inline-block; padding: 4px 10px; border-radius: 20px; background: rgba(150, 150, 150, 0.1); }

/* =========================================
   MORTGAGE CALCULATOR SPECIFIC STYLES
   ========================================= */
.mortgage-result-container { display: none; margin-top: 30px; }
.mortgage-main-result { background: var(--primary-red); color: white; padding: 30px 20px; border-radius: 12px; text-align: center; box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3); margin-bottom: 20px; }
.mortgage-main-result h3 { margin: 0 0 10px 0; font-size: 20px; opacity: 0.9; }
.mortgage-main-result .cal-value { font-size: 48px; font-weight: 700; line-height: 1; margin-bottom: 10px;}

.mortgage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; margin-bottom: 20px; }
.mortgage-box { background: var(--bg-color); border: 2px solid rgba(150, 150, 150, 0.1); border-radius: 12px; padding: 20px; text-align: center; }
.mortgage-box .stat-label { font-size: 14px; font-weight: 600; color: #888; margin-bottom: 8px; }
.mortgage-box .stat-value { font-size: 22px; font-weight: 700; color: var(--text-color); }

.input-with-symbol { position: relative; width: 100%; }
.input-with-symbol .symbol { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); font-weight: 600; color: #888; }
.input-with-symbol.right-symbol .symbol { left: auto; right: 15px; }
.input-with-symbol input { padding-left: 35px; width: 100%; text-align: left; }
.input-with-symbol.right-symbol input { padding-left: 15px; padding-right: 35px; }

/* =========================================
   AUTO LOAN CALCULATOR SPECIFIC STYLES
   ========================================= */
.auto-result-container { display: none; margin-top: 30px; }
.auto-main-result { background: var(--primary-red); color: white; padding: 30px 20px; border-radius: 12px; text-align: center; box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3); margin-bottom: 20px; }
.auto-main-result h3 { margin: 0 0 10px 0; font-size: 20px; opacity: 0.9; }
.auto-main-result .cal-value { font-size: 48px; font-weight: 700; line-height: 1; margin-bottom: 10px;}

.auto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; margin-bottom: 20px; }
.auto-box { background: var(--bg-color); border: 2px solid rgba(150, 150, 150, 0.1); border-radius: 12px; padding: 20px; text-align: center; }
.auto-box .stat-label { font-size: 14px; font-weight: 600; color: #888; margin-bottom: 8px; }
.auto-box .stat-value { font-size: 22px; font-weight: 700; color: var(--text-color); }

.input-with-symbol { position: relative; width: 100%; }
.input-with-symbol .symbol { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); font-weight: 600; color: #888; }
.input-with-symbol.right-symbol .symbol { left: auto; right: 15px; }
.input-with-symbol input { padding-left: 35px; width: 100%; text-align: left; }
.input-with-symbol.right-symbol input { padding-left: 15px; padding-right: 35px; }

/* =========================================
   SALARY CALCULATOR SPECIFIC STYLES
   ========================================= */
.salary-result-container { display: none; margin-top: 30px; }
.salary-main-result { background: var(--primary-red); color: white; padding: 25px 20px; border-radius: 12px; text-align: center; box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3); margin-bottom: 20px; }
.salary-main-result h3 { margin: 0 0 10px 0; font-size: 20px; opacity: 0.9; }
.salary-main-result .cal-value { font-size: 42px; font-weight: 700; line-height: 1; margin-bottom: 5px;}

.salary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; margin-bottom: 20px; }
.salary-box { background: var(--bg-color); border: 2px solid rgba(150, 150, 150, 0.1); border-radius: 12px; padding: 15px; text-align: center; }
.salary-box .stat-label { font-size: 14px; font-weight: 600; color: #888; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px;}
.salary-box .stat-value { font-size: 20px; font-weight: 700; color: var(--text-color); }

.input-with-symbol { position: relative; width: 100%; }
.input-with-symbol .symbol { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); font-weight: 600; color: #888; }
.input-with-symbol input { padding-left: 35px; width: 100%; text-align: left; }

/* =========================================
   ROI CALCULATOR SPECIFIC STYLES
   ========================================= */
.roi-result-container { display: none; margin-top: 30px; }
.roi-main-result { background: var(--primary-red); color: white; padding: 30px 20px; border-radius: 12px; text-align: center; box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3); margin-bottom: 20px; transition: background 0.3s ease; }
.roi-main-result.profit { background: #2ecc71; box-shadow: 0 10px 20px rgba(46, 204, 113, 0.3); }
.roi-main-result.loss { background: #e74c3c; box-shadow: 0 10px 20px rgba(231, 76, 60, 0.3); }

.roi-main-result h3 { margin: 0 0 10px 0; font-size: 20px; opacity: 0.9; }
.roi-main-result .cal-value { font-size: 52px; font-weight: 700; line-height: 1; margin-bottom: 5px;}

.roi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; margin-bottom: 20px; }
.roi-box { background: var(--bg-color); border: 2px solid rgba(150, 150, 150, 0.1); border-radius: 12px; padding: 20px; text-align: center; }
.roi-box .stat-label { font-size: 14px; font-weight: 600; color: #888; margin-bottom: 8px; }
.roi-box .stat-value { font-size: 24px; font-weight: 700; color: var(--text-color); }
.roi-box .stat-value.profit-text { color: #2ecc71; }
.roi-box .stat-value.loss-text { color: #e74c3c; }

.input-with-symbol { position: relative; width: 100%; }
.input-with-symbol .symbol { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); font-weight: 600; color: #888; }
.input-with-symbol.right-symbol .symbol { left: auto; right: 15px; }
.input-with-symbol input { padding-left: 35px; width: 100%; text-align: left; }
.input-with-symbol.right-symbol input { padding-left: 15px; padding-right: 40px; }

/* =========================================
   DISCOUNT CALCULATOR SPECIFIC STYLES
   ========================================= */
.discount-result-container { display: none; margin-top: 30px; }
.discount-main-result { background: var(--primary-red); color: white; padding: 30px 20px; border-radius: 12px; text-align: center; box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3); margin-bottom: 20px; }
.discount-main-result h3 { margin: 0 0 10px 0; font-size: 20px; opacity: 0.9; }
.discount-main-result .cal-value { font-size: 52px; font-weight: 700; line-height: 1; margin-bottom: 5px;}

.discount-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; margin-bottom: 20px; }
.discount-box { background: var(--bg-color); border: 2px solid rgba(150, 150, 150, 0.1); border-radius: 12px; padding: 20px; text-align: center; }
.discount-box .stat-label { font-size: 14px; font-weight: 600; color: #888; margin-bottom: 8px; }
.discount-box .stat-value { font-size: 24px; font-weight: 700; color: var(--text-color); }
.discount-box .stat-value.savings-text { color: #2ecc71; }

.input-with-symbol { position: relative; width: 100%; }
.input-with-symbol .symbol { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); font-weight: 600; color: #888; }
.input-with-symbol.right-symbol .symbol { left: auto; right: 15px; }
.input-with-symbol input { padding-left: 35px; width: 100%; text-align: left; }
.input-with-symbol.right-symbol input { padding-left: 15px; padding-right: 40px; }

/* =========================================
   LIVE SEARCH DROPDOWN STYLES
   ========================================= */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--surface-color);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none; /* Hidden until the user types */
    border: 1px solid rgba(150, 150, 150, 0.1);
}

.search-result-item {
    display: block;
    padding: 15px 20px;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(150, 150, 150, 0.1);
    font-weight: 500;
    transition: background 0.2s;
    text-align: left;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--bg-color);
    color: var(--primary-red);
}

/* =========================================
   CGPA CALCULATOR SPECIFIC STYLES
   ========================================= */
.cgpa-result-container { display: none; margin-top: 30px; }
.cgpa-main-result { background: var(--primary-red); color: white; padding: 30px 20px; border-radius: 12px; text-align: center; box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3); margin-bottom: 20px; }
.cgpa-main-result h3 { margin: 0 0 10px 0; font-size: 20px; opacity: 0.9; }
.cgpa-main-result .cal-value { font-size: 52px; font-weight: 700; line-height: 1; margin-bottom: 5px;}

.cgpa-row { display: flex; gap: 15px; align-items: center; margin-bottom: 15px; flex-wrap: wrap; background: var(--bg-color); padding: 15px; border-radius: 12px; border: 2px solid rgba(150, 150, 150, 0.1); }
.cgpa-row .input-group { flex: 1; min-width: 100px; }
.cgpa-row label { font-size: 12px; font-weight: 600; color: #888; margin-bottom: 5px; display: block; }
.cgpa-row .tool-input { width: 100%; padding: 10px 15px; }

.remove-btn { background: rgba(231, 76, 60, 0.1); color: #e74c3c; border: none; width: 40px; height: 40px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; transition: all 0.2s; margin-top: 20px;}
.remove-btn:hover { background: #e74c3c; color: white; }

.add-row-btn { background: transparent; border: 2px dashed rgba(150, 150, 150, 0.3); color: var(--text-color); width: 100%; padding: 15px; border-radius: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; font-family: 'Poppins', sans-serif; margin-bottom: 25px; }
.add-row-btn:hover { border-color: var(--primary-red); color: var(--primary-red); background: rgba(230, 57, 70, 0.05); }

.cgpa-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; margin-bottom: 20px; }
.cgpa-box { background: var(--bg-color); border: 2px solid rgba(150, 150, 150, 0.1); border-radius: 12px; padding: 20px; text-align: center; }
.cgpa-box .stat-label { font-size: 14px; font-weight: 600; color: #888; margin-bottom: 8px; }
.cgpa-box .stat-value { font-size: 24px; font-weight: 700; color: var(--text-color); }

/* =========================================
   AGE CALCULATOR SPECIFIC STYLES
   ========================================= */
.age-result-container { display: none; margin-top: 30px; }
.age-main-result { background: var(--primary-red); color: white; padding: 30px 20px; border-radius: 12px; text-align: center; box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3); margin-bottom: 20px; }
.age-main-result h3 { margin: 0 0 15px 0; font-size: 20px; opacity: 0.9; }
.age-main-result .age-breakdown { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.age-main-result .age-part { display: flex; flex-direction: column; align-items: center; }
.age-main-result .cal-value { font-size: 48px; font-weight: 700; line-height: 1; }
.age-main-result .cal-label { font-size: 16px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-top: 5px; opacity: 0.9; }

.age-next-bday { background: rgba(255,255,255,0.1); padding: 10px; border-radius: 8px; margin-top: 20px; font-size: 14px; font-weight: 600; }

.age-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; margin-bottom: 20px; }
.age-box { background: var(--bg-color); border: 2px solid rgba(150, 150, 150, 0.1); border-radius: 12px; padding: 20px; text-align: center; }
.age-box .stat-label { font-size: 14px; font-weight: 600; color: #888; margin-bottom: 8px; }
.age-box .stat-value { font-size: 24px; font-weight: 700; color: var(--text-color); }

/* =========================================
   GPA CALCULATOR SPECIFIC STYLES
   ========================================= */
.gpa-result-container { display: none; margin-top: 30px; }
.gpa-main-result { background: var(--primary-red); color: white; padding: 30px 20px; border-radius: 12px; text-align: center; box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3); margin-bottom: 20px; }
.gpa-main-result h3 { margin: 0 0 10px 0; font-size: 20px; opacity: 0.9; }
.gpa-main-result .cal-value { font-size: 52px; font-weight: 700; line-height: 1; margin-bottom: 5px;}

.gpa-row { display: flex; gap: 15px; align-items: center; margin-bottom: 15px; flex-wrap: wrap; background: var(--bg-color); padding: 15px; border-radius: 12px; border: 2px solid rgba(150, 150, 150, 0.1); }
.gpa-row .input-group { flex: 1; min-width: 100px; }
.gpa-row label { font-size: 12px; font-weight: 600; color: #888; margin-bottom: 5px; display: block; }
.gpa-row .tool-input { width: 100%; padding: 10px 15px; }
.gpa-row select.tool-input { cursor: pointer; }

.remove-btn { background: rgba(231, 76, 60, 0.1); color: #e74c3c; border: none; width: 40px; height: 40px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; transition: all 0.2s; margin-top: 20px;}
.remove-btn:hover { background: #e74c3c; color: white; }

.add-row-btn { background: transparent; border: 2px dashed rgba(150, 150, 150, 0.3); color: var(--text-color); width: 100%; padding: 15px; border-radius: 12px; font-weight: 600; cursor: pointer; transition: all 0.2s; font-family: 'Poppins', sans-serif; margin-bottom: 25px; }
.add-row-btn:hover { border-color: var(--primary-red); color: var(--primary-red); background: rgba(230, 57, 70, 0.05); }

.gpa-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; margin-bottom: 20px; }
.gpa-box { background: var(--bg-color); border: 2px solid rgba(150, 150, 150, 0.1); border-radius: 12px; padding: 20px; text-align: center; }
.gpa-box .stat-label { font-size: 14px; font-weight: 600; color: #888; margin-bottom: 8px; }
.gpa-box .stat-value { font-size: 24px; font-weight: 700; color: var(--text-color); }

/* =========================================
   DATE CALCULATOR SPECIFIC STYLES
   ========================================= */
.date-result-container { display: none; margin-top: 30px; }
.date-main-result { background: var(--primary-red); color: white; padding: 30px 20px; border-radius: 12px; text-align: center; box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3); margin-bottom: 20px; }
.date-main-result h3 { margin: 0 0 10px 0; font-size: 18px; opacity: 0.9; }
.date-main-result .cal-value { font-size: 36px; font-weight: 700; line-height: 1.2; margin-bottom: 5px;}

.date-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; margin-bottom: 20px; }
.date-box { background: var(--bg-color); border: 2px solid rgba(150, 150, 150, 0.1); border-radius: 12px; padding: 20px; text-align: center; }
.date-box .stat-label { font-size: 14px; font-weight: 600; color: #888; margin-bottom: 8px; }
.date-box .stat-value { font-size: 24px; font-weight: 700; color: var(--text-color); }

.date-input-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
@media (max-width: 600px) { .date-input-grid { grid-template-columns: 1fr; } }

/* =========================================
   PASSWORD GENERATOR SPECIFIC STYLES
   ========================================= */
.pwd-result-box { background: var(--bg-color); border: 2px solid rgba(150, 150, 150, 0.2); border-radius: 12px; padding: 20px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; position: relative; }
.pwd-text { font-family: monospace; font-size: 24px; font-weight: 700; color: var(--text-color); word-break: break-all; margin-right: 15px; }
.copy-btn { background: var(--primary-red); color: white; border: none; width: 45px; height: 45px; border-radius: 8px; cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center; transition: background 0.3s; flex-shrink: 0; }
.copy-btn:hover { background: #c0392b; }
.copy-feedback { position: absolute; top: -30px; right: 0; background: #2ecc71; color: white; padding: 4px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; opacity: 0; transition: opacity 0.3s; pointer-events: none; }

.pwd-options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 25px; }
@media (max-width: 500px) { .pwd-options-grid { grid-template-columns: 1fr; } }

.pwd-checkbox-group { display: flex; align-items: center; gap: 10px; background: rgba(150, 150, 150, 0.05); padding: 15px; border-radius: 8px; cursor: pointer; border: 1px solid rgba(150, 150, 150, 0.1); }
.pwd-checkbox-group input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary-red); cursor: pointer; }
.pwd-checkbox-group label { font-weight: 600; color: var(--text-color); cursor: pointer; user-select: none; flex-grow: 1; }

.pwd-length-container { display: flex; align-items: center; gap: 15px; margin-bottom: 25px; }
.pwd-length-slider { flex-grow: 1; accent-color: var(--primary-red); cursor: pointer; height: 6px; }
.pwd-length-input { width: 70px; text-align: center; font-weight: 700; }

.strength-meter-container { margin-top: 25px; text-align: left; }
.strength-label { font-size: 14px; font-weight: 600; color: #888; margin-bottom: 8px; display: flex; justify-content: space-between; }
.strength-bars { display: flex; gap: 5px; height: 8px; border-radius: 4px; overflow: hidden; }
.strength-bar { flex: 1; background: rgba(150, 150, 150, 0.2); transition: background 0.3s; }

/* =========================================
   UNIT CONVERSION SPECIFIC STYLES
   ========================================= */
.unit-conv-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 15px; align-items: center; margin-bottom: 25px; }
@media (max-width: 600px) { 
    .unit-conv-grid { grid-template-columns: 1fr; gap: 10px; } 
    .swap-btn-container { text-align: center; margin: 10px 0; }
    .swap-btn-container i { transform: rotate(90deg); }
}

.swap-btn { background: var(--bg-color); border: 2px solid rgba(150, 150, 150, 0.2); color: var(--primary-red); width: 45px; height: 45px; border-radius: 50%; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; transition: all 0.3s; }
.swap-btn:hover { background: var(--primary-red); color: white; border-color: var(--primary-red); transform: scale(1.05); }

.conv-result-container { display: none; margin-top: 30px; }
.conv-main-result { background: var(--primary-red); color: white; padding: 30px 20px; border-radius: 12px; text-align: center; box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3); margin-bottom: 20px; word-break: break-word; }
.conv-main-result .cal-value { font-size: 42px; font-weight: 700; line-height: 1.2; margin-bottom: 5px; }
.conv-formula { background: rgba(0,0,0,0.1); padding: 10px 15px; border-radius: 8px; font-family: monospace; font-size: 14px; margin-top: 15px; display: inline-block; }

.conv-input-group { background: rgba(150, 150, 150, 0.05); padding: 15px; border-radius: 12px; border: 1px solid rgba(150, 150, 150, 0.1); }

/* =========================================
   STATISTICS CALCULATOR SPECIFIC STYLES
   ========================================= */
.data-input-area { width: 100%; height: 120px; resize: vertical; font-family: 'Poppins', sans-serif; font-size: 16px; padding: 15px; border-radius: 12px; background: var(--bg-color); border: 2px solid rgba(150, 150, 150, 0.2); color: var(--text-color); outline: none; transition: border-color 0.3s; }
.data-input-area:focus { border-color: var(--primary-red); }

.stats-result-container { display: none; margin-top: 30px; }
.stats-main-result { background: var(--primary-red); color: white; padding: 25px 20px; border-radius: 12px; text-align: center; box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3); margin-bottom: 20px; }
.stats-main-result h3 { margin: 0 0 10px 0; font-size: 20px; opacity: 0.9; }
.stats-main-result .cal-value { font-size: 48px; font-weight: 700; line-height: 1; margin-bottom: 5px;}

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; margin-bottom: 20px; }
.stats-box { background: var(--bg-color); border: 2px solid rgba(150, 150, 150, 0.1); border-radius: 12px; padding: 20px; text-align: center; }
.stats-box .stat-label { font-size: 14px; font-weight: 600; color: #888; margin-bottom: 8px; }
.stats-box .stat-value { font-size: 24px; font-weight: 700; color: var(--text-color); word-break: break-word; }

.sorted-data-box { background: rgba(150, 150, 150, 0.05); padding: 15px; border-radius: 8px; font-family: monospace; font-size: 14px; color: var(--text-color); word-break: break-all; margin-top: 15px; border: 1px solid rgba(150, 150, 150, 0.1); }

/* =========================================
   GEOMETRY CALCULATORS (AREA & VOLUME)
   ========================================= */
.geo-result-container { display: none; margin-top: 30px; }
.geo-main-result { background: var(--primary-red); color: white; padding: 30px 20px; border-radius: 12px; text-align: center; box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3); margin-bottom: 20px; }
.geo-main-result h3 { margin: 0 0 10px 0; font-size: 20px; opacity: 0.9; }
.geo-main-result .cal-value { font-size: 48px; font-weight: 700; line-height: 1.1; margin-bottom: 5px; word-break: break-word;}

.shape-inputs { display: none; /* Hidden by default, toggled via JS */ }
.shape-inputs.active { display: block; animation: fadeIn 0.3s ease-in-out; }

.formula-display { background: rgba(150, 150, 150, 0.05); padding: 15px; border-radius: 8px; font-family: monospace; font-size: 16px; color: var(--text-color); text-align: center; border: 1px solid rgba(150, 150, 150, 0.1); margin-top: 15px; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   TRIANGLE CALCULATORS SPECIFIC STYLES
   ========================================= */
.tri-result-container { display: none; margin-top: 30px; }
.tri-main-result { background: var(--primary-red); color: white; padding: 25px 20px; border-radius: 12px; text-align: center; box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3); margin-bottom: 20px; }
.tri-main-result h3 { margin: 0 0 10px 0; font-size: 20px; opacity: 0.9; }
.tri-main-result .cal-value { font-size: 48px; font-weight: 700; line-height: 1.1; margin-bottom: 5px; word-break: break-word;}

.tri-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 15px; margin-bottom: 20px; }
.tri-box { background: var(--bg-color); border: 2px solid rgba(150, 150, 150, 0.1); border-radius: 12px; padding: 15px; text-align: center; }
.tri-box .stat-label { font-size: 14px; font-weight: 600; color: #888; margin-bottom: 5px; }
.tri-box .stat-value { font-size: 22px; font-weight: 700; color: var(--text-color); }

.tri-instruction { text-align: center; font-size: 14px; font-weight: 600; color: var(--primary-red); margin-bottom: 20px; padding: 10px; background: rgba(230, 57, 70, 0.1); border-radius: 8px; }

/* =========================================
   QUADRATIC CALCULATOR SPECIFIC STYLES
   ========================================= */
.quad-result-container { display: none; margin-top: 30px; }
.quad-main-result { background: var(--primary-red); color: white; padding: 25px 20px; border-radius: 12px; text-align: center; box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3); margin-bottom: 20px; }
.quad-main-result h3 { margin: 0 0 15px 0; font-size: 20px; opacity: 0.9; }
.quad-roots { font-size: 32px; font-weight: 700; line-height: 1.3; word-break: break-word; margin-bottom: 5px; }

.quad-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; margin-bottom: 20px; }
.quad-box { background: var(--bg-color); border: 2px solid rgba(150, 150, 150, 0.1); border-radius: 12px; padding: 15px; text-align: center; }
.quad-box .stat-label { font-size: 14px; font-weight: 600; color: #888; margin-bottom: 8px; }
.quad-box .stat-value { font-size: 20px; font-weight: 700; color: var(--text-color); font-family: monospace; }

.quad-equation { background: rgba(150, 150, 150, 0.05); padding: 15px; border-radius: 8px; font-family: 'Poppins', sans-serif; font-size: 22px; font-weight: 600; color: var(--text-color); text-align: center; border: 1px solid rgba(150, 150, 150, 0.1); margin-bottom: 20px; letter-spacing: 1px;}

/* =========================================
   HEALTH CALCULATORS (BODY FAT, PREGNANCY, IDEAL WEIGHT)
   ========================================= */
.health-result-container { display: none; margin-top: 30px; }
.health-main-result { background: var(--primary-red); color: white; padding: 30px 20px; border-radius: 12px; text-align: center; box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3); margin-bottom: 20px; }
.health-main-result h3 { margin: 0 0 10px 0; font-size: 20px; opacity: 0.9; }
.health-main-result .cal-value { font-size: 48px; font-weight: 700; line-height: 1.1; margin-bottom: 5px; }

.health-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 15px; margin-bottom: 20px; }
.health-box { background: var(--bg-color); border: 2px solid rgba(150, 150, 150, 0.1); border-radius: 12px; padding: 20px; text-align: center; }
.health-box .stat-label { font-size: 14px; font-weight: 600; color: #888; margin-bottom: 8px; }
.health-box .stat-value { font-size: 24px; font-weight: 700; color: var(--text-color); }

.gender-toggle { display: flex; gap: 15px; margin-bottom: 15px; }
.gender-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; color: var(--text-color); }
.gender-label input { accent-color: var(--primary-red); width: 18px; height: 18px; cursor: pointer; }

/* =========================================
   FINANCE CALCULATORS (TAX, INTEREST, RETIREMENT, CURRENCY)
   ========================================= */
.fin-result-container { display: none; margin-top: 30px; }
.fin-main-result { background: var(--primary-red); color: white; padding: 30px 20px; border-radius: 12px; text-align: center; box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3); margin-bottom: 20px; }
.fin-main-result h3 { margin: 0 0 10px 0; font-size: 20px; opacity: 0.9; }
.fin-main-result .cal-value { font-size: 48px; font-weight: 700; line-height: 1.1; margin-bottom: 5px; word-break: break-word; }

.fin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 15px; margin-bottom: 20px; }
.fin-box { background: var(--bg-color); border: 2px solid rgba(150, 150, 150, 0.1); border-radius: 12px; padding: 20px; text-align: center; }
.fin-box .stat-label { font-size: 14px; font-weight: 600; color: #888; margin-bottom: 8px; }
.fin-box .stat-value { font-size: 22px; font-weight: 700; color: var(--text-color); }
.fin-box .stat-value.success { color: #2ecc71; }
.fin-box .stat-value.danger { color: #e74c3c; }

.input-with-symbol { position: relative; width: 100%; }
.input-with-symbol .symbol { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); font-weight: 600; color: #888; }
.input-with-symbol.right-symbol .symbol { left: auto; right: 15px; }
.input-with-symbol input, .input-with-symbol select { padding-left: 35px; width: 100%; text-align: left; }
.input-with-symbol.right-symbol input { padding-left: 15px; padding-right: 40px; }

/* =========================================
   ADVANCED FINANCE CALCULATORS SPECIFIC STYLES
   ========================================= */
.adv-calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
@media (max-width: 768px) { .adv-calc-grid { grid-template-columns: 1fr; } }

.adv-input-section { background: rgba(150, 150, 150, 0.03); padding: 20px; border-radius: 12px; border: 1px solid rgba(150, 150, 150, 0.1); }
.adv-input-section h3 { margin-top: 0; font-size: 16px; color: var(--primary-red); margin-bottom: 15px; border-bottom: 2px solid rgba(230, 57, 70, 0.2); padding-bottom: 5px; }

.fin-result-container { display: none; margin-top: 30px; }
.fin-main-result { background: var(--primary-red); color: white; padding: 30px 20px; border-radius: 12px; text-align: center; box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3); margin-bottom: 20px; }
.fin-main-result h3 { margin: 0 0 10px 0; font-size: 20px; opacity: 0.9; }
.fin-main-result .cal-value { font-size: 48px; font-weight: 700; line-height: 1.1; margin-bottom: 5px; word-break: break-word; }

.fin-breakdown-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; background: var(--bg-color); border-radius: 8px; overflow: hidden; border: 1px solid rgba(150, 150, 150, 0.2); }
.fin-breakdown-table th { background: var(--primary-red); color: white; padding: 12px; text-align: left; }
.fin-breakdown-table td { padding: 12px; border-bottom: 1px solid rgba(150, 150, 150, 0.1); font-weight: 600; color: var(--text-color); }
.fin-breakdown-table tr:last-child td { border-bottom: none; }
.fin-breakdown-table .amount { text-align: right; font-family: monospace; font-size: 16px; }

.input-with-symbol { position: relative; width: 100%; margin-bottom: 15px; }
.input-with-symbol .symbol { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); font-weight: 600; color: #888; }
.input-with-symbol.right-symbol .symbol { left: auto; right: 15px; }
.input-with-symbol input, .input-with-symbol select { padding-left: 35px; width: 100%; text-align: left; }
.input-with-symbol.right-symbol input { padding-left: 15px; padding-right: 40px; }
