/*
 * VibeCreAI Components
 * Specific component styles (Header, Hero, About, Apps, Contact, Footer, etc.)
 */

/* Header Styles */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 20px;
    min-height: 80px; /* Fixed height to maintain consistency regardless of hamburger menu */
    box-sizing: border-box;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid var(--primary-color);
}

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

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    font-family: 'Born2bSportyFont', 'MinecraftFont', 'Courier New', monospace;
    font-size: 2rem;
    text-decoration: none;
    letter-spacing: 0.1em;
    display: inline-flex;
    align-items: baseline;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.logo-v, .logo-c {
    color: #ffffff;
    text-shadow:
        -1px 1px 0 #252525,
        -2px 2px 0 #252525,
        -3px 3px 0 #252525,
        -4px 4px 0 #252525,
        -5px 5px 0 #252525,
        -6px 6px 8px rgba(37, 37, 37, 0.4);
}

.logo-small {
    font-size: 1.6rem;
    color: #ffffff;
    text-shadow:
        -1px 1px 0 #252525,
        -2px 2px 0 #252525,
        -3px 3px 0 #252525,
        -4px 4px 0 #252525,
        -5px 5px 0 #252525,
        -6px 6px 8px rgba(37, 37, 37, 0.4);
}

.logo-ai {
    color: var(--primary-color);
    text-shadow:
        -1px 1px 0 #252525,
        -2px 2px 0 #252525,
        -3px 3px 0 #252525,
        -4px 4px 0 #252525,
        -5px 5px 0 #252525,
        -6px 6px 8px rgba(37, 37, 37, 0.4);
}



/* Hover effects for header logo */
.logo:hover .logo-ai {
    text-shadow:
        -1px 1px 0 #252525,
        -2px 2px 0 #252525,
        -3px 3px 0 #252525,
        -4px 4px 0 #252525,
        -5px 5px 0 #252525,
        -6px 6px 8px rgba(37, 37, 37, 0.4),
        0 0 10px color-mix(in srgb, var(--primary-color) 60%, transparent),
        0 0 20px color-mix(in srgb, var(--primary-color) 40%, transparent);
}



/* Hover effects for header VIBECRE text */
.logo:hover .logo-v,
.logo:hover .logo-c,
.logo:hover .logo-small {
    text-shadow:
        -1px 1px 0 #252525,
        -2px 2px 0 #252525,
        -3px 3px 0 #252525,
        -4px 4px 0 #252525,
        -5px 5px 0 #252525,
        -6px 6px 8px rgba(37, 37, 37, 0.4),
        0 0 10px color-mix(in srgb, var(--primary-color) 60%, transparent),
        0 0 20px color-mix(in srgb, var(--primary-color) 40%, transparent);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    font-family: 'Born2bSportyFont', 'MinecraftFont', 'Courier New', monospace;
    font-size: 1.3rem;
    color: var(--text-color);
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
    padding: 5px 10px;
    letter-spacing: 0.05em;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 8px;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    border-color: var(--primary-color);
    box-shadow: 
        0 0 15px rgba(0, 255, 255, 0.4),
        inset 0 0 15px rgba(0, 255, 255, 0.1);
}

.menu-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.menu-toggle:hover::before {
    left: 100%;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
    position: relative;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    background: var(--secondary-color);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.6);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
    background: var(--secondary-color);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.6);
}

