/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #818cf8;
    --secondary-color: #a78bfa;
    --accent-color: #06b6d4;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --glass-bg: rgba(15, 23, 42, 0.3);
    --glass-border: rgba(148, 163, 184, 0.2);
    --shadow-light: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 16px 40px rgba(0, 0, 0, 0.4);
    --shadow-heavy: 0 24px 48px rgba(0, 0, 0, 0.5);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-bg-1: #020617;
    --dark-bg-2: #0f172a;
    --dark-bg-3: #1e293b;
    --dark-bg-4: #334155;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--dark-bg-1);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Performance optimizations */
* {
    transform-style: preserve-3d;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Enable hardware acceleration for animations */
.shape, .calc-card, .feature, .faq-item {
    will-change: transform;
    transform: translateZ(0);
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Performance-based adaptive styles */
.low-performance .shape,
.low-performance .calc-card:hover,
.low-performance .feature:hover {
    animation: none !important;
    transition: none !important;
    transform: none !important;
}

.low-performance .bg-animation::before {
    animation: none !important;
}

.high-performance .shape {
    animation-duration: 12s;
}

.high-performance .calc-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Optimized transforms for better performance */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Optimized Parallax Background with Mountains/Earth */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(180deg, 
        #0a0f1c 0%, 
        #1a1f2e 25%, 
        #2a2f3e 75%, 
        #1e293b 100%);
}

/* Stars Layer */
.bg-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 20px 30px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 40px 70px, rgba(129, 140, 248, 0.6), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(167, 139, 250, 0.5), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1px 1px at 160px 30px, rgba(6, 182, 212, 0.6), transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: starsTwinkle 20s linear infinite;
    opacity: 0.4;
}

@keyframes starsTwinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Mountain Layers */
.floating-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Far Mountains */
.shape-1 {
    position: absolute;
    bottom: 0;
    left: -10%;
    width: 120%;
    height: 60%;
    background: linear-gradient(to top, rgba(30, 41, 59, 0.8), transparent);
    clip-path: polygon(0% 100%, 0% 60%, 10% 50%, 20% 65%, 35% 45%, 50% 55%, 65% 40%, 80% 50%, 90% 45%, 100% 60%, 100% 100%);
    transform: translateZ(-300px) scale(1.5);
    opacity: 0.4;
}

/* Mid Mountains */
.shape-2 {
    position: absolute;
    bottom: 0;
    left: -10%;
    width: 120%;
    height: 50%;
    background: linear-gradient(to top, rgba(51, 65, 85, 0.9), transparent);
    clip-path: polygon(0% 100%, 0% 70%, 15% 55%, 25% 45%, 40% 60%, 55% 35%, 70% 50%, 85% 40%, 100% 55%, 100% 100%);
    transform: translateZ(-200px) scale(1.3);
    opacity: 0.6;
}

/* Near Mountains */
.shape-3 {
    position: absolute;
    bottom: 0;
    left: -10%;
    width: 120%;
    height: 40%;
    background: linear-gradient(to top, rgba(71, 85, 105, 1), rgba(30, 41, 59, 0.8));
    clip-path: polygon(0% 100%, 0% 80%, 20% 60%, 30% 70%, 45% 50%, 60% 65%, 75% 45%, 90% 60%, 100% 70%, 100% 100%);
    transform: translateZ(-100px) scale(1.1);
    opacity: 0.8;
}

/* Floating Orbs/Planets */
.shape-4 {
    position: absolute;
    top: 20%;
    right: 15%;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(129, 140, 248, 0.8), rgba(30, 41, 59, 0.4));
    box-shadow: 
        0 0 40px rgba(129, 140, 248, 0.3),
        inset -10px -10px 20px rgba(0, 0, 0, 0.3);
    animation: planetFloat 20s ease-in-out infinite;
    opacity: 0.7;
}

.shape-5 {
    position: absolute;
    top: 40%;
    left: 10%;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 30%, rgba(167, 139, 250, 0.6), rgba(51, 65, 85, 0.3));
    box-shadow: 
        0 0 30px rgba(167, 139, 250, 0.3),
        inset -8px -8px 15px rgba(0, 0, 0, 0.4);
    animation: planetFloat 15s ease-in-out infinite reverse;
    opacity: 0.5;
}

