/* CardAK Landing Page Styles */
/* Inspired by DevToys.app with modern dark theme aesthetics */

/* Dark Theme (Default) */
:root,
[data-theme="dark"] {
    --primary-color: #0066cc;
    --primary-dark: #004499;
    --secondary-color: #6c757d;
    --accent-color: #00d4aa;
    --success-color: #28a745;
    --background-color: #0a0a0a;
    --surface-color: #1a1a1a;
    --card-background: rgba(26, 26, 26, 0.8);
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #808080;
    --border-color: rgba(255, 255, 255, 0.1);
    --gradient-primary: linear-gradient(135deg, #0066cc, #00d4aa);
    --gradient-background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --box-shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.4);
    --devtoys-dark: #1a1a1a;
    --devtoys-darker: #0a0a0a;
    --navbar-bg: rgba(10, 10, 10, 0.95);
    --navbar-bg-scroll: rgba(10, 10, 10, 0.98);
    --code-bg: #0a0a0a;
    --code-header-bg: #1a1a1a;
}

/* Light Theme */
[data-theme="light"] {
    --primary-color: #0066cc;
    --primary-dark: #004499;
    --secondary-color: #6c757d;
    --accent-color: #00b894;
    --success-color: #28a745;
    --background-color: #ffffff;
    --surface-color: #f8f9fa;
    --card-background: rgba(255, 255, 255, 0.8);
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    --border-color: rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #0066cc, #00b894);
    --gradient-background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --box-shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.15);
    --devtoys-dark: #f8f9fa;
    --devtoys-darker: #ffffff;
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --navbar-bg-scroll: rgba(255, 255, 255, 0.98);
    --code-bg: #f8f9fa;
    --code-header-bg: #e9ecef;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--gradient-background);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.section-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Navigation */
.navbar {
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary) !important;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

/* Custom Logo Styles */
.navbar-logo {
    height: 3rem; /* Half of 6rem = 3rem (2x original size) */
    width: auto; /* Let width adjust naturally */
    filter: invert(1); /* Make logo white for dark theme */
    transition: all 0.3s ease;
    margin-right: 0.5rem; /* Normal spacing */
}

[data-theme="light"] .navbar-logo {
    filter: invert(0); /* Make logo black for light theme */
}

.navbar-nav .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none !important;
    border: none !important;
    color: var(--text-secondary) !important;
    padding: 0.5rem !important;
    margin: 0 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.theme-toggle:hover {
    background: var(--primary-color) !important;
    color: white !important;
    transform: scale(1.1) rotate(15deg);
}

.theme-toggle:focus {
    box-shadow: 0 0 0 2px var(--primary-color);
    outline: none;
}

.theme-icon {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

/* Light theme adjustments */
[data-theme="light"] .navbar {
    background: var(--navbar-bg);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .navbar-brand,
[data-theme="light"] .nav-link {
    color: var(--text-primary) !important;
}

[data-theme="light"] .theme-toggle {
    color: var(--text-secondary) !important;
}

/* Light theme code preview */
[data-theme="light"] .code-preview {
    background: var(--code-bg);
    border: 1px solid rgba(0, 102, 204, 0.3);
}

[data-theme="light"] .code-header {
    background: var(--code-header-bg);
    border-bottom: 1px solid rgba(0, 102, 204, 0.2);
}

[data-theme="light"] .code-body {
    background: linear-gradient(145deg, var(--code-bg) 0%, rgba(248, 249, 250, 0.8) 100%);
}

[data-theme="light"] .code-line:hover {
    background: rgba(0, 102, 204, 0.08);
}

[data-theme="light"] .code-value {
    color: #495057;
}

[data-theme="light"] .code-success {
    color: #198754;
}

/* Light theme geometric shapes */
[data-theme="light"] .geometric-shape {
    opacity: 0.05;
}

[data-theme="light"] .dot-pattern {
    opacity: 0.15;
}

/* Light theme wave dividers */
[data-theme="light"] .wave1 use {
    fill: rgba(0, 102, 204, 0.05) !important;
}

[data-theme="light"] .wave2 use {
    fill: rgba(0, 184, 148, 0.08) !important;
}

[data-theme="light"] .wave3 use {
    fill: rgba(248, 249, 250, 0.9) !important;
}

/* Light theme button fixes */
[data-theme="light"] .btn-outline-light {
    border: 2px solid var(--primary-color);
    color: var(--primary-color) !important;
    background: transparent;
}

[data-theme="light"] .btn-outline-light:hover {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color);
}

[data-theme="light"] .btn-outline-light:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 102, 204, 0.25);
}

