:root {
    --bg-color: #0d0d12;
    --text-color: #ffffff;
    --accent-color: #00f0ff;
    /* Primary Cyan */
    --secondary-color: #d946ef;
    /* Secondary Pink */
    --alert-red: #ff3333;
    --warning-yellow: #facc15;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Orbitron', 'Inter', sans-serif;
    --grid-line: rgba(0, 243, 255, 0.05);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: radial-gradient(circle at 50% 50%, #1a1a2e 0%, #0d0d12 100%);
    background-attachment: fixed;
    padding-top: 80px;
    padding-bottom: 100px;
}

.container {
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.logo {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeUp 1s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.status {
    font-size: 1.5rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    animation: fadeUp 1s ease-out 0.3s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
    animation: fadeUp 1s ease-out 0.6s forwards;
    opacity: 0;
    transform: translateY(20px);
}

/* Glassmorphism decorative circles */
.circle {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    opacity: 0.4;
    pointer-events: none;
    animation: float 10s infinite ease-in-out;
}

.circle-1 {
    width: 300px;
    height: 300px;
    background: var(--secondary-color);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.circle-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-color);
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(20px, -20px);
    }
}

.loader {
    margin-top: 2rem;
    height: 2px;
    width: 100px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    margin-left: auto;
    margin-right: auto;
    border-radius: 2px;
    animation: fadeUp 1s ease-out 0.9s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.loader::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 50%;
    background: var(--accent-color);
    animation: loading 2s infinite ease-in-out;
    border-radius: 2px;
}

@keyframes loading {
    0% {
        left: -50%;
    }

    100% {
        left: 100%;
    }
}

/* Common Header Styles */
.common-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /* Use 100% instead of vw to avoid scrollbar issues */
    max-width: 100%;
    /* Prevent overflow */
    box-sizing: border-box;
    /* Include padding in width */
    padding: 1.2rem 2rem;
    z-index: 1000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(13, 13, 18, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    /* Ensure content takes full available width */
}

.brand-link {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: opacity 0.3s ease;
}

.brand-link:hover {
    opacity: 0.8;
}

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

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--accent-color);
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

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

/* Menu Toggle (Hamburger) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 44px;
    /* Increased touch target */
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    cursor: pointer;
    z-index: 1001;
    padding: 11px 9px;
    /* Adjust padding for inner spans */
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* Hamburger Animation */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

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

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .common-header {
        padding: 1rem 1.5rem;
    }

    .header-content {
        /* Keep horizontal layout for brand and toggle */
        flex-direction: row;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        /* Hidden by default */
        width: 100%;
        /* Full width on mobile */
        height: 100vh;
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1000;
        padding-top: 60px;
        /* Space for header */
    }

    .nav-links.active {
        right: 0;
        /* Slide in */
    }

    .nav-link {
        font-size: 1.2rem;
        font-weight: 700;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    /* Staggered animation for links */
    .nav-links.active .nav-link {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-links.active .nav-link:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav-links.active .nav-link:nth-child(2) {
        transition-delay: 0.2s;
    }

    .nav-links.active .nav-link:nth-child(3) {
        transition-delay: 0.3s;
    }
}

/* Common Footer Styles */
.common-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    /* Use 100% instead of vw */
    max-width: 100%;
    /* Prevent overflow */
    box-sizing: border-box;
    /* Include padding in width */
    padding: 1.5rem 1rem;
    /* Reduce horizontal padding */
    text-align: center;
    background: linear-gradient(to top, rgba(13, 13, 18, 0.9) 0%, rgba(13, 13, 18, 0) 100%);
    z-index: 100;
    pointer-events: none;
    /* Let clicks pass through transparent parts */
}

.common-footer .footer-links,
.common-footer .copyright {
    pointer-events: auto;
    /* Re-enable clicks for content */
    max-width: 100%;
    /* Ensure content doesn't overflow */
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    /* Reduce gap */
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
    /* Allow wrapping on small screens */
    width: 100%;
}

.footer-btn {
    text-decoration: none;
    padding: 0.5rem 1rem;
    /* More compact buttons */
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    white-space: nowrap;
    /* Prevent text breaking awkwardly */
}

.support-btn {
    background: rgba(255, 0, 255, 0.1);
    color: #ffccff;
    border-color: rgba(255, 0, 255, 0.3);
}

.support-btn:hover {
    background: rgba(255, 0, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.3);
}

.footer-btn.back-btn {
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-color);
    border-color: rgba(0, 240, 255, 0.3);
}

.footer-btn.back-btn:hover {
    background: rgba(0, 240, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.copyright {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    font-family: var(--font-main);
    padding: 0 1rem;
}

@media (max-width: 768px) {
    .common-footer {
        padding: 1rem 0.5rem;
        background: rgba(13, 13, 18, 0.85);
        /* Solid background on mobile */
        backdrop-filter: blur(10px);
    }

    .footer-links {
        gap: 0.8rem;
        margin-bottom: 0.6rem;
    }

    .footer-btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.8rem;
    }
}

/* App Store Card Styles */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 1.5rem;
    padding: 1rem;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
}

.app-grid.vertical {
    grid-template-columns: 1fr;
    max-width: 800px;
}

.app-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.app-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(0, 240, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.app-icon-link {
    display: block;
    flex-shrink: 0;
}

.app-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    /* Smooth rounded corners like App Store */
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.app-card:hover .app-icon {
    transform: scale(1.05);
}

.app-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
    min-width: 0;
    /* Enable truncation */
}