.menu-toggle.active {
    border-color: var(--secondary-color);
    box-shadow: 
        0 0 20px rgba(255, 0, 255, 0.5),
        inset 0 0 20px rgba(255, 0, 255, 0.1);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    background-color: #00000075;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    pointer-events: none; /* Allow clicks to pass through to background */
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

body.terminal-active:not(.game-modal-open) .hero {
    height: calc(100vh + 100px);
}

body.terminal-active .cta-container {
    position: relative;
    z-index: 1001;
    pointer-events: auto;
    margin-bottom: 20px;
}

.hero-content {
    text-align: center;
    z-index: 10;
    pointer-events: auto; /* Re-enable clicks for interactive content */
}

.glitch-wrapper {
    position: relative;
    display: inline-block;
}

.hero-title {
    font-family: 'Born2bSportyFont', 'MinecraftFont', 'Courier New', monospace;
    font-size: 6rem;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-block-start: 70px;
    margin-bottom: 20px;
    position: relative;
    display: flex;
    align-items: baseline;
    justify-content: center;
    width: 100%;
    min-height: 1.2em;
    line-height: 1;
    opacity: 0;
    transform: translateY(-100px);
}


.title-v, .title-c {
    color: #ffffff;
    font-size: 7rem;
    text-shadow:
        -1px 1px 0 #252525,
        -2px 2px 0 #252525,
        -3px 3px 0 #252525,
        -4px 4px 0 #252525,
        -5px 5px 0 #252525,
        -6px 6px 0 #252525,
        -7px 7px 0 #252525,
        -8px 8px 0 #252525,
        -9px 9px 0 #252525,
        -10px 10px 20px rgba(37, 37, 37, 0.5);
}

.title-small {
    font-size: 5.8rem;
    color: #ffffff;
    text-shadow:
        -1px 1px 0 #252525,
        -2px 2px 0 #252525,
        -3px 3px 0 #252525,
        -4px 4px 0 #252525,
        -5px 5px 0 #252525,
        -6px 6px 0 #252525,
        -7px 7px 0 #252525,
        -8px 8px 0 #252525,
        -9px 9px 0 #252525,
        -10px 10px 20px rgba(37, 37, 37, 0.5);
}

.title-ai {
    color: var(--primary-color);
    font-size: 7rem;
    transition: text-shadow 0.3s ease;
    text-shadow:
        -1px 1px 0 #252525,
        -2px 2px 0 #252525,
        -3px 3px 0 #252525,
        -4px 4px 0 #252525,
        -5px 5px 0 #252525,
        -6px 6px 0 #252525,
        -7px 7px 0 #252525,
        -8px 8px 0 #252525,
        -9px 9px 0 #252525,
        -10px 10px 20px rgba(37, 37, 37, 0.5);
}

.hero-subtitle {
    font-family: 'Born2bSportyFont', 'MinecraftFont', 'Courier New', monospace;
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--primary-color);
    letter-spacing: 0.15em;
    display: flex;
    justify-content: center;
}

.tagline-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 40px;  /* Reduce space below - adjust this value */
}

.cta-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

.hero-floating-social {
    position: absolute;
    inset: 0;
    z-index: 11;
    pointer-events: none;
}

.hero-social-link {
    position: absolute;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.78);
    border: 2px solid color-mix(in srgb, var(--primary-color) 75%, #ffffff 25%);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.7),
        0 0 16px color-mix(in srgb, var(--primary-color) 28%, transparent);
    pointer-events: auto;
    transition: color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    clip-path: polygon(
        8px 0, 100% 0, 100% calc(100% - 8px),
        calc(100% - 8px) 100%, 0 100%, 0 8px
    );
}

.hero-social-link svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.hero-social-link:hover {
    animation-play-state: paused;
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(0, 0, 0, 0.92);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.85),
        0 0 24px color-mix(in srgb, var(--primary-color) 45%, transparent);
}

.hero-social-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
    animation-play-state: paused;
}

.hero-social-email {
    top: 18%;
    left: 8%;
    animation: heroSocialFloatA 5.8s ease-in-out infinite;
    animation-delay: 0s;
}

.hero-social-github {
    top: 36%;
    left: 14%;
    animation: heroSocialFloatB 6.3s ease-in-out infinite;
    animation-delay: 0.9s;
}

.hero-social-youtube {
    top: 18%;
    right: 8%;
    animation: heroSocialFloatB 6.1s ease-in-out infinite;
    animation-delay: 0.4s;
}

.hero-social-twitter {
    top: 54%;
    left: 8%;
    animation: heroSocialFloatA 5.6s ease-in-out infinite;
    animation-delay: 1.4s;
}

.hero-social-discord {
    top: 36%;
    right: 14%;
    animation: heroSocialFloatC 5.9s ease-in-out infinite;
    animation-delay: 0.7s;
}

.hero-social-kakao {
    top: 54%;
    right: 8%;
    animation: heroSocialFloatA 6.2s ease-in-out infinite;
    animation-delay: 1.1s;
}

@keyframes heroSocialFloatA {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -12px, 0);
    }
}

@keyframes heroSocialFloatB {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, 10px, 0);
    }
}

@keyframes heroSocialFloatC {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -9px, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-social-link {
        animation: none !important;
    }
}

