/* CalcHubmaster - Main Stylesheet */

/* ========================================
   CSS Variables (Design System)
   ======================================== */
:root {
    /* Colors - Light Mode */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.1);
    --secondary: #10b981;
    --secondary-hover: #059669;
    --accent: #f59e0b;
    --error: #ef4444;
    --warning: #f97316;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-hero: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 50%, rgba(236, 72, 153, 0.1) 100%);
    
    /* Light Mode Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Spacing */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;
}

/* Alias Variables for Compatibility */
:root {
    --card-bg: var(--bg-card);
    --bg-darker: var(--bg-tertiary);
    --border-color: var(--border);
}

/* Dark Mode */
.dark-mode {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border: #334155;
    --border-light: #1e293b;
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.2);
    --card-bg: #1e293b;
    --bg-darker: #0f172a;
    --border-color: #334155;
}

/* ========================================
   Base Styles
   ======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition-slow);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
}

input {
    font-family: inherit;
    outline: none;
}


/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius);
    transition: var(--transition);
}

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

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    font-size: 18px;
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--primary-light);
}

/* ========================================
   Header
   ======================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    background: rgba(var(--bg-primary), 0.8);
}

.dark-mode .header {
    background: rgba(15, 23, 42, 0.85);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: var(--gradient-primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 20px;
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
}

.logo-pro {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-sun, .icon-moon {
    display: none;
}

.dark-mode .icon-moon { display: block; }
.dark-mode .icon-sun { display: none; }
:not(.dark-mode) .icon-sun { display: block; }
:not(.dark-mode) .icon-moon { display: none; }

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    background: none;
}

/* Mobile Navigation Active */
@media (max-width: 900px) {
    .nav-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-card);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        z-index: 99;
        box-shadow: var(--shadow-lg);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    padding: 80px 0;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
}

.hero-orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(99, 102, 241, 0.3);
    top: -100px;
    left: -100px;
}

.hero-orb-2 {
    width: 500px;
    height: 500px;
    background: rgba(139, 92, 246, 0.3);
    bottom: -150px;
    right: -150px;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 60px;
    align-items: center;
}


.hero-text {
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary-light);
    border-radius: var(--radius-full);
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
}

.badge-icon {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.gradient-text {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.7;
}

/* Search Box */
.search-container {
    position: relative;
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 8px;
    box-shadow: var(--shadow-lg);
}

.search-icon {
    padding: 0 16px;
    font-size: 20px;
}

.search-input {
    flex: 1;
    padding: 14px 0;
    background: transparent;
    border: none;
    font-size: 16px;
    color: var(--text-primary);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    padding: 14px 28px;
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    border-radius: var(--radius);
    transition: var(--transition);
}

.search-btn:hover {
    opacity: 0.9;
}

/* Popular Tags */
.popular-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tag-label {
    color: var(--text-muted);
    font-size: 14px;
}

.tag {
    padding: 6px 14px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.tag:hover {
    background: var(--primary-light);
    color: var(--primary);
}


/* Hero Calculator */
.calculator-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    padding: 24px;
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.calc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calc-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.calc-mode-toggle {
    display: flex;
    gap: 4px;
    background: var(--bg-tertiary);
    padding: 4px;
    border-radius: var(--radius);
}

.mode-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    background: transparent;
    color: var(--text-muted);
    border-radius: 6px;
    transition: var(--transition);
}

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

.calc-display {
    background: var(--bg-primary);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

.dark-mode .calc-display {
    background: #0f172a;
}

.calc-history {
    font-size: 14px;
    color: var(--text-muted);
    text-align: right;
    min-height: 20px;
}

.calc-input {
    width: 100%;
    background: transparent;
    border: none;
    font-size: 32px;
    font-weight: 600;
    text-align: right;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.calc-scientific {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.calc-btn {
    padding: 18px;
    font-size: 18px;
    font-weight: 500;
    border-radius: var(--radius);
    transition: var(--transition);
}

.calc-btn:active {
    transform: scale(0.95);
}

.calc-btn.number {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.calc-btn.number:hover {
    background: var(--border);
}

.calc-btn.operator {
    background: var(--primary-light);
    color: var(--primary);
}

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

.calc-btn.func {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 14px;
}

.calc-btn.func:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.calc-btn.clear {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.calc-btn.clear:hover {
    background: #ef4444;
    color: white;
}

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

.calc-btn.equals:hover {
    opacity: 0.9;
}


/* ========================================
   Categories Section
   ======================================== */
.categories-section {
    padding: 80px 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.section-header.center {
    flex-direction: column;
    text-align: center;
}

.section-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    cursor: pointer;
    transition: var(--transition);
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
    transition: var(--transition);
}

.category-card:hover .category-icon {
    transform: scale(1.1);
}

.category-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.category-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.category-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}

/* Category Gradients */
.math-gradient { background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2)); }
.finance-gradient { background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.2)); }
.health-gradient { background: linear-gradient(135deg, rgba(244, 63, 94, 0.2), rgba(236, 72, 153, 0.2)); }
.convert-gradient { background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(249, 115, 22, 0.2)); }
.engineering-gradient { background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(168, 85, 247, 0.2)); }
.datetime-gradient { background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(20, 184, 166, 0.2)); }
.stats-gradient { background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(244, 63, 94, 0.2)); }
.programming-gradient { background: linear-gradient(135deg, rgba(100, 116, 139, 0.2), rgba(71, 85, 105, 0.2)); }