[data-theme="light"] .btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color) !important;
    background: transparent;
}

[data-theme="light"] .btn-outline-primary:hover {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color);
}

/* Dark theme button styles (explicit for consistency) */
[data-theme="dark"] .btn-outline-light {
    border: 2px solid var(--primary-color);
    color: white !important;
    background: transparent;
}

[data-theme="dark"] .btn-outline-light:hover {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color);
}

[data-theme="dark"] .btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: white !important;
    background: transparent;
}

[data-theme="dark"] .btn-outline-primary:hover {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: var(--gradient-background);
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 8rem 0 4rem;
}

.hero-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 2rem; /* Original spacing */
}

.hero-logo {
    height: 8rem; /* Half of 16rem = 8rem (2x original size) */
    width: auto; /* Let width adjust naturally */
    /* Apply blue color theme instead of inverting */
    color: var(--primary-color);
    transition: all 0.3s ease;
}

/* Ensure object element inherits sizing */
object.hero-logo {
    pointer-events: none;
}

[data-theme="light"] .hero-logo {
    /* Keep the same blue color for light theme */
    color: var(--primary-color);
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 400;
}

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

.hero-buttons {
    margin-bottom: 2rem;
}

.hero-version {
    margin-top: 2rem;
}

/* DevToys-style Animated Background */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.geometric-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.1;
}

.geometric-shape {
    position: absolute;
    border-radius: 2px;
    animation: geometricFloat 12s ease-in-out infinite;
    background: var(--gradient-primary);
}

.shape-1 {
    width: 60px;
    height: 4px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    transform: rotate(15deg);
}

.shape-2 {
    width: 80px;
    height: 6px;
    top: 40%;
    right: 15%;
    animation-delay: 2s;
    transform: rotate(-10deg);
}

.shape-3 {
    width: 40px;
    height: 3px;
    top: 65%;
    left: 20%;
    animation-delay: 4s;
    transform: rotate(25deg);
}

.shape-4 {
    width: 100px;
    height: 5px;
    top: 80%;
    right: 25%;
    animation-delay: 6s;
    transform: rotate(-20deg);
}

.shape-5 {
    width: 30px;
    height: 2px;
    top: 15%;
    right: 35%;
    animation-delay: 8s;
    transform: rotate(35deg);
}

.shape-6 {
    width: 70px;
    height: 4px;
    top: 55%;
    left: 60%;
    animation-delay: 10s;
    transform: rotate(-5deg);
}