/* Vibe Switcher Floating Action Button */
.vibe-switcher {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid var(--primary-color);
    border-radius: 0;
    cursor: pointer;
    z-index: 999;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    clip-path: polygon(
        8px 0, 100% 0, 100% calc(100% - 8px), 
        calc(100% - 8px) 100%, 0 100%, 0 8px
    );
}

.vibe-switcher::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: color-mix(in srgb, var(--primary-color) 5%, transparent);
    opacity: 0;
    transition: all 0.3s ease;
}

.vibe-switcher:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    box-shadow: 
        0 6px 30px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(0, 255, 255, 0.2);
}

.vibe-switcher:hover::before {
    opacity: 1;
}

.vibe-switcher:active {
    transform: scale(0.98);
}

.vibe-icon {
    font-family: 'Born2bSportyFont', 'MinecraftFont', 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: transform 0.3s ease;
}

.vibe-text {
    display: none;
}

.vibe-tooltip {
    font-family: 'Born2bSportyFont', 'MinecraftFont', 'Courier New', monospace;
    position: absolute;
    bottom: 70px;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    color: var(--primary-color);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.vibe-switcher:hover .vibe-tooltip {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* About Section */
.about {
    padding: 160px 30px;
    position: relative;
    z-index: 10;
    pointer-events: none; /* Allow clicks to pass through to background */
    background: linear-gradient(180deg, transparent, rgba(0, 255, 255, 0.02), transparent);
    background-color: #00000075;
}

.about .section-title, .about .section-subtitle {
    pointer-events: auto; /* Re-enable hover/tap effects on headings */
}

.about .container {
    pointer-events: auto; /* Restore interactions for section content */
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.about-card {
    background: #0000007d;
    border: 3px solid var(--primary-color);
    padding: 40px;
    position: relative;
    overflow: visible;
    transition: all 0.3s ease;
    text-align: center;
    pointer-events: auto;
    clip-path: polygon(
        12px 0, 100% 0, 100% calc(100% - 12px), 
        calc(100% - 12px) 100%, 0 100%, 0 12px
    );
}

.about-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, color-mix(in srgb, var(--primary-color) 30%, transparent), transparent);
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

.about-card:hover::after {
    width: 300%;
    height: 300%;
}

.about-card:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.2),
        var(--neon-glow);
}

.about-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: inline-block;
}

.about-card h3 {
    font-family: 'Born2bSportyFont', 'MinecraftFont', 'Courier New', monospace;
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #ffffff;
    letter-spacing: 0.05em;
}

/* Apps Section */
.apps {
    padding: 160px 30px;
    position: relative;
    background-color: #00000075;
    z-index: 10;
    pointer-events: none; /* Allow clicks to pass through to background */
}

.apps .section-title, .apps .section-subtitle {
    pointer-events: auto; /* Re-enable hover/tap effects on headings */
}

.apps .apps-container {
    pointer-events: auto; /* Restore interactions for app content */
}

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

.app-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.app-card {
    background: #0000007d;
    border: 3px solid var(--primary-color);
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: visible;
    transition: all 0.3s ease;
    cursor: pointer;
    pointer-events: auto;
    clip-path: polygon(
        12px 0, 100% 0, 100% calc(100% - 12px), 
        calc(100% - 12px) 100%, 0 100%, 0 12px
    );
    display: flex;
    flex-direction: column;
}

.app-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, color-mix(in srgb, var(--primary-color) 30%, transparent), transparent);
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
    pointer-events: none;
}

.app-card:hover::after {
    width: 300%;
    height: 300%;
}

.app-card:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.2),
        var(--neon-glow);
}

.app-icon-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary-color) 10%, transparent), color-mix(in srgb, var(--secondary-color) 10%, transparent));
    border-radius: 20px;
    position: relative;
}

.app-icon-wrapper img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
}

.status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 15px;
    background: var(--primary-color);
    color: var(--dark-bg);
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 20px;
    text-transform: uppercase;
}

.award-highlight {
    margin-bottom: 12px;
    color: #ffd978;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    font-weight: 700;
    text-transform: uppercase;
    text-shadow: 0 0 12px rgba(255, 200, 92, 0.45);
}