.shape-6 {
    position: absolute;
    top: 60%;
    right: 30%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 25%, rgba(6, 182, 212, 0.7), rgba(15, 23, 42, 0.4));
    box-shadow: 
        0 0 20px rgba(6, 182, 212, 0.4),
        inset -6px -6px 12px rgba(0, 0, 0, 0.3);
    animation: planetFloat 12s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes planetFloat {
    0%, 100% {
        transform: translateY(0px) translateX(0px) scale(1);
    }
    33% {
        transform: translateY(-20px) translateX(10px) scale(1.05);
    }
    66% {
        transform: translateY(-10px) translateX(-15px) scale(0.95);
    }
}

/* Enhanced Glass Effects for Dark Theme */
.glass-header, .glass-footer {
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(129, 140, 248, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(129, 140, 248, 0.1),
        0 0 0 1px rgba(129, 140, 248, 0.05);
    position: relative;
}

.glass-header::before,
.glass-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(129, 140, 248, 0.05) 0%, 
        transparent 50%, 
        rgba(6, 182, 212, 0.03) 100%);
    pointer-events: none;
    z-index: -1;
}

/* Header Styles */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.nav-logo i {
    color: var(--accent-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: white;
    transform: translateY(-2px);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 8px;
    border-radius: 8px;
    background: rgba(129, 140, 248, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(129, 140, 248, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
}

.hamburger:hover {
    background: rgba(129, 140, 248, 0.2);
    transform: scale(1.05);
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: linear-gradient(90deg, #818cf8, #a78bfa);
    transition: all 0.3s ease;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(129, 140, 248, 0.3);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 20px 60px;
    position: relative;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: white;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.calculator-preview {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
    backdrop-filter: blur(25px);
    border: 2px solid rgba(129, 140, 248, 0.3);
    border-radius: 24px;
    padding: 1.8rem;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 8px 32px rgba(129, 140, 248, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: calculatorGlow 3s ease-in-out infinite alternate;
    position: relative;
    max-width: 320px;
    margin: 0 auto;
}

.calculator-preview::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(129, 140, 248, 0.4), 
        rgba(167, 139, 250, 0.3), 
        rgba(6, 182, 212, 0.3), 
        rgba(129, 140, 248, 0.4));
    border-radius: 26px;
    z-index: -1;
    animation: borderGlow 2s linear infinite;
}

@keyframes calculatorGlow {
    from {
        box-shadow: 
            0 25px 50px rgba(0, 0, 0, 0.5),
            0 8px 32px rgba(129, 140, 248, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    to {
        box-shadow: 
            0 25px 50px rgba(0, 0, 0, 0.6),
            0 12px 40px rgba(129, 140, 248, 0.4),
            0 0 80px rgba(129, 140, 248, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
}

@keyframes borderGlow {
    0%, 100% { 
        opacity: 0.6; 
        transform: rotate(0deg);
    }
    50% { 
        opacity: 1; 
        transform: rotate(180deg);
    }
}

/* Calculator responsive design */
@media (max-width: 768px) {
    .calculator-preview {
        padding: 2rem;
        max-width: 300px;
    }
    
    .calc-btn {
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    #calc-result {
        font-size: 2rem;
    }
    
    .display-screen {
        padding: 1.5rem 1rem;
        min-height: 70px;
    }
}

@media (max-width: 480px) {
    .calculator-preview {
        padding: 1.5rem;
        max-width: 280px;
    }
    
    .calc-btn {
        padding: 0.8rem;
        font-size: 1rem;
        border-radius: 12px;
    }
    
    #calc-result {
        font-size: 1.8rem;
    }
}

.calc-display {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    text-align: right;
}

.display-screen {
    font-size: 2rem;
    color: #00ff88;
    font-family: 'Courier New', monospace;
}

.typing-text {
    animation: typing 2s steps(12) infinite;
}

@keyframes typing {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.calc-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.btn-row {
    display: flex;
    gap: 0.4rem;
}

.calc-btn {
    flex: 1;
    padding: 0.9rem;
    border: 1px solid rgba(129, 140, 248, 0.2);
    border-radius: 14px;
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.15), 
        rgba(255, 255, 255, 0.05));
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-family: 'Inter', sans-serif;
}

.calc-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.5s;
}

.calc-btn:hover {
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.25), 
        rgba(255, 255, 255, 0.1));
    transform: translateY(-2px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(129, 140, 248, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(129, 140, 248, 0.4);
}

.calc-btn:hover::before {
    left: 100%;
}

.calc-btn:active {
    transform: translateY(0) scale(0.98);
    transition: all 0.1s ease;
}

.calc-btn.operator {
    background: linear-gradient(145deg, 
        rgba(129, 140, 248, 0.9), 
        rgba(99, 102, 241, 0.8));
    border-color: rgba(129, 140, 248, 0.5);
    color: white;
    font-weight: 800;
}

.calc-btn.operator:hover {
    background: linear-gradient(145deg, 
        rgba(129, 140, 248, 1), 
        rgba(99, 102, 241, 0.9));
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(129, 140, 248, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.calc-btn.clear {
    background: linear-gradient(145deg, 
        rgba(239, 68, 68, 0.9), 
        rgba(220, 38, 38, 0.8));
    border-color: rgba(239, 68, 68, 0.5);
    color: white;
    font-weight: 800;
}

.calc-btn.clear:hover {
    background: linear-gradient(145deg, 
        rgba(239, 68, 68, 1), 
        rgba(220, 38, 38, 0.9));
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(239, 68, 68, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.calc-btn.equals {
    background: linear-gradient(145deg, 
        rgba(16, 185, 129, 0.9), 
        rgba(5, 150, 105, 0.8));
    border-color: rgba(16, 185, 129, 0.5);
    color: white;
    font-weight: 800;
    font-size: 1.3rem;
}

.calc-btn.equals:hover {
    background: linear-gradient(145deg, 
        rgba(16, 185, 129, 1), 
        rgba(5, 150, 105, 0.9));
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(16, 185, 129, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px) scale(1.01);
}

.calc-btn.zero {
    flex: 2; /* Make zero button wider */
}

/* Bottom row layout for equals button */
.bottom-row {
    display: flex;
    gap: 0.4rem;
    align-items: stretch;
}

.left-section {
    flex: 3;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.sub-row {
    display: flex;
    gap: 0.4rem;
}

.sub-row .calc-btn {
    flex: 1;
}

.bottom-row .calc-btn.equals {
    flex: 1;
    min-width: calc(25% - 0.375rem); /* Match other button widths */
}

/* Calculator display improvements */
.calc-display {
    margin-bottom: 1rem;
}

.display-screen {
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.95), rgba(15, 23, 42, 0.9));
    border: 2px solid rgba(129, 140, 248, 0.2);
    border-radius: 16px;
    padding: 1.2rem 1.5rem;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
}

.display-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(129, 140, 248, 0.05) 0%, 
        transparent 50%, 
        rgba(6, 182, 212, 0.05) 100%);
    pointer-events: none;
}

#calc-result {
    font-size: 2rem;
    font-weight: 700;
    color: #00ff88;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Courier New', monospace;
    text-align: right;
    word-break: break-all;
    line-height: 1.1;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

/* Calculators Section */
.calculators-section {
    padding: 80px 20px;
    background: rgba(2, 6, 23, 0.3);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(129, 140, 248, 0.1);
    border-bottom: 1px solid rgba(129, 140, 248, 0.1);
    position: relative;
}

.calculators-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(129, 140, 248, 0.02) 0%, 
        transparent 50%, 
        rgba(6, 182, 212, 0.02) 100%);
    pointer-events: none;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
}

.calculators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.calc-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(129, 140, 248, 0.2);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(129, 140, 248, 0.1);
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    overflow: hidden;
}

.calc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(129, 140, 248, 0.1), 
        transparent);
    transition: left 0.5s ease;
}

.calc-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(129, 140, 248, 0.3),
        inset 0 1px 0 rgba(129, 140, 248, 0.2);
    border-color: rgba(129, 140, 248, 0.4);
}