/* Enhanced Floating dots pattern with random movement */
.floating-dots {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.dot-pattern {
    position: absolute;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.2;
    animation: randomFloat 15s ease-in-out infinite;
}

/* Generate dots with random sizes */
.dot-1 { 
    width: 6px; height: 6px;
    top: 25%; left: 15%; 
    animation-delay: 1s;
    animation-duration: 18s;
}
.dot-2 { 
    width: 3px; height: 3px;
    top: 45%; left: 85%; 
    animation-delay: 3s;
    animation-duration: 12s;
}
.dot-3 { 
    width: 8px; height: 8px;
    top: 70%; left: 75%; 
    animation-delay: 5s;
    animation-duration: 20s;
}
.dot-4 { 
    width: 4px; height: 4px;
    top: 85%; left: 25%; 
    animation-delay: 7s;
    animation-duration: 16s;
}
.dot-5 { 
    width: 5px; height: 5px;
    top: 35%; left: 45%; 
    animation-delay: 2s;
    animation-duration: 14s;
}
.dot-6 { 
    width: 7px; height: 7px;
    top: 60%; left: 35%; 
    animation-delay: 4s;
    animation-duration: 22s;
}
.dot-7 { 
    width: 3px; height: 3px;
    top: 20%; left: 70%; 
    animation-delay: 6s;
    animation-duration: 13s;
}
.dot-8 { 
    width: 6px; height: 6px;
    top: 90%; left: 60%; 
    animation-delay: 8s;
    animation-duration: 19s;
}
.dot-9 { 
    width: 4px; height: 4px;
    top: 15%; left: 50%; 
    animation-delay: 9s;
    animation-duration: 17s;
}
.dot-10 { 
    width: 5px; height: 5px;
    top: 75%; left: 10%; 
    animation-delay: 11s;
    animation-duration: 15s;
}
.dot-11 { 
    width: 3px; height: 3px;
    top: 40%; left: 90%; 
    animation-delay: 12s;
    animation-duration: 21s;
}
.dot-12 { 
    width: 7px; height: 7px;
    top: 55%; left: 20%; 
    animation-delay: 14s;
    animation-duration: 16s;
}

/* Shooting stars container */
.shooting-stars {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

/* Shooting star styles */
.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--accent-color);
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 6px 2px var(--accent-color);
}

.shooting-star::before {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
    transform-origin: left center;
}

/* Animation keyframes */
@keyframes geometricFloat {
    0%, 100% { 
        transform: translateY(0px) translateX(0px) rotate(var(--initial-rotation, 0deg)); 
        opacity: 0.1;
    }
    25% { 
        transform: translateY(-15px) translateX(10px) rotate(calc(var(--initial-rotation, 0deg) + 5deg)); 
        opacity: 0.15;
    }
    50% { 
        transform: translateY(-8px) translateX(-5px) rotate(calc(var(--initial-rotation, 0deg) - 3deg)); 
        opacity: 0.2;
    }
    75% { 
        transform: translateY(-20px) translateX(15px) rotate(calc(var(--initial-rotation, 0deg) + 8deg)); 
        opacity: 0.1;
    }
}

/* Enhanced random floating animation for dots */
@keyframes randomFloat {
    0%, 100% { 
        transform: translateY(0px) translateX(0px) scale(1); 
        opacity: 0.2;
    }
    25% { 
        transform: translateY(-30px) translateX(20px) scale(1.1); 
        opacity: 0.4;
    }
    50% { 
        transform: translateY(-15px) translateX(-15px) scale(0.9); 
        opacity: 0.6;
    }
    75% { 
        transform: translateY(-40px) translateX(10px) scale(1.2); 
        opacity: 0.3;
    }
}

/* Shooting star animation - diagonal movement */
@keyframes shootingStar {
    0% {
        opacity: 0;
        transform: translateX(-100px) translateY(-100px);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateX(calc(100vw + 100px)) translateY(calc(100vh + 100px));
    }
}

@keyframes shootingStarTail {
    0% {
        width: 0;
    }
    30% {
        width: 100px;
    }
    100% {
        width: 0;
    }
}

/* Legacy dot float for compatibility */
@keyframes dotFloat {
    0%, 100% { 
        transform: translateY(0px) scale(1); 
        opacity: 0.3;
    }
    50% { 
        transform: translateY(-25px) scale(1.2); 
        opacity: 0.6;
    }
}

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

/* Buttons */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: var(--box-shadow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-hover);
    background: var(--gradient-primary);
}

.btn-outline-light, .btn-outline-primary {
    border: 2px solid var(--primary-color);
    padding: 10px 28px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    background: transparent;
}