.app-title {
    font-family: 'Born2bSportyFont', 'MinecraftFont', 'Courier New', monospace;
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #ffffff;
    letter-spacing: 0.05em;
}

.app-description {
    margin-bottom: 20px;
    opacity: 0.9;
    line-height: 1.6;
    font-size: 0.95rem;
    min-height: 80px;
}

.app-button {
    font-family: 'Born2bSportyFont', 'MinecraftFont', 'Courier New', monospace;
    font-size: 1rem;
    padding: 10px 30px;
    background: transparent;
    border: 3px solid var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.05em;
    border-radius: 0;
    clip-path: polygon(
        8px 0, 100% 0, 100% calc(100% - 8px), 
        calc(100% - 8px) 100%, 0 100%, 0 8px
    );
    
}

.app-button:hover {
    background: var(--primary-color);
    color: var(--dark-bg);
    box-shadow: var(--neon-glow);
}

.app-buttons-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: auto;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.app-buttons-container .app-button {
    flex: 1;
    min-width: 120px;
    font-size: 0.9rem;
    padding: 8px 15px;
}

.web-button {
    border-color: #FF9500 !important;
    color: #FF9500 !important;
}

.web-button:hover {
    background: #FF9500 !important;
    color: var(--dark-bg) !important;
    box-shadow: 0 0 20px rgba(255, 149, 0, 0.5) !important;
}

.android-button {
    border-color: #4CAF50 !important;
    color: #4CAF50 !important;
}

.android-button:hover {
    background: #4CAF50 !important;
    color: var(--dark-bg) !important;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5) !important;
}

.game-button {
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border-width: 3px;
}

.game-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.4);
}

/* Icon and text color controls for itch.io button */
/* When card is hovered, icon turns white but text stays cyan */
.app-card:hover .game-button svg path {
    fill: #ffffff;
}

.app-card:hover .game-button {
    color: var(--primary-color) !important;
}

/* When button is hovered, icon stays white and text turns black */
.game-button:hover {
    background: var(--primary-color) !important;
}

.app-card:hover .game-button:hover {
    color: var(--dark-bg) !important;
}

.game-button:hover svg path {
    fill: #ffffff !important;
}

.vibetube-github-button {
    border-color: #f6f8fa !important;
    color: #f6f8fa !important;
}

.vibetube-github-button:hover {
    background: #f6f8fa !important;
    color: #101218 !important;
    box-shadow: 0 0 20px rgba(246, 248, 250, 0.45) !important;
}

.vibetube-download-button {
    border-color: #2ee7a3 !important;
    color: #2ee7a3 !important;
}

.vibetube-download-button:hover {
    background: #2ee7a3 !important;
    color: #081a14 !important;
    box-shadow: 0 0 20px rgba(46, 231, 163, 0.45) !important;
}

.demo-button {
    border-color: #ff4b4b !important;
    color: #ff4b4b !important;
}

.demo-button:hover {
    background: #ff4b4b !important;
    color: var(--dark-bg) !important;
    box-shadow: 0 0 20px rgba(255, 75, 75, 0.45) !important;
}

.eco-guardian-web-button {
    border-color: #3ddc84 !important;
    color: #3ddc84 !important;
}

.eco-guardian-web-button:hover {
    background: #3ddc84 !important;
    color: var(--dark-bg) !important;
    box-shadow: 0 0 20px rgba(61, 220, 132, 0.5) !important;
}

.vibejam-button {
    border-color: #ff2e9a !important;
    color: #ff2e9a !important;
}

.vibejam-button:hover {
    background: #ff2e9a !important;
    color: var(--dark-bg) !important;
    box-shadow: 0 0 20px rgba(255, 46, 154, 0.5) !important;
}

.demo-youtube-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
    vertical-align: middle;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask: url('https://api.iconify.design/tdesign:logo-youtube-filled.svg') no-repeat center / contain;
    mask: url('https://api.iconify.design/tdesign:logo-youtube-filled.svg') no-repeat center / contain;
}

#vibe-survivor-btn {
    border-color: #9B59B6;
    color: #9B59B6;
}

#vibe-survivor-btn:hover {
    background: #9B59B6;
    color: var(--dark-bg);
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.4);
}

.ios-note {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 10px;
    font-style: italic;
}

body.demo-modal-open {
    overflow: hidden;
}

.demo-video-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 11000;
}

