/**
 * ASPECTRATIFY - ASPECT RATIO CALCULATOR
 * Theme: Purple/Pink (Creative Design) + Blue (Professional Tools) + Dark Modern
 */

/* ================================
   CSS VARIABLES
   ================================ */

:root {
    /* Primary Colors - Creative Design Theme */
    --purple-primary: #8b5cf6;
    --purple-dark: #7c3aed;
    --purple-light: #a78bfa;

    /* Secondary Colors - Professional Tools */
    --pink-primary: #ec4899;
    --pink-dark: #db2777;
    --pink-light: #f472b6;

    /* Accent Colors */
    --blue-primary: #3b82f6;
    --cyan-accent: #06b6d4;
    --indigo-deep: #6366f1;

    /* Neutral Colors */
    --dark-bg: #0f172a;
    --dark-surface: #1e293b;
    --dark-card: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    --gradient-secondary: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
    --gradient-card: linear-gradient(145deg, #1e293b 0%, #334155 100%);
    --gradient-text: linear-gradient(135deg, #8b5cf6 0%, #ec4899 50%, #3b82f6 100%);

    /* Effects */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-glow-purple: 0 0 30px rgba(139, 92, 246, 0.3);
    --shadow-glow-pink: 0 0 30px rgba(236, 72, 153, 0.3);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ================================
   GLOBAL RESET & BASE STYLES
   ================================ */

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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ================================
   SCROLL PROGRESS BAR
   ================================ */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--gradient-primary);
    z-index: 10000;
    transition: width 0.1s ease;
    box-shadow: var(--shadow-glow-purple);
}

/* ================================
   NAVBAR
   ================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    padding: 1rem 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
    transition: transform var(--transition-medium);
}

.navbar.hidden {
    transform: translateY(-100%);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-medium);
}

.nav-links a:hover {
    color: var(--purple-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

/* ================================
   CONTAINER
   ================================ */

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

/* ================================
   BACKGROUND ANIMATED ELEMENTS
   ================================ */

.ratio-icon {
    position: fixed;
    font-size: 48px;
    opacity: 0.08;
    pointer-events: none;
    z-index: 1;
    animation: float-ratio 25s ease-in-out infinite;
}

@keyframes float-ratio {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }
    25% {
        transform: translateY(-30px) rotate(5deg) scale(1.1);
    }
    50% {
        transform: translateY(-15px) rotate(-5deg) scale(0.9);
    }
    75% {
        transform: translateY(-40px) rotate(3deg) scale(1.05);
    }
}

.grid-wave {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.05) 0%, transparent 70%);
    left: -300px;
    pointer-events: none;
    z-index: 1;
    animation: wave-grid 20s ease-in-out infinite;
}

@keyframes wave-grid {
    0%, 100% {
        transform: scale(1) translateX(0);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.3) translateX(150px);
        opacity: 0.6;
    }
}

/* ================================
   HERO SECTION
   ================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 0 4rem;
    position: relative;
    z-index: 10;
    background: radial-gradient(ellipse at top, rgba(139, 92, 246, 0.1) 0%, transparent 60%);
}

.logo-wrapper {
    margin-bottom: 2rem;
}

.hero-logo {
    width: 180px;
    height: 180px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 30px;
    box-shadow: var(--shadow-glow-purple);
    animation: logo-pulse 3s ease-in-out infinite;
}

.ratio-symbol {
    font-size: 6rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

@keyframes logo-pulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        box-shadow: 0 8px 32px rgba(139, 92, 246, 0.3);
    }
    50% {
        transform: scale(1.05) rotate(5deg);
        box-shadow: 0 12px 48px rgba(139, 92, 246, 0.5);
    }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 5s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.tagline {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.description {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

/* ================================
   BUTTONS
   ================================ */

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.125rem;
    text-decoration: none;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow-purple);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--blue-primary);
}

