/* CalcGpt - Neo-Brutalist Calculator Portal CSS */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
    --color-background: #FDFDFB;
    --color-surface: #FFFFFF;
    --color-primary: #FFD84D;
    --color-secondary: #A7F3D0;
    --color-border: #000000;
    --color-text: #0A0A0A;
    --color-text-secondary: #4B5563;
    --color-text-muted: #6B7280;
    --color-error: #EF4444;
    --color-success: #22C55E;
    
    /* Category Colors */
    --color-math: #C7D2FE;
    --color-finance: #FED7AA;
    --color-health: #FBCFE8;
    --color-chemistry: #A7F3D0;
    --color-physics: #BAE6FD;
    --color-construction: #FDE68A;
    --color-conversion: #E9D5FF;
    --color-statistics: #FECDD3;
    --color-biology: #D9F99D;
    --color-food: #FDBA74;
    --color-sports: #67E8F9;
    --color-ecology: #86EFAC;
    --color-everyday: #F5D0FE;
    --color-other: #E5E7EB;
    
    --shadow-sm: 2px 2px 0px 0px rgba(0,0,0,1);
    --shadow-md: 4px 4px 0px 0px rgba(0,0,0,1);
    --shadow-lg: 6px 6px 0px 0px rgba(0,0,0,1);
    --shadow-xl: 8px 8px 0px 0px rgba(0,0,0,1);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: clip;
}

body {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
    max-width: 100vw;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--color-text);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.375rem); }

.mono {
    font-family: 'IBM Plex Mono', monospace;
}

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container { padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
    .container { padding: 0 2rem; }
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(253, 253, 251, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--color-border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--color-text);
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 900;
    box-shadow: var(--shadow-sm);
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.logo-text span {
    color: var(--color-primary);
    text-shadow: 1px 1px 0 var(--color-border);
}

/* Search */
.search-container {
    flex: 1;
    max-width: 500px;
    position: relative;
}

@media (max-width: 768px) {
    .search-container {
        position: static;
        max-width: none;
        flex: 1;
    }
    
    .search-results {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        max-width: 100vw;
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin-top: 0;
        max-height: 60vh;
    }
}

.search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    font-size: 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-surface);
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px #2563EB;
    border-color: #2563EB;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 100;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #E5E7EB;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.search-result-item:hover {
    background: #F3F4F6;
}

.search-result-item .result-name {
    font-weight: 700;
    display: block;
    margin-bottom: 0.125rem;
}

.search-result-item .result-category {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

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

/* Navigation */
.nav-menu {
    display: none;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .nav-menu {
        display: flex;
    }
}

.nav-link {
    padding: 0.5rem 1rem;
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    text-decoration: none;
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.nav-link:hover {
    background: var(--color-primary);
    border-color: var(--color-border);
    box-shadow: var(--shadow-sm);
}

.mobile-menu-btn {
    display: flex;
    padding: 0.5rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    cursor: pointer;
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-text);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translate(2px, 2px);
    box-shadow: none;
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: #F3F4F6;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Cards */
.card {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.2s;
}

.card:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--color-border);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 2px solid var(--color-border);
    background: #F9FAFB;
}

/* Category Cards */
.category-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--color-text);
}

.category-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.category-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.category-count {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* Calculator Cards */
.calc-card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    text-decoration: none;
    color: var(--color-text);
}

.calc-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.calc-card-desc {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    flex: 1;
}

.calc-card-category {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-full);
    margin-top: 1rem;
    width: fit-content;
}

/* Calculator Widget */
.calculator-widget {
    background: var(--color-background);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 2rem;
}

@media (max-width: 640px) {
    .calculator-widget {
        padding: 1.25rem;
    }
}

.calc-input-group {
    margin-bottom: 1.5rem;
}

.calc-label {
    display: block;
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.calc-input {
    width: 100%;
    padding: 1rem;
    font-size: 1.125rem;
    font-family: 'IBM Plex Mono', monospace;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    transition: all 0.2s;
}

.calc-input:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px #2563EB;
    border-color: #2563EB;
}

.calc-select {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
}

.calc-result {
    background: var(--color-text);
    color: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.calc-result-label {
    font-size: 0.875rem;
    color: #9CA3AF;
    margin-bottom: 0.5rem;
}

.calc-result-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.calc-result-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #374151;
}

.calc-result-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.calc-result-row span:first-child {
    color: #9CA3AF;
}

/* Input Row */
.input-row {
    display: grid;
    gap: 1rem;
}

@media (min-width: 640px) {
    .input-row.cols-2 { grid-template-columns: repeat(2, 1fr); }
    .input-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }

@media (min-width: 640px) {
    .grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
    .grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
    .grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Calculator Page Layout */
.calc-page-grid {
    display: grid;
    gap: 2rem;
    overflow: visible;
}

@media (min-width: 1024px) {
    .calc-page-grid {
        grid-template-columns: 1fr 380px;
    }
}

.calc-main {
    min-width: 0;
    overflow: visible;
}

.calc-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-right: 4px; /* Prevent shadow clipping */
}