.demo-video-modal.is-open {
    display: flex;
}

.demo-video-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(4px);
}

.demo-video-modal-panel {
    position: relative;
    width: min(960px, 96vw);
    border: 2px solid var(--primary-color);
    background: linear-gradient(160deg, rgba(7, 16, 20, 0.96), rgba(10, 11, 22, 0.96));
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.35);
    padding: 14px;
    z-index: 1;
}

.demo-video-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    color: var(--primary-color);
}

.demo-video-modal-header h3 {
    font-family: 'Born2bSportyFont', 'MinecraftFont', 'Courier New', monospace;
    font-size: 1.2rem;
    letter-spacing: 0.08em;
    margin: 0;
}

.demo-video-close {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.25s ease;
}

.demo-video-close:hover {
    background: var(--primary-color);
    color: var(--dark-bg);
    box-shadow: var(--neon-glow);
}

.demo-video-frame-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.demo-video-frame-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 768px) {
    .demo-video-modal {
        padding: 10px;
    }

    .demo-video-modal-panel {
        width: 100%;
        padding: 10px;
    }

    .demo-video-modal-header h3 {
        font-size: 1rem;
    }

    .demo-video-close {
        width: 34px;
        height: 34px;
        font-size: 1.2rem;
    }
}

/* Contact Section */
.contact {
    padding: 150px 50px;
    position: relative;
    z-index: 10;
    pointer-events: none; /* Allow clicks to pass through to background */
    background: linear-gradient(180deg, transparent, rgba(255, 0, 255, 0.02), transparent);
    background-color: #00000075;
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    pointer-events: auto; /* Re-enable clicks for interactive content */
}

.contact-form {
    margin-top: 40px;
}

.form-group {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: center;
}

.form-group input {
    flex: 1;
    max-width: 400px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 3px solid var(--primary-color);
    color: var(--text-color);
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.form-group button {
    font-family: 'Born2bSportyFont', 'MinecraftFont', 'Courier New', monospace;
    font-size: 1.1rem;
    padding: 15px 40px;
    background: transparent;
    color: var(--primary-color);
    border: 3px solid var(--primary-color);
    font-weight: bold;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 0;
    clip-path: polygon(
        8px 0, 100% 0, 100% calc(100% - 8px), 
        calc(100% - 8px) 100%, 0 100%, 0 8px
    );
    
}

.form-group button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    transition: left 0.3s ease;
    z-index: -1;
}

.form-group button:hover {
    color: var(--dark-bg);
    box-shadow: var(--neon-glow);
}

.form-group button:hover::before {
    left: 0;
}

.contact-social-links {
    margin-top: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.contact-social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.72);
    border: 2px solid color-mix(in srgb, var(--primary-color) 72%, #ffffff 28%);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.6),
        0 0 14px color-mix(in srgb, var(--primary-color) 26%, transparent);
    transition: color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    clip-path: polygon(
        8px 0, 100% 0, 100% calc(100% - 8px),
        calc(100% - 8px) 100%, 0 100%, 0 8px
    );
}

.contact-social-link svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.contact-social-link:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.8),
        0 0 20px color-mix(in srgb, var(--primary-color) 45%, transparent);
}

.contact-social-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}

/* Footer */
footer {
    font-family: 'Born2bSportyFont', 'MinecraftFont', 'Courier New', monospace;
    padding: 30px 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    text-align: center;
    border-top: 1px solid var(--primary-color);
    position: relative;
    z-index: 10;
    pointer-events: none; /* Allow clicks to pass through to background */
    letter-spacing: 0.05em;
}

/* Terminal Interface */
.source-code-terminal {
    position: relative;
    width: 900px;
    max-width: 90vw;
    max-height: 0;
    overflow: hidden;
    background: #000000;
    border: 1px solid #333;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                padding 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.5s ease;
    font-family: 'Courier New', Courier, monospace;
    margin: 10px auto 0;
    text-align: left;
}

.source-code-terminal.active {
    max-height: 600px;
    padding: 0 20px 20px 20px;
    border-color: #666;
}

.terminal-content {
    color: #ffffff;
    font-size: 0.85rem;
    line-height: 1.4;
    padding-top: 40px;
    overflow: hidden;
    text-align: left;
    white-space: pre-wrap;
    word-wrap: break-word;
    pointer-events: auto;
}