.btn-secondary:hover {
    background: var(--blue-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    width: 0;
    height: 0;
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: ripple-animation 0.6s ease-out;
}

@keyframes ripple-animation {
    to {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* ================================
   BADGES
   ================================ */

.badges {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.badge {
    padding: 0.5rem 1rem;
    background: var(--dark-surface);
    border: 1px solid var(--purple-primary);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--purple-light);
    transition: all var(--transition-medium);
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

/* ================================
   ANIMATION CLASSES
   ================================ */

[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}

/* ================================
   SECTION COMMON STYLES
   ================================ */

section {
    padding: 5rem 0;
    position: relative;
    z-index: 10;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ================================
   FEATURES SECTION
   ================================ */

.features {
    background: var(--dark-surface);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--gradient-card);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(139, 92, 246, 0.1);
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-medium);
    z-index: 0;
}

.feature-card:hover::before {
    opacity: 0.1;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--purple-primary);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.3);
}

.feature-card > * {
    position: relative;
    z-index: 1;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* ================================
   CALCULATOR DEMO SECTION
   ================================ */

.calculator-demo {
    background: var(--dark-bg);
}

.demo-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.step-card {
    text-align: center;
    padding: 2rem;
    background: var(--gradient-card);
    border-radius: 16px;
    border: 1px solid rgba(139, 92, 246, 0.1);
    transition: all var(--transition-medium);
}

.step-card:hover {
    transform: translateY(-8px);
    border-color: var(--purple-primary);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.25);
}

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

.step-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.step-card p {
    color: var(--text-muted);
}

/* ================================
   USE CASES SECTION
   ================================ */

.use-cases {
    background: var(--dark-surface);
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.use-case-card {
    background: var(--gradient-card);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(236, 72, 153, 0.2);
    text-align: center;
    transition: all var(--transition-medium);
}

.use-case-card:hover {
    transform: translateY(-8px);
    border-color: var(--pink-primary);
    box-shadow: 0 12px 40px rgba(236, 72, 153, 0.3);
}

.use-case-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.use-case-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--pink-light);
}

.use-case-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* ================================
   COMMON RATIOS SECTION
   ================================ */

.common-ratios {
    background: var(--dark-bg);
}

.ratios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
}

.ratio-card {
    background: var(--gradient-card);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    text-align: center;
    transition: all var(--transition-medium);
}

.ratio-card:hover {
    transform: translateY(-8px);
    border-color: var(--blue-primary);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.3);
}

.ratio-visual {
    width: 100%;
    background: var(--gradient-primary);
    border-radius: 8px;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.ratio-visual::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
}

.ratio-visual::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
}

.ratio-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--blue-light);
    font-weight: 700;
}

.ratio-card p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ================================
   SUPPORT DEVELOPMENT SECTION
   ================================ */

.support-section {
    background: linear-gradient(180deg, var(--darker-bg) 0%, var(--dark-surface) 100%);
    padding: 6rem 0;
}

.support-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}


.support-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.support-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
}







/* ================================
   CTA SECTION
   ================================ */

.cta-section {
    background: var(--dark-surface);
}

.cta-box {
    background: var(--gradient-card);
    padding: 3rem;
    border-radius: 20px;
    border: 2px solid rgba(139, 92, 246, 0.2);
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-box h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.cta-box p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

/* ================================
   FOOTER
   ================================ */

.footer {
    background: var(--dark-bg);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(139, 92, 246, 0.1);
}

.footer p {
    color: var(--text-muted);
    margin: 0.25rem 0;
}

.footer a {
    color: var(--purple-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer a:hover {
    color: var(--purple-light);
}

/* ================================
   LANGUAGE SWITCHER
   ================================ */

.language-switcher {
    position: relative;
    display: inline-block;
}

.language-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 10px 20px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.language-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

.globe-icon {
    font-size: 1.2em;
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 20px;
    min-width: 400px;
    max-height: 500px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.language-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-dropdown-header {
    font-size: 1.1em;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

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

.language-option {
    padding: 12px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8f9fa;
    border: 2px solid transparent;
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.language-option:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(5px);
    border-color: transparent;
}

.language-option.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.language-flag {
    font-size: 1.3em;
}

/* Custom scrollbar for language dropdown */
.language-dropdown::-webkit-scrollbar {
    width: 8px;
}

.language-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.language-dropdown::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.language-dropdown::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }

    .hero {
        padding: 4rem 0 3rem;
    }

    .hero-logo {
        width: 120px;
        height: 120px;
    }

    .ratio-symbol {
        font-size: 4rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .features-grid,
    .demo-steps,
    .use-cases-grid,
    .ratios-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 3rem 0;
    }

    .cta-box {
        padding: 2rem;
    }

    /* Language Panel Mobile */
    .language-dropdown {
        min-width: 320px;
        max-width: 90vw;
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(-10px);
    }

    .language-dropdown.active {
        transform: translateX(-50%) translateY(0);
    }

    .language-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .nav-links {
        display: none;
    }
}