.calc-card:hover::before {
    left: 100%;
}

.card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    box-shadow: var(--shadow-medium);
}

.card-icon i {
    font-size: 2rem;
    color: white;
}

.calc-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
}

.calc-card p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.card-btn {
    background: var(--gradient-accent);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
}

.card-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-heavy);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid var(--glass-border);
}

.modal-header h2 {
    color: white;
    font-size: 1.8rem;
    font-weight: 600;
}

.close {
    color: rgba(255, 255, 255, 0.7);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: white;
}

.modal-body {
    padding: 2rem;
    color: white;
}

/* Calculator Styles */
.calculator {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.calc-form {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.calc-result {
    background: var(--gradient-primary);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
    box-shadow: var(--shadow-medium);
}

.result-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.result-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

/* FAQ Section */
.faq-section {
    padding: 80px 20px;
    background: rgba(30, 41, 59, 0.2);
    backdrop-filter: blur(15px);
    position: relative;
}

.faq-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(167, 139, 250, 0.02) 0%, 
        transparent 50%, 
        rgba(129, 140, 248, 0.02) 100%);
    pointer-events: none;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(129, 140, 248, 0.15);
    border-radius: 15px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(129, 140, 248, 0.05);
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(129, 140, 248, 0.3);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(129, 140, 248, 0.1);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.05);
}