.terminal-prompt {
    color: #999;
}

.terminal-next-text {
    cursor: pointer;
    color: inherit;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    padding: 8px 4px;
    margin: -8px -4px;
    position: relative;
    z-index: 999;
    display: inline-block;
    border-radius: 2px;
    touch-action: manipulation;
    pointer-events: auto;
}

.terminal-next-text:hover {
    opacity: 0.8;
    background: rgba(0, 255, 255, 0.1);
}

.terminal-next-text:active {
    opacity: 0.6;
    background: rgba(0, 255, 255, 0.2);
}

.terminal-line {
    pointer-events: auto;
}

.terminal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #ffffff;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: bold;
    transition: color 0.3s ease;
    z-index: 10;
}

.terminal-close:hover {
    color: #ff6b6b;
}

.terminal-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    height: 30px;
    background: #2d2d2d;
    padding: 0 10px;
    border-bottom: 1px solid #555;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    color: #ffffff;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

.source-code-terminal.active .terminal-header {
    display: flex;
}

.terminal-title {
    color: #ffffff;
    font-weight: normal;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

.terminal-window-controls {
    display: flex;
    gap: 8px;
}

.window-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    border-radius: 2px;
    transition: background-color 0.2s ease, color 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

.window-control:hover {
    background: #555;
}

.window-control.minimize:hover {
    background: #4a4a4a;
}

.window-control.maximize:hover {
    background: #4a4a4a;
}

.window-control.close:hover {
    background: #e81123;
    color: #ffffff;
}

/* ==============================================
   PIXEL MAZE BACKGROUND SYSTEM
   ============================================== */

/* Maze Grid Container */
#mazeGrid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: var(--dark-bg);
}

/* SVG-Based Maze Styles */
#mazeGrid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

/* Base maze cell styles for SVG rects */
.maze-cell.base {
    fill: rgba(16, 33, 62, 0.15);
    transition: fill 0.4s ease;
}

/* Wall styles - theme-aware */
.maze-cell.blocker {
    fill: rgba(78, 205, 196, 0.25);
    transition: fill 0.4s ease;
}

/* Theme-specific wall adaptations */
.theme-synthwave .maze-cell.blocker {
    fill: rgba(255, 0, 255, 0.25);
}

.theme-matrix .maze-cell.blocker {
    fill: rgba(0, 255, 65, 0.25);
}

.theme-ghost .maze-cell.blocker {
    fill: rgba(184, 184, 255, 0.25);
}

/* Moving elements - always bright and visible */
.maze-cell.solid1 { 
    fill: #ff6b6b !important;
}

.maze-cell.solid2 { 
    fill: #4ecdc4 !important;
}

.maze-cell.solid3 {
    fill: #a29bfe !important; /* Purple for better distinction */
}

.maze-cell.solid4 { 
    fill: #ffeaa7 !important;
}

/* Bug cells - red glitchy appearance */
.maze-cell.bug-cell {
    fill: #ff073a !important;
    opacity: 0.8;
    animation: bugPulse 1.5s ease-in-out infinite;
}

@keyframes bugPulse {
    0%, 100% { 
        opacity: 0.8;
        filter: brightness(1);
    }
    50% { 
        opacity: 1;
        filter: brightness(1.3);
    }
}

/* Fixed cells - cyan glow that fades */
.maze-cell.fixed-cell {
    fill: #00FFFF !important;
    opacity: 1;
    animation: fixedFade 2s ease-out forwards;
}

@keyframes fixedFade {
    0% {
        fill: #00FFFF;
        opacity: 1;
        filter: brightness(2.5) drop-shadow(0 0 15px #00FFFF);
    }
    50% {
        fill: #00FFFF;
        opacity: 0.9;
        filter: brightness(2.0);
    }
    100% {
        opacity: 0;
    }
}



/* Subtle container animation for depth */
#mazeGrid {
    animation: maze-ambient 12s ease-in-out infinite;
}

@keyframes maze-ambient {
    0%, 100% { 
        filter: brightness(1) hue-rotate(0deg);
    }
    25% { 
        filter: brightness(1.01) hue-rotate(1deg);
    }
    50% { 
        filter: brightness(0.99) hue-rotate(-0.5deg);
    }
    75% { 
        filter: brightness(1.005) hue-rotate(0.5deg);
    }
}