@media (min-width: 1024px) {
    .calc-sidebar {
        position: sticky;
        top: 90px;
        align-self: start;
    }
}

/* Sidebar Cards */
.sidebar-card {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    overflow: visible;
}

.sidebar-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.sidebar-card-accent {
    background: var(--color-primary);
}

.related-calc-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--color-text);
    padding: 0.625rem 0.5rem;
    border-radius: var(--radius-md);
    transition: background 0.2s;
}

.related-calc-link:hover {
    background: #F3F4F6;
}

.related-calc-icon {
    width: 40px;
    height: 40px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.related-calc-name {
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.3;
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 1rem 0;
    font-size: 0.875rem;
}

.breadcrumbs ol {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.breadcrumbs li {
    display: inline-flex;
    align-items: center;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
}

.breadcrumb-item a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: var(--color-text);
    text-decoration: underline;
}

.breadcrumb-separator {
    display: inline-flex;
    align-items: center;
    margin: 0 0.5rem;
    color: var(--color-text-muted);
}

.breadcrumb-separator svg {
    width: 14px;
    height: 14px;
}

.breadcrumb-current {
    color: var(--color-text);
    font-weight: 600;
}

/* SEO Content */
.seo-content {
    line-height: 1.8;
    font-size: 1.0625rem;
    color: var(--color-text-secondary);
}

.seo-content h2 {
    margin: 2.5rem 0 1rem;
    font-size: 1.5rem;
    color: var(--color-text);
}

.seo-content h3 {
    margin: 2rem 0 0.75rem;
    font-size: 1.25rem;
    color: var(--color-text);
}

.seo-content p {
    margin-bottom: 1.25rem;
}

.seo-content ul, .seo-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

.seo-content li {
    margin-bottom: 0.5rem;
}

.seo-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--color-text);
    background: #F3F4F6;
    font-style: italic;
}

.seo-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border: 2px solid var(--color-border);
}

.seo-content th, .seo-content td {
    padding: 0.75rem 1rem;
    border: 1px solid #E5E7EB;
    text-align: left;
}

.seo-content th {
    background: #F3F4F6;
    font-weight: 700;
}

/* Hero Section */
.hero {
    padding: 5rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: var(--color-background);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(199,210,254,0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,216,77,0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(167,243,208,0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 2;
}

#particles-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero-title {
    margin-bottom: 1rem;
}

.hero-count {
    color: var(--color-primary);
    text-shadow: 2px 2px 0 var(--color-border);
    animation: countPulse 3s ease-in-out infinite;
}

@keyframes countPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; text-shadow: 2px 2px 0 var(--color-border), 0 0 20px rgba(255,216,77,0.4); }
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
    animation: fadeSlideUp 0.8s ease-out 0.2s both;
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-title {
    margin-bottom: 1rem;
    animation: fadeSlideUp 0.6s ease-out both;
}

.hero .btn {
    animation: fadeSlideUp 0.8s ease-out 0.4s both;
}

/* Section */
.section {
    padding: 3rem 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 1.75rem;
}

/* Tags */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
}

/* Footer */
.footer {
    border-top: 2px solid var(--color-border);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .footer-grid { grid-template-columns: 2fr repeat(3, 1fr); }
}

.footer-brand {
    max-width: 300px;
}

.footer-brand p {
    color: var(--color-text-secondary);
    margin-top: 1rem;
    font-size: 0.875rem;
}

.footer-title {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--color-text);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 2rem;
    border-top: 1px solid #E5E7EB;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    flex-wrap: wrap;
    gap: 1rem;
}

/* Ad Containers */
.ad-container {
    padding: 1rem;
    background: #F3F4F6;
    border: 2px dashed #D1D5DB;
    border-radius: var(--radius-md);
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-header {
    margin-bottom: 1.5rem;
}

.ad-sidebar {
    margin: 1.5rem 0;
}

.ad-content {
    margin: 2rem 0;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a, .pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-text);
    font-weight: 600;
    transition: all 0.2s;
}

.pagination a:hover {
    background: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.pagination .active {
    background: var(--color-text);
    color: var(--color-surface);
}

/* FAQ Section */
.faq-item {
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--color-surface);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
}

.faq-question:hover {
    background: #F9FAFB;
}

.faq-answer {
    padding: 0 1.5rem 1rem;
    color: var(--color-text-secondary);
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-icon {
    transition: transform 0.2s;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-background);
    z-index: 100;
    padding: 1rem;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 1rem;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-menu-links a {
    padding: 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--color-text);
    font-weight: 600;
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.hidden { display: none; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease-out;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #E5E7EB;
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Print Styles */
@media print {
    .header, .footer, .ad-container, .calc-sidebar {
        display: none;
    }
    
    .calculator-widget {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
