/* ===================================
   CALCULATOR HUB - PRODUCTION CSS
   Dark Theme | High Visibility | Accessible
   =================================== */

:root {
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-utility: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-financial: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    
    /* Colors - High Contrast */
    --color-bg: #0a0a1a;
    --color-card: #1a1a2e;
    --color-text: #f0f0f5;
    --color-text-muted: #b8b8c8;
    --color-border: #2d2d44;
    --color-accent: #667eea;
    
    /* Typography - Larger & More Readable */
    --font-display: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'Space Mono', monospace;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.4);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-display);
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== ANIMATED BACKGROUND ===== */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 90%, rgba(67, 233, 123, 0.08) 0%, transparent 40%);
    z-index: -1;
    animation: bgShift 20s ease-in-out infinite;
}

@keyframes bgShift {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

.page-wrapper {
    position: relative;
    min-height: 100vh;
}

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

/* ===== HEADER ===== */
.header {
    padding: 28px 0;
    backdrop-filter: blur(10px);
    background: rgba(10, 10, 26, 0.8);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

.logo-icon {
    animation: rotate360 20s linear infinite;
}

@keyframes rotate360 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.logo-text {
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.logo-subtitle {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-weight: 500;
}

/* ===== NAVIGATION ===== */
.nav {
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 95px;
    z-index: 99;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 12px;
    padding: 12px 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.nav-menu::-webkit-scrollbar {
    height: 4px;
}

.nav-menu::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 2px;
}

.nav-link {
    display: block;
    color: var(--color-text-muted);
    text-decoration: none;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--color-text);
    background: rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.nav-link.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    padding: 24px 0;
    font-size: 15px;
    color: var(--color-text-muted);
}

.breadcrumb a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* ===== HERO SECTION ===== */
.hero {
    text-align: center;
    padding: 80px 20px 60px;
    animation: fadeInUp 0.8s ease-out;
}

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

.hero-badge {
    display: inline-block;
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.4);
    padding: 10px 24px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 28px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.hero-title {
    font-size: clamp(40px, 8vw, 68px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1.5px;
}

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

.hero-description {
    font-size: 20px;
    color: var(--color-text-muted);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ===== CATEGORY SECTIONS ===== */
.category-section {
    margin: 60px 0;
}

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

.category-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.category-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
}

.category-description {
    font-size: 17px;
    color: var(--color-text-muted);
    margin-top: 4px;
}

/* ===== CALCULATOR GRID ===== */
.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    margin-bottom: 40px;
}

.calc-card {
    position: relative;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    padding: 36px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out backwards;
}

.calc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.calc-card:hover::before {
    transform: scaleX(1);
}

.calc-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(102, 126, 234, 0.4);
}

.calc-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: transform 0.3s ease;
}

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

.calc-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--color-text);
}

.calc-description {
    font-size: 16px;
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: 24px;
}

.calc-arrow {
    font-size: 28px;
    color: var(--color-text-muted);
    transition: transform 0.3s ease;
}

.calc-card:hover .calc-arrow {
    transform: translateX(8px);
    color: var(--color-text);
}

/* ===== CALCULATOR PAGE ===== */
.calculator-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 0;
    animation: fadeInUp 0.8s ease-out;
}

.page-title {
    font-size: clamp(36px, 6vw, 52px);
    font-weight: 800;
    margin-bottom: 18px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-intro {
    font-size: 19px;
    color: var(--color-text-muted);
    margin-bottom: 44px;
    line-height: 1.8;
}

.calculator-box {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 44px;
    margin-bottom: 48px;
    box-shadow: var(--shadow-lg);
}

.calculator-box h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 36px;
    color: var(--color-text);
}

.form-group {
    margin-bottom: 28px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 17px;
    color: var(--color-text);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 16px 20px;
    background: rgba(10, 10, 26, 0.6);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    font-size: 17px;
    color: var(--color-text);
    font-family: var(--font-display);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    background: rgba(10, 10, 26, 0.9);
}

.form-group input::placeholder {
    color: var(--color-text-muted);
    opacity: 0.6;
}

.form-group small {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: var(--color-text-muted);
}

.button-group {
    display: flex;
    gap: 14px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.btn {
    padding: 16px 36px;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-display);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(161, 161, 170, 0.15);
    color: var(--color-text);
    border: 2px solid var(--color-border);
}

.btn-secondary:hover {
    background: rgba(161, 161, 170, 0.25);
    border-color: var(--color-accent);
}

.result-box {
    background: rgba(10, 10, 26, 0.6);
    border: 2px solid #667eea;
    border-radius: 18px;
    padding: 36px;
    margin-top: 36px;
    animation: slideUp 0.5s ease-out;
}

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

.result-box h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 28px;
    color: var(--color-text);
}

.result-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: rgba(26, 26, 46, 0.8);
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

.result-item.highlight {
    background: rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.result-label {
    font-weight: 600;
    font-size: 17px;
    color: var(--color-text);
}

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

.result-summary,
.disclaimer-box {
    margin-top: 24px;
    padding: 20px;
    background: rgba(254, 225, 64, 0.1);
    border-left: 4px solid #fee140;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.7;
}

.error-message {
    background: rgba(245, 87, 108, 0.15);
    border: 2px solid rgba(245, 87, 108, 0.4);
    color: #ff6b88;
    padding: 18px 24px;
    border-radius: 12px;
    margin-top: 24px;
    font-size: 16px;
    animation: shake 0.5s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* ===== INFO SECTION ===== */
.info-section {
    margin: 60px 0;
}

.info-section h2 {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 20px;
    margin-top: 44px;
    color: var(--color-text);
}

.info-section h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 32px 0 16px;
    color: var(--color-text);
}

.info-section p {
    color: var(--color-text-muted);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 17px;
}

.info-section ul,
.info-section ol {
    margin: 20px 0 20px 32px;
    color: var(--color-text-muted);
}

.info-section li {
    margin: 14px 0;
    line-height: 1.8;
    font-size: 17px;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--color-card);
    border-top: 1px solid var(--color-border);
    padding: 60px 0 32px;
    margin-top: 100px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 44px;
    margin-bottom: 44px;
}

.footer-section h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 22px;
    color: var(--color-text);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin: 14px 0;
}

.footer-section a {
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 16px;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 15px;
}

/* ===== STATIC PAGES ===== */
.static-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 24px;
    animation: fadeInUp 0.8s ease-out;
}

.static-page h1 {
    font-size: clamp(36px, 6vw, 52px);
    font-weight: 800;
    margin-bottom: 24px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.static-page h2 {
    font-size: 30px;
    font-weight: 700;
    margin: 44px 0 20px;
    color: var(--color-text);
}

.static-page h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 32px 0 16px;
    color: var(--color-text);
}

.static-page p {
    color: var(--color-text-muted);
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 17px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav {
        top: 90px;
    }
    
    .hero {
        padding: 60px 20px 40px;
    }
    
    .calculator-box {
        padding: 32px 24px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .result-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .calculator-grid {
        grid-template-columns: 1fr;
    }
}