/* Performance optimizations for SVG maze */
#mazeGrid rect {
    will-change: fill;
}

/* ==============================================
   AI BOT ANIMATION SYSTEM
   ============================================== */

.ai-bot-container {
    position: absolute;
    top: -90px;
    left: 49%;
    transform: translateX(-50%);
    z-index: 10;
    width: 120px;
    height: 120px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

.ai-bot-container canvas {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    transition: filter 0.3s ease;
}

.ai-bot-container.loaded {
    opacity: 1;
}

/* No default glow effects - only on hover like main logo */

/* Hover effects for hero VIBECRE text */
.hero-title:hover .title-v,
.hero-title:hover .title-c,
.hero-title:hover .title-small {
    text-shadow:
        -1px 1px 0 #252525,
        -2px 2px 0 #252525,
        -3px 3px 0 #252525,
        -4px 4px 0 #252525,
        -5px 5px 0 #252525,
        -6px 6px 0 #252525,
        -7px 7px 0 #252525,
        -8px 8px 0 #252525,
        -9px 9px 0 #252525,
        -10px 10px 20px rgba(37, 37, 37, 0.5),
        0 0 20px color-mix(in srgb, var(--primary-color) 60%, transparent),
        0 0 40px color-mix(in srgb, var(--primary-color) 40%, transparent);
}

/* Hover effects for AI text */
.hero-title:hover .title-ai {
    text-shadow:
        -1px 1px 0 #252525,
        -2px 2px 0 #252525,
        -3px 3px 0 #252525,
        -4px 4px 0 #252525,
        -5px 5px 0 #252525,
        -6px 6px 0 #252525,
        -7px 7px 0 #252525,
        -8px 8px 0 #252525,
        -9px 9px 0 #252525,
        -10px 10px 20px rgba(37, 37, 37, 0.5),
        0 0 10px color-mix(in srgb, var(--primary-color) 60%, transparent),
        0 0 20px color-mix(in srgb, var(--primary-color) 40%, transparent),
        0 0 30px color-mix(in srgb, var(--primary-color) 30%, transparent);
}

/* Hover effects for AI bot animation */
.hero-title:hover .ai-bot-container canvas {
    transform: scale(1.05);
    transition: all 0.3s ease;
}

/* Default theme hover glow - adjusted to avoid Samsung Internet black flash */
.hero-title:hover .ai-bot-container canvas {
    filter: brightness(1.1) saturate(1.05)
            drop-shadow(0 0 6px rgba(0, 255, 255, 0.8))
            drop-shadow(0 0 12px rgba(0, 255, 255, 0.4))
            drop-shadow(0 0 18px rgba(43, 180, 219, 0.2)) !important;
}

/* Matrix theme hover glow - keep tint without zeroing brightness */
.theme-matrix .hero-title:hover .ai-bot-container canvas {
    filter: brightness(1.12) saturate(1.08)
            drop-shadow(0 0 6px rgba(0, 255, 65, 0.8))
            drop-shadow(0 0 12px rgba(0, 255, 65, 0.4))
            drop-shadow(0 0 18px rgba(0, 204, 51, 0.2)) !important;
}

/* Synthwave theme hover glow - keep tint without zeroing brightness */
.theme-synthwave .hero-title:hover .ai-bot-container canvas {
    filter: brightness(1.1) saturate(1.1)
            drop-shadow(0 0 6px rgba(255, 0, 255, 0.8))
            drop-shadow(0 0 12px rgba(255, 0, 255, 0.4))
            drop-shadow(0 0 18px rgba(255, 105, 180, 0.2)) !important;
}

/* Ghost theme hover glow - consistent highlight */
.theme-ghost .hero-title:hover .ai-bot-container canvas {
    filter: brightness(1.2) saturate(0.9)
            drop-shadow(0 0 6px rgba(184, 184, 255, 0.8))
            drop-shadow(0 0 12px rgba(184, 184, 255, 0.4))
            drop-shadow(0 0 18px rgba(147, 112, 219, 0.2)) !important;
}

/* Animation performance optimizations */
.ai-bot-container {
    will-change: opacity;
    backface-visibility: hidden;
}

.ai-bot-container canvas {
    will-change: filter, transform;
    backface-visibility: hidden;
}