.app-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.2rem;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-description {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.8rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-action-btn {
    align-self: flex-start;
    background: rgba(0, 240, 255, 0.1);
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.app-card:hover .app-action-btn {
    text-decoration: none;
    align-self: flex-start;
}

.app-action-btn:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
    border-color: var(--accent-color);
}

/* Cyber Button Styles (Imported & Adapted) */
.cyber-btn {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 12px 28px;
    font-family: var(--font-display, sans-serif);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-width: 140px;
    border-radius: 6px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.cyber-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--accent-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
    opacity: 0.1;
}

.cyber-btn:hover::before {
    width: 100%;
    opacity: 1;
}

.cyber-btn:hover {
    color: #0d0d12;
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.4);
    text-shadow: none;
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

/* Update Generic Action Buttons to use Cyber Style */
.action-btn {
    /* Extending .cyber-btn styles */
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 12px 32px;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    /* Sharper corners for cyber look */
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.1);
    display: inline-block;
    text-decoration: none;
}

.action-btn:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.5);
    transform: translateY(-3px);
}

/* Social Links & Buttons */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 4rem auto 2rem;
    width: 100%;
    max-width: 500px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    /* Create a cyber clip-path effect on corners */
    clip-path: polygon(10px 0, 100% 0,
            100% calc(100% - 10px), calc(100% - 10px) 100%,
            0 100%,
            0 10px);
}

/* Scanline/Shine Effect */
.social-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.1) 40%,
            rgba(255, 255, 255, 0.2) 50%,
            rgba(255, 255, 255, 0.1) 60%,
            transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

.social-btn:hover::before {
    left: 100%;
}

.social-btn:hover {
    transform: translateY(-2px);
    background: rgba(13, 13, 18, 0.8);
}

/* Specific Colors */
.social-btn.booth {
    border-color: rgba(252, 77, 80, 0.5);
    color: #fc4d50;
    box-shadow: 0 0 10px rgba(252, 77, 80, 0.1);
}

.social-btn.booth:hover {
    border-color: #fc4d50;
    box-shadow: 0 0 20px rgba(252, 77, 80, 0.4), inset 0 0 10px rgba(252, 77, 80, 0.2);
    text-shadow: 0 0 8px rgba(252, 77, 80, 0.6);
}

.social-btn.discord {
    border-color: rgba(88, 101, 242, 0.5);
    color: #5865F2;
    box-shadow: 0 0 10px rgba(88, 101, 242, 0.1);
}

.social-btn.discord:hover {
    border-color: #5865F2;
    box-shadow: 0 0 20px rgba(88, 101, 242, 0.4), inset 0 0 10px rgba(88, 101, 242, 0.2);
    text-shadow: 0 0 8px rgba(88, 101, 242, 0.6);
}

.social-btn.youtube {
    border-color: rgba(255, 0, 0, 0.5);
    color: #ff3333;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.1);
}

.social-btn.youtube:hover {
    border-color: #ff0000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.4), inset 0 0 10px rgba(255, 0, 0, 0.2);
    text-shadow: 0 0 8px rgba(255, 0, 0, 0.6);
}


/*
   ----------------------------------------
   Consolidated Responsive Adjustments
   ----------------------------------------
*/

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

    .section-title {
        font-size: 1.5rem;
        margin-top: 3rem;
    }

    .action-btn {
        width: 80%;
        max-width: 300px;
        box-sizing: border-box;
        text-align: center;
    }

    /* Footer stacking */
    .common-footer {
        padding: 1rem 0.5rem;
        background: rgba(13, 13, 18, 0.85);
        /* Solid bg */
        backdrop-filter: blur(10px);
    }

    .footer-links {
        gap: 0.8rem;
        margin-bottom: 0.6rem;
    }

    .footer-btn {
        width: 100%;
        padding: 0.8rem;
        margin-bottom: 0.5rem;
    }

    /* Ensure content is not hidden behind the taller mobile footer */
    body {
        padding-bottom: 220px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 2.5rem;
    }

    .status {
        font-size: 1.2rem;
    }

    .description {
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }

    /* Compact App Card Layout */
    .app-card {
        padding: 1rem;
        gap: 1rem;
        /* Ensure row layout is maintained */
        flex-direction: row;
        align-items: center;
    }

    .app-icon {
        width: 56px;
        height: 56px;
        border-radius: 12px;
    }

    .app-details {
        text-align: left;
    }

    .app-name {
        font-size: 1rem;
    }

    .app-description {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .app-action-btn {
        padding: 0.4rem 1rem;
        font-size: 0.75rem;
        width: auto;
        /* Don't force full width */
    }

    .action-btn {
        width: 100%;
        padding: 1rem;
        font-size: 0.9rem;
    }

    .social-links {
        margin-top: 3rem;
    }
}

/* Tweaks for very small screens (iPhone SE 1st Gen / 320px width) */
@media (max-width: 374px) {
    .container {
        padding: 1.5rem 0.5rem;
        /* Reduce side padding */
        width: 100%;
        /* Ensure it doesn't overflow */
    }

    .common-header {
        padding: 1rem 0.8rem;
        /* Fit header contents */
    }

    .brand-link {
        font-size: 1.25rem;
        /* Shrink logo text */
    }

    .logo {
        font-size: 2rem;
        /* Shrink main logo */
    }

    .app-card {
        padding: 0.8rem;
        /* Reduce card padding */
        gap: 0.6rem;
    }

    .app-icon {
        width: 48px;
        /* Smaller icon */
        height: 48px;
    }

    .app-grid {
        padding: 0 0.5rem;
        /* Reduce grid padding */
    }
}