/* ========================================
   Calculator Sections
   ======================================== */
.calculator-section {
    padding: 80px 0;
}

.calculator-section.alt-bg {
    background: var(--bg-secondary);
}

.calculators-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.calc-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.calc-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.calc-card-icon {
    font-size: 28px;
    margin-bottom: 12px;
    display: block;
}

.calc-card h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
}

.calc-card p {
    font-size: 13px;
    color: var(--text-muted);
}

.view-all-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.view-all-link:hover {
    text-decoration: underline;
}

/* ========================================
   Features Section
   ======================================== */
.features-section {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}


/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 16px;
    max-width: 300px;
    font-size: 14px;
    line-height: 1.7;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.footer-column h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-column a {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    padding: 6px 0;
    transition: var(--transition);
}

.footer-column a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    font-size: 14px;
    color: var(--text-muted);
}

/* ========================================
   Modal
   ======================================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1;
}

.modal-container {
    position: relative;
    z-index: 2;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-actions {
    display: flex;
    gap: 8px;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    font-size: 24px;
    color: var(--text-muted);
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Small modal variant */
.modal-container.small {
    max-width: 400px;
}

/* Language Grid */
.language-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.lang-btn {
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.lang-btn:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.lang-btn.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.modal-body {
    padding: 24px;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

/* ========================================
   Calculator Modal Content Styles
   ======================================== */
.calc-info {
    background: var(--primary-light);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary);
}

.calc-info p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.calc-desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
    text-align: center;
}

.calc-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: var(--bg-tertiary);
    padding: 4px;
    border-radius: var(--radius);
}

.calc-tab {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.calc-tab.active {
    background: var(--primary);
    color: white;
}

.calc-tab:hover:not(.active) {
    color: var(--text-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.btn-full {
    width: 100%;
}

.result-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius);
    padding: 24px;
    margin-top: 20px;
    text-align: center;
    display: none;
}

.result-box .result-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.result-box .result-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.result-box .result-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 8px;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.result-item {
    background: var(--bg-card);
    padding: 16px;
    border-radius: var(--radius);
    text-align: center;
}

.result-item .result-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: block;
}

.result-item .result-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
}

.steps-box {
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 16px;
    display: none;
}

.steps-box .step {
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    display: none;
    margin-top: 8px;
}

.search-item {
    padding: 14px 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-light);
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: var(--primary-light);
}

.search-item strong {
    color: var(--text-primary);
}

.search-cat {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
}

.search-item.no-result {
    color: var(--text-muted);
    justify-content: center;
    cursor: default;
}

.search-item.no-result:hover {
    background: transparent;
}


/* Modal Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    color: var(--text-primary);
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--primary);
    background: var(--bg-card);
    outline: none;
}

/* Select dropdown styling */
select.form-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

select.form-input option {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 8px;
}

/* Textarea styling */
textarea.form-input {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-slider {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    appearance: none;
    cursor: pointer;
}

.form-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.result-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    margin-top: 24px;
}

.result-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.result-value {
    font-size: 42px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 20px;
}

.result-detail {
    background: var(--bg-card);
    padding: 16px;
    border-radius: var(--radius);
    text-align: center;
}

.result-detail-label {
    font-size: 12px;
    color: var(--text-muted);
}

.result-detail-value {
    font-size: 18px;
    font-weight: 600;
    margin-top: 4px;
}

.calc-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.calc-actions .btn {
    flex: 1;
}

/* Steps Section */
.steps-container {
    margin-top: 24px;
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

.steps-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 12px 0;
}

.steps-header h4 {
    font-size: 14px;
    font-weight: 600;
}

.steps-content {
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 12px;
}