.faq-question h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

.faq-question i {
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding: 0 2rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* About Section */
.about-section {
    padding: 80px 20px;
    background: rgba(51, 65, 85, 0.15);
    backdrop-filter: blur(20px);
    position: relative;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(6, 182, 212, 0.02) 0%, 
        transparent 50%, 
        rgba(167, 139, 250, 0.02) 100%);
    pointer-events: none;
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.about-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 2rem;
}

.about-text p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature {
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(129, 140, 248, 0.2);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(129, 140, 248, 0.05);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(129, 140, 248, 0.03) 0%, 
        transparent 50%, 
        rgba(6, 182, 212, 0.02) 100%);
    pointer-events: none;
}

.feature:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(129, 140, 248, 0.3),
        inset 0 1px 0 rgba(129, 140, 248, 0.1);
    border-color: rgba(129, 140, 248, 0.4);
}

.feature i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.feature h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
}

.feature p {
    color: rgba(255, 255, 255, 0.8);
}

/* Footer */
.glass-footer {
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
}

.footer-logo i {
    color: var(--accent-color);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background: rgba(2, 6, 23, 0.95);
        backdrop-filter: blur(40px);
        -webkit-backdrop-filter: blur(40px);
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        padding: 8rem 2rem 2rem;
        border: none;
        z-index: 999;
        overflow-y: auto;
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    }
    
    .nav-menu::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, 
            rgba(129, 140, 248, 0.1) 0%, 
            rgba(15, 23, 42, 0.9) 25%, 
            rgba(30, 41, 59, 0.95) 75%, 
            rgba(51, 65, 85, 0.1) 100%);
        backdrop-filter: blur(60px);
        -webkit-backdrop-filter: blur(60px);
        z-index: -1;
    }
    
    .nav-menu li {
        margin: 1.5rem 0;
        opacity: 0;
        transform: translateX(-50px);
        transition: all 0.3s ease;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu.active li {
        opacity: 1;
        transform: translateX(0);
    }
    
    .nav-menu.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-menu.active li:nth-child(2) { transition-delay: 0.2s; }
    .nav-menu.active li:nth-child(3) { transition-delay: 0.3s; }
    .nav-menu.active li:nth-child(4) { transition-delay: 0.4s; }
    .nav-menu.active li:nth-child(5) { transition-delay: 0.5s; }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .calculators-grid {
        grid-template-columns: 1fr;
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .calc-card {
        padding: 1.5rem;
    }
    
    .modal-header,
    .modal-body {
        padding: 1.5rem;
    }
}

/* Matrix Input Styles */
.matrix-input {
    display: grid;
    gap: 0.5rem;
    margin: 1rem 0;
}

.matrix-row {
    display: flex;
    gap: 0.5rem;
}

.matrix-cell {
    width: 60px;
    height: 60px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
}

/* Pokemon Type Chart */
.type-chart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.type-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.type-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
}

.effectiveness {
    font-size: 1.2rem;
    font-weight: 700;
}

.super-effective {
    color: #4ade80;
}

.not-very-effective {
    color: #f87171;
}

.no-effect {
    color: #6b7280;
}

.normal-damage {
    color: white;
}

/* Talent Tree Styles */
.talent-tree {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1rem 0;
}

.talent-branch {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.branch-title {
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
    text-align: center;
}

.talent-point {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

.talent-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.counter-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    cursor: pointer;
    font-weight: 600;
}

.counter-btn:hover {
    background: var(--primary-color);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.hidden {
    display: none;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success and Error States */
.success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

/* Animation Delays */
.calc-card:nth-child(1) { animation-delay: 0.1s; }
.calc-card:nth-child(2) { animation-delay: 0.2s; }
.calc-card:nth-child(3) { animation-delay: 0.3s; }
.calc-card:nth-child(4) { animation-delay: 0.4s; }
.calc-card:nth-child(5) { animation-delay: 0.5s; }
.calc-card:nth-child(6) { animation-delay: 0.6s; }
.calc-card:nth-child(7) { animation-delay: 0.7s; }
.calc-card:nth-child(8) { animation-delay: 0.8s; }
.calc-card:nth-child(9) { animation-delay: 0.9s; }
.calc-card:nth-child(10) { animation-delay: 1.0s; }