.btn-outline-light:hover, .btn-outline-primary:hover {
    transform: translateY(-3px);
    background: var(--primary-color);
    box-shadow: var(--box-shadow);
}

/* Sections */
section {
    padding: 6rem 0;
}

/* Features section with wave integration */
.features-section {
    background: var(--surface-color);
    position: relative;
    z-index: 1; /* Behind the wave */
    padding: 2rem 0 6rem 0; /* Adjusted padding for wave overlap */
}

.features-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px; /* Make the line slightly thicker for better visibility */
    background: var(--gradient-primary);
    z-index: 3; /* Above the wave */
}

/* Feature Cards */
.feature-card {
    background: var(--card-background);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    height: 100%;
}

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

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    color: var(--accent-color);
}

.feature-card h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

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

/* Use Cases Section */
.use-cases-section {
    background: var(--background-color);
    padding: 8rem 0;
}

.use-case-list {
    margin-top: 2rem;
}

.use-case-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.use-case-item i {
    color: var(--success-color);
    margin-right: 1rem;
    font-size: 1.2rem;
}

/* DevToys-style Code Preview */
.code-preview {
    background: var(--devtoys-darker);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(0, 102, 204, 0.2);
    margin-top: 2rem;
    backdrop-filter: blur(20px);
}

.code-header {
    background: var(--devtoys-dark);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(0, 102, 204, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-title {
    color: var(--primary-color);
    font-family: 'SF Mono', 'Monaco', 'Menlo', 'Roboto Mono', monospace;
    font-size: 0.9rem;
    flex-grow: 1;
    font-weight: 500;
}

.code-dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.dot:hover {
    transform: scale(1.2);
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #28ca42; }

.code-body {
    padding: 1.5rem;
    font-family: 'SF Mono', 'Monaco', 'Menlo', 'Roboto Mono', monospace;
    font-size: 0.9rem;
    background: linear-gradient(145deg, var(--devtoys-darker) 0%, rgba(25, 25, 25, 0.8) 100%);
}

.code-line {
    margin-bottom: 0.5rem;
    display: flex;
    transition: all 0.3s ease;
}

.code-line:hover {
    background: rgba(0, 102, 204, 0.05);
    padding-left: 0.5rem;
    margin-left: -0.5rem;
    border-radius: 4px;
}

.code-key {
    color: var(--accent-color);
    min-width: 100px;
    margin-right: 1rem;
    font-weight: 600;
}

.code-value {
    color: #d1d5db;
    font-weight: 400;
}

.code-success {
    color: #10b981;
    font-weight: 600;
}

/* Platform Cards */
.platforms-section {
    background: var(--surface-color);
}

.platform-card {
    background: var(--card-background);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    height: 100%;
}

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

.platform-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.platform-card:hover .platform-icon {
    transform: scale(1.1);
    color: var(--accent-color);
}

/* Platform Logo (for SVG images) */
.platform-logo {
    height: 3.5rem; /* Match platform-icon font-size */
    width: auto;
    /* Apply primary color theme to match other icons */
    filter: brightness(0) saturate(100%) invert(43%) sepia(96%) saturate(1352%) hue-rotate(187deg) brightness(101%) contrast(101%);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.platform-card:hover .platform-logo {
    transform: scale(1.1);
    /* Apply accent color on hover */
    filter: brightness(0) saturate(100%) invert(67%) sepia(61%) saturate(2159%) hue-rotate(146deg) brightness(99%) contrast(101%);
}

/* Light theme adjustments for platform logo */
[data-theme="light"] .platform-logo {
    /* Keep the same blue color for light theme */
    filter: brightness(0) saturate(100%) invert(43%) sepia(96%) saturate(1352%) hue-rotate(187deg) brightness(101%) contrast(101%);
}

[data-theme="light"] .platform-card:hover .platform-logo {
    /* Keep the same accent color for light theme hover */
    filter: brightness(0) saturate(100%) invert(67%) sepia(61%) saturate(2159%) hue-rotate(146deg) brightness(99%) contrast(101%);
}

.platform-card h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.platform-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.platform-features {
    color: var(--text-muted);
    line-height: 1.6;
}


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

.footer-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.footer-logo {
    height: 3rem; /* Half of 6rem = 3rem (2x original size) */
    width: auto; /* Let width adjust naturally */
    filter: invert(1); /* Make logo white for dark theme */
    transition: all 0.3s ease;
    margin-right: 0.5rem; /* Normal spacing */
}

[data-theme="light"] .footer-logo {
    filter: invert(0); /* Make logo black for light theme */
}

.footer-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.footer-link:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer-divider {
    border-color: var(--border-color);
    margin: 3rem 0 2rem;
}

.footer-copyright, .footer-version {
    color: var(--text-muted);
    margin: 0;
}

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

.footer-copyright a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .section-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .code-preview {
        margin-top: 3rem;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 80vh;
    }
    
    .hero-content {
        padding: 6rem 0 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    section {
        padding: 4rem 0;
    }
    
    .feature-card, .platform-card {
        padding: 2rem 1.5rem;
    }
    
    .footer-links {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 2rem;
        margin-top: 2rem;
    }
    
    .theme-toggle {
        margin: 0.25rem;
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-icon {
        font-size: 3rem;
    }
    
    .hero-logo {
        height: 6rem; /* Half of 12rem = 6rem (2x original mobile size) */
        width: auto; /* Let width adjust naturally on mobile */
    }
    
    object.hero-logo {
        height: 6rem;
        width: auto;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .hero-buttons .btn:last-child {
        margin-bottom: 0;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .code-header {
        padding: 0.8rem 1rem;
    }
    
    .code-title {
        font-size: 0.8rem;
    }
    
    .code-body {
        padding: 1rem;
        font-size: 0.8rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Loading and Performance */
.lazyload {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazyloaded {
    opacity: 1;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Language Selector Styles */
.nav-language-selector {
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3px;
    margin-left: 10px;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    user-select: none;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-1px);
}

.lang-option.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 6px rgba(0, 102, 204, 0.3);
}

.flag {
    font-size: 1rem;
}

/* Light theme language selector */
[data-theme="light"] .nav-language-selector {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .lang-option {
    color: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .lang-option:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

[data-theme="light"] .lang-option.active {
    background: var(--primary-color);
    color: white;
}

@media (max-width: 991px) {
    .nav-language-selector {
        margin-left: 0;
        margin-top: 10px;
        justify-content: center;
    }
}

/* Focus styles for accessibility */
.btn:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Horizontal Moving Blue Line Divider */
.wave-divider {
    position: relative;
    height: 4px;
    background: transparent;
    margin-bottom: -2px;
    z-index: 2;
    overflow: hidden;
}

.wave-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        transparent 15%, 
        #0066cc 30%, 
        #00d4aa 50%, 
        #0066cc 70%, 
        transparent 85%, 
        transparent 100%);
    animation: moveHorizontal 12s linear infinite;
    z-index: 3;
}

/* Animation for horizontal movement */
@keyframes moveHorizontal {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(50%);
    }
}

/* Pause animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .wave-divider::before {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        background: #0066cc;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #0066cc, #00d4aa);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fallback for older browsers */
.scroll-to-top {
    background: #0066cc; /* Fallback if gradient fails */
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
    background: linear-gradient(135deg, #004499, #00d4aa);
}

.scroll-to-top:active {
    transform: translateY(-3px) scale(1.05);
}

/* Mobile scroll to top adjustments */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --background-color: #000000;
        --surface-color: #111111;
        --text-primary: #ffffff;
        --border-color: #ffffff;
    }
    
    .scroll-to-top {
        background: #ffffff;
        color: #000000;
        border: 2px solid #ffffff;
    }
}
