:root {
    --bg-deep: #0a0a0f;
    --bg-card: #13131f;
    --bg-glass: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    --accent-teal: #14b8a6;
    --accent-teal-glow: rgba(20, 184, 166, 0.5);
    --border-subtle: rgba(255, 255, 255, 0.1);
    --font-display: 'Instrument Serif', serif;
    --font-body: system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation - RESPONSIVE FIX */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
}

.main-nav.scrolled {
    background: rgba(10, 10, 15, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 1.5rem;
}

.nav-logo img {
    height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-teal);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    padding: 0.75rem 1.5rem;
    background: var(--accent-teal);
    color: var(--bg-deep);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-cta:hover {
    background: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--accent-teal-glow);
}

/* Hamburger Button */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger-line {
    width: 28px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    padding: 100px 2rem 2rem;
    transition: right 0.4s ease;
    z-index: 999;
}

.mobile-menu.open {
    right: 0;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.5rem;
    font-family: var(--font-display);
    transition: color 0.3s ease;
}

.mobile-nav-links a:hover {
    color: var(--accent-teal);
}

.mobile-cta {
    margin-top: 2rem;
    padding: 1rem 2rem;
    background: var(--accent-teal);
    color: var(--bg-deep) !important;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

/* RESPONSIVE BREAKPOINTS - THE KEY FIX */
@media (max-width: 1200px) {
    .desktop-only {
        display: none !important;
    }
    .hamburger {
        display: flex;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
    }
    .nav-logo span {
        display: none;
    }
}

/* Footer Styles */
.main-footer {
    background: var(--bg-card);
    padding: 4rem 2rem 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border-subtle);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    color: var(--text-secondary);
    margin: 1rem 0;
}

.footer-column h4 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-family: var(--font-display);
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--accent-teal);
}

.coming-soon {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.coming-soon em {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
    font-style: normal;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Responsive image handling */
.security-stamp,
.stamp-image {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Hide on mobile if not loading */
@media (max-width: 768px) {
    .security-stamp {
        display: none;
    }
    /* Or provide fallback */
    .security-stamp-container::before {
        content: '🔐';
        font-size: 3rem;
    }
}

/* Hero with character integration */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 8rem 4rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero h1 em {
    color: var(--accent-teal);
    font-style: italic;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn-primary {
    padding: 1rem 2rem;
    background: var(--accent-teal);
    color: var(--bg-deep);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--accent-teal-glow);
}

.btn-secondary {
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hero-stats {
    display: flex;
    gap: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.hero-visual {
    position: relative;
}

.hero-image {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.floating-characters {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-char {
    position: absolute;
    width: 80px;
    height: auto;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}

.floating-char.char-1 {
    top: -20px;
    right: 10%;
    animation-delay: 0s;
}

.floating-char.char-2 {
    bottom: 10%;
    left: -30px;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 6rem 2rem 2rem;
    }
    .hero-visual {
        order: -1;
        max-width: 500px;
        margin: 0 auto;
    }
    .floating-characters {
        display: none;
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-stats {
        justify-content: center;
    }
}

/* Enhanced feature cards */
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-teal-glow), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-teal);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 40px var(--accent-teal-glow);
}

.feature-card:hover::before {
    opacity: 0.1;
}

/* Click indicator */
.feature-card::after {
    content: 'Click to explore →';
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    font-size: 0.8rem;
    color: var(--accent-teal);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.feature-card:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* Focus state for accessibility */
.feature-card:focus {
    outline: 2px solid var(--accent-teal);
    outline-offset: 4px;
}

/* Onboarding widget */
.onboarding-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.onboarding-trigger {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem 0.75rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.onboarding-trigger:hover {
    border-color: var(--accent-teal);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 20px var(--accent-teal-glow);
}

.guide-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--accent-teal);
}

.guide-prompt {
    color: var(--text-primary);
    font-weight: 500;
}

.onboarding-panel {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.onboarding-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.onboarding-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.panel-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.onboarding-header h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.onboarding-header p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.close-panel {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.onboarding-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.onboard-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    color: var(--text-primary);
}

.onboard-option:hover {
    background: rgba(20, 184, 166, 0.1);
    border-color: var(--accent-teal);
}

.option-emoji {
    font-size: 1.5rem;
}

.option-text {
    font-size: 0.95rem;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-glass) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        var(--bg-glass) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Button loading state */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Page transition */
.page-transition {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 2rem;
    background: var(--accent-teal);
    color: var(--bg-deep);
    text-decoration: none;
    border-radius: 0 0 8px 8px;
    z-index: 10000;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

/* Focus visible */
*:focus-visible {
    outline: 2px solid var(--accent-teal);
    outline-offset: 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Get Started Page Styles */
.get-started-page {
    padding: 8rem 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.get-started-hero {
    text-align: center;
    margin-bottom: 4rem;
}

.get-started-hero h1 {
    font-family: var(--font-display);
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.get-started-hero p {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

.get-started-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.option-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    transition: all 0.3s ease;
}

.option-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-teal);
}

.option-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.option-card h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.option-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    flex-grow: 1;
}

.option-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: var(--bg-glass);
    border-radius: 20px;
    color: var(--text-muted);
}

.option-card.featured {
    border-color: var(--accent-teal);
    background: linear-gradient(to bottom right, var(--bg-card), rgba(20, 184, 166, 0.05));
}

.option-card.featured .option-tag {
    background: var(--accent-teal);
    color: var(--bg-deep);
    font-weight: 600;
}

/* 404 Page Styles */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.error-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1000px;
}

.error-visual img {
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.error-content h1 {
    font-family: var(--font-display);
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.error-code {
    color: var(--accent-teal);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.error-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.error-hint a {
    color: var(--text-secondary);
    text-decoration: none;
}

.error-hint a:hover {
    color: var(--accent-teal);
}

@media (max-width: 768px) {
    .error-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .error-actions {
        justify-content: center;
    }
}