.step {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.step:last-child {
    border-bottom: none;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    margin-right: 12px;
}

.formula-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 14px;
    text-align: center;
    margin: 12px 0;
}


/* Toast */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 12px;
    animation: toastSlide 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    font-size: 18px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.toast-success .toast-icon { color: #10b981; }
.toast-error .toast-icon { color: #ef4444; }
.toast-info .toast-icon { color: #3b82f6; }
.toast-warning .toast-icon { color: #f59e0b; }

.toast-message {
    flex: 1;
    font-size: 14px;
}

/* Heart Rate Zones */
.hr-zones {
    margin-top: 12px;
}

.hr-zone {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    font-size: 13px;
}

/* Countdown Display */
.countdown-display {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 12px;
}

.countdown-item {
    text-align: center;
    background: var(--bg-secondary);
    padding: 16px 20px;
    border-radius: var(--radius);
}

.countdown-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.countdown-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* BMI Scale */
.bmi-scale {
    height: 8px;
    background: linear-gradient(to right, #3498db 0%, #2ecc71 25%, #f39c12 60%, #e74c3c 100%);
    border-radius: 4px;
    position: relative;
    margin-top: 16px;
}

.bmi-marker {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--text-primary);
    border-radius: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid var(--bg-card);
}

@keyframes toastSlide {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1200px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text {
        max-width: 100%;
    }
    
    .hero-calculator {
        display: none;
    }
    
    .search-container {
        max-width: 600px;
        margin: 0 auto 20px;
    }
    
    .popular-tags {
        justify-content: center;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .calculators-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-title {
        font-size: 42px;
    }
    
    .calculators-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 16px;
    }
    
    .hero {
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .search-box {
        flex-direction: column;
        padding: 12px;
    }
    
    .search-input {
        width: 100%;
        text-align: center;
    }
    
    .search-btn {
        width: 100%;
        margin-top: 8px;
    }
    
    .categories-grid,
    .calculators-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .modal-container {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}


/* ================================
   LEGAL PAGES STYLES
================================ */
.legal-page {
    padding: 120px 0 60px;
    min-height: calc(100vh - 200px);
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 48px;
    border: 1px solid var(--border-color);
}

.legal-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.legal-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.legal-section {
    margin-bottom: 32px;
}

.legal-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-top: 16px;
}

.legal-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 20px 0 12px;
}

.legal-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 12px;
}

.legal-section ul {
    margin: 12px 0 12px 24px;
    color: var(--text-secondary);
}

.legal-section li {
    line-height: 1.8;
    margin-bottom: 8px;
}

.legal-section a {
    color: var(--primary);
    text-decoration: none;
}

.legal-section a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .legal-content {
        padding: 24px;
        margin: 0 16px;
    }
    .legal-title {
        font-size: 1.8rem;
    }
}


/* ================================
   IMPROVED SCIENTIFIC CALCULATOR
================================ */
.sci-calc-pro {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    max-width: 400px;
    margin: 0 auto;
}

.sci-display-pro {
    background: var(--bg-darker);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}

.sci-history-pro {
    font-size: 0.85rem;
    color: var(--text-muted);
    min-height: 20px;
    text-align: right;
    margin-bottom: 4px;
}

.sci-input-pro {
    width: 100%;
    background: transparent;
    border: none;
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
    outline: none;
    font-family: 'SF Mono', Monaco, monospace;
}

.sci-mode {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 16px;
    padding: 8px;
    background: var(--bg-darker);
    border-radius: 8px;
}

.mode-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.mode-label input[type="radio"] {
    accent-color: var(--primary);
}

.sci-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.sci-calc-pro .sci-btn {
    padding: 14px 8px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sci-calc-pro .sci-btn.num {
    background: var(--bg-darker);
    color: var(--text-primary);
}

.sci-calc-pro .sci-btn.num:hover {
    background: var(--border-color);
}

.sci-calc-pro .sci-btn.func {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    font-size: 0.9rem;
}

.sci-calc-pro .sci-btn.func:hover {
    background: rgba(99, 102, 241, 0.25);
}

.sci-calc-pro .sci-btn.op {
    background: rgba(16, 185, 129, 0.15);
    color: var(--secondary);
    font-size: 1.2rem;
}

.sci-calc-pro .sci-btn.op:hover {
    background: rgba(16, 185, 129, 0.25);
}

.sci-calc-pro .sci-btn.clear {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

.sci-calc-pro .sci-btn.clear:hover {
    background: rgba(239, 68, 68, 0.25);
}

.sci-calc-pro .sci-btn.equals {
    background: var(--gradient-primary);
    color: white;
    font-size: 1.3rem;
}

.sci-calc-pro .sci-btn.equals:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.sci-calc-pro .sci-btn:active {
    transform: scale(0.95);
}

@media (max-width: 480px) {
    .sci-calc-pro .sci-btn {
        padding: 12px 6px;
        font-size: 0.9rem;
    }
    .sci-input-pro {
        font-size: 1.5rem;
    }
}


/* ================================
   HOW TO USE SECTION
================================ */
.how-to-section {
    padding: 80px 0;
}

.how-to-content {
    display: grid;
    gap: 40px;
}

.how-to-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.how-to-step {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0 auto 16px;
}

.how-to-step h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.how-to-step p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.how-to-text {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid var(--border-color);
}

.how-to-text h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.how-to-text p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.how-to-text p:last-child {
    margin-bottom: 0;
}

/* ================================
   CONTACT PAGE STYLES
================================ */
.contact-box {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 24px;
    margin: 16px 0;
}

.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.contact-icon {
    font-size: 2rem;
}

.contact-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.contact-item p {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.contact-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 1.1rem;
}

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

.contact-form {
    margin-top: 24px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.success-message {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--secondary);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    margin-top: 24px;
}

.success-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
}

.success-message p {
    color: var(--secondary);
    font-weight: 500;
}

/* Checkbox styling */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}


/* Calculator Explanation Section */
.calc-explanation {
    margin-top: 32px;
    padding: 28px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-radius: 16px;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.calc-explanation h3 {
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 24px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(99, 102, 241, 0.2);
}

.calc-explanation h3:first-child {
    margin-top: 0;
}

.calc-explanation p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.calc-explanation p:last-child {
    margin-bottom: 0;
}

.calc-explanation strong {
    color: var(--text-primary);
    font-weight: 600;
}

.calc-explanation ul, .calc-explanation ol {
    margin: 12px 0;
    padding-left: 24px;
    color: var(--text-secondary);
}

.calc-explanation li {
    margin-bottom: 8px;
    line-height: 1.7;
}


/* =============================================
   UI ENHANCEMENTS - December 2025
   ============================================= */

/* Smooth Page Load Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calculator-card {
    animation: fadeInUp 0.4s ease-out;
}

/* Enhanced Calculator Card Hover */
.calculator-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.2);
}

/* Pulse Animation for Buttons */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.btn-primary:hover {
    animation: pulse 1s infinite;
}

/* Improved Result Box Styling */
.result-box {
    animation: fadeInUp 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.result-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Better Form Input Focus States */
.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    transform: scale(1.01);
}

/* Enhanced Category Cards */
.category-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.category-card:hover .category-icon {
    transform: scale(1.15) rotate(5deg);
}

/* Smooth Scrollbar for Code/JSON areas */
textarea.form-input::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

textarea.form-input::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

textarea.form-input::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

textarea.form-input::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Better Button Group Styling */
.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-group .btn {
    flex: 1;
    min-width: 120px;
}

/* Grade Calculator Row Styling */
.grade-row {
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 10px;
}

/* Toast Notification Enhancement */
.toast {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile Improvements */
@media (max-width: 640px) {
    .result-grid {
        grid-template-columns: 1fr !important;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row .form-group {
        width: 100%;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .calculator-card {
        padding: 16px;
    }
}

/* Dark Mode Enhancements */
.dark-mode .result-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
}

.dark-mode .calculator-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Highlight Animation for Search Results */
@keyframes highlight {
    0% { background-color: rgba(99, 102, 241, 0.3); }
    100% { background-color: transparent; }
}

.highlight {
    animation: highlight 2s ease-out;
}

/* Better Select Dropdown */
select.form-input {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236366f1' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    appearance: none;
}

/* Tooltip Enhancement */
[title] {
    position: relative;
}

[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Improved Copy Button */
.copy-btn {
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

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

/* Number Input Spinner Hide (for cleaner look) */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Better hr styling */
hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

/* Mark/Highlight styling */
mark {
    background: linear-gradient(120deg, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%);
    padding: 2px 6px;
    border-radius: 4px;
}


/* ========================================
   Google AdSense Ad Containers
   ======================================== */
.ad-container {
    padding: 20px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 20px 0;
}

.ad-container .container {
    text-align: center;
}

.ad-container ins.adsbygoogle {
    display: block;
    min-height: 90px;
}

/* Hide empty ad containers when ads don't load */
.ad-container ins.adsbygoogle[data-ad-status="unfilled"] {
    display: none !important;
}

/* Responsive ad adjustments */
@media (max-width: 768px) {
    .ad-container {
        padding: 15px 0;
        margin: 15px 0;
    }
}
