/* --- General & Variables --- */
:root {
    --bg-color: #F9F6F2;
    --text-color: #212121;
    --gray-color: #BDBDBD;
    --primary-font: 'Poppins', sans-serif;
}
* {
    user-select: none;
}
body {
    margin: 0;
    font-family: var(--primary-font);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

h1 {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
}

/* --- Navigation --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: relative; /* Added for positioning the mobile menu */
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-color);
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: #888;
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: all 0.3s ease-in-out;
}

@media (max-width: 768px) {
    .nav-links {
        display: flex;
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 70%;
        background: rgba(249, 246, 242, 0.8); /* Using your bg-color but with transparency */
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        padding: 1rem 1.5rem;
        margin: 0;
        border-radius: 20px;
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        border: 1px solid rgba(255, 255, 255, 0.3);
    }

    .nav-links li {
        margin: 0;
        position: relative;
    }

    .nav-links a {
        font-size: 0.9rem;
        padding: 0.5rem;
        opacity: 0.7;
        transition: all 0.2s ease;
    }

    .nav-links a:hover {
        opacity: 1;
    }

    .nav-links a.active {
        opacity: 1;
        font-weight: 700;
    }

    .nav-links a.active::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        width: 100%;
        height: 2px;
        background: var(--text-color);
        border-radius: 2px;
    }

    .hamburger {
        display: none; /* Hide hamburger as we don't need it anymore */
    }

    .logo {
        display: none;
    }

    .navbar {
        justify-content: center;
    }
}

/* --- Hero Section --- */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 5rem;
}

.phone-mockup {
    position: relative;
    width: 280px;
    perspective: 1000px; /* For 3D effect */
    margin: 2rem auto;
    animation: breathing 5s ease-in-out infinite; /* Added breathing animation */
}

.phone-mockup img {
    width: 100%;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1); /* Added for floaty effect */
}

@keyframes breathing {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

.phone-mockup img {
    max-width: 280px;
    height: auto;
    border: 11px solid #33312f;

    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1));
    transition: transform 0.1s ease-out, filter 0.3s ease-out;
    transform-style: preserve-3d;
    transform: rotateY(0) rotateX(0) scale(1);
    will-change: transform;
}

.phone-mockup.hovering img {
    filter: drop-shadow(20px 25px 30px rgba(0,0,0,0.2));
    transform: scale(1.05);
}

.hero-content {
    max-width: 500px;
}

.cta-button {
    display: inline-block;
    background-color: var(--text-color);
    color: var(--bg-color);
    padding: 0.8rem 2.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* --- Core Mechanics Section --- */
.mechanics {
    padding: 4rem 0;
}

.mechanics h2 {
    margin-bottom: 6rem;
}

.mechanics-flow {
    position: relative;
    width: 100%;
    max-width: 700px;
    height: 900px; /* Height for mobile layout */
    margin: 0 auto;
}

.flow-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

@keyframes dashOffset {
    from {
        stroke-dashoffset: 10;
    }
    to {
        stroke-dashoffset: 0;
    }
}

.flow-lines path {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.flow-lines.animate-lines path {
    opacity: 1;
    animation: dashOffset 1.5s linear infinite;
}

.flow-step {
    position: absolute;
    background: var(--bg-color);
    padding: 1.5rem 1rem 0.5rem;
    font-size: 1rem;
    z-index: 2;
    max-width: 150px;
    text-align: center;
    border-radius: 8px;
}

.flow-step::before {
    content: attr(data-step);
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    line-height: 30px;
    background-color: var(--text-color);
    color: var(--bg-color);
    border-radius: 50%;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Default mobile positions for flow steps */
#step-1 { top: 0%; left: 50%; transform: translateX(-50%); }
#step-2 { top: 20%; left: 75%; transform: translateX(-50%); }
#step-3 { top: 40%; left: 25%; transform: translateX(-50%); }
#step-4 { top: 65%; left: 65%; transform: translateX(-50%); }
#step-5 { top: 85%; left: 35%; transform: translateX(-50%); }

/* --- Neural Mesh Section --- */
.neural-mesh-section {
    padding: 4rem 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin-top: 5rem;
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.neural-mesh-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.ai-dialog {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
    border-radius: 30px;
    overflow: hidden;
}

.mesh-container {
    flex: 1;
    border-radius: 24px;
    padding: 1.5rem;
    position: relative;
}

.mesh-container::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    border: 1px solid rgba(33, 33, 33, 0.08);
    pointer-events: none;
}

#neural-mesh-canvas {
    width: 100%;
    height: 300px;
    display: block;
    margin: 0 auto;
    opacity: 0.85;
}

.dialog-container {
    flex: 1;
    background: linear-gradient(135deg, rgba(33, 33, 33, 0.02) 0%, rgba(33, 33, 33, 0.05) 100%);
    border: 1px solid rgba(33, 33, 33, 0.08);
    border-radius: 24px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 20px 40px -12px rgba(33, 33, 33, 0.05),
        0 0 1px rgba(33, 33, 33, 0.15);
}

.dialog-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 25%, 
        rgba(255, 255, 255, 0.2) 75%, 
        transparent 100%);
}

.system-title {
    font-family: var(--primary-font);
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    letter-spacing: 2px;
    opacity: 0.7;
    font-weight: 600;
}

.terminal-text {
    font-family: var(--primary-font);
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-color);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.cursor {
    display: inline-block;
    width: 3px;
    height: 1.2em;
    background-color: var(--text-color);
    margin-left: 4px;
    animation: blink 1s infinite;
    vertical-align: middle;
    opacity: 0.7;
}

/* --- Download Dialog --- */
.download-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(33, 33, 33, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.download-dialog.active {
    display: flex;
}

.dialog-content {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 16px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.platform-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.platform-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    padding: 1rem;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    text-align: center;
}

.platform-option:hover {
    background-color: rgba(33, 33, 33, 0.05);
}

.platform-option img {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
}

.platform-option.preregister {
    opacity: 0.7;
}

.platform-option.preregister::after {
    content: '(Pre - Register)';
    font-size: 0.8rem;
    margin-top: 0.25rem;
    opacity: 0.7;
}

.close-dialog {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.close-dialog:hover {
    opacity: 1;
}

.dialog-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

/* --- About Page Styles --- */
.about-hero {
    padding: 6rem 0;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-hero h1 {
    margin-bottom: 2rem;
}

.about-hero p {
    font-size: 1.2rem;
    color: var(--text-color);
    opacity: 0.9;
}

.team-section {
    padding: 4rem 0;
}

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

.team-member {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.team-member img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    object-fit: cover;
}

.team-member h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.team-member p.role {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.team-member p.bio {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    opacity: 0.9;
}

.mission-section {
    padding: 6rem 0;
}

.mission-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.mission-card {
    background: linear-gradient(135deg, rgba(33, 33, 33, 0.02) 0%, rgba(33, 33, 33, 0.05) 100%);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.mission-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.mission-card h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
}

.mission-card p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-color);
    opacity: 0.9;
}

/* --- Features Page Styles --- */
.features-hero {
    text-align: center;
    padding: 4rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.features-hero p {
    font-size: 1.2rem;
    color: #666;
    margin-top: 1rem;
}

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

.feature-card {
    background: #fff;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.1);
}


.community-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1.2rem;
}

.github-link, .discord-link,.instagram-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(33, 33, 33, 0.03);
    border-radius: 20px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.github-link:hover, .discord-link:hover ,.instagram-link:hover{
    background: rgba(33, 33, 33, 0.08);
}

.github-link img, .discord-link img {
    width: 20px;
    height: 20px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.github-link:hover img, .discord-link:hover img {
    opacity: 1;
}

@media (min-width: 768px) {
    h1 {
        font-size: 3.2rem;
    }
    
    .hero {
        flex-direction: row;
        text-align: left;
        gap: 3rem;
    }

    .phone-mockup {
        flex: 1;
        order: 1;
        display: flex;
        justify-content: center;
    }
    
    .phone-mockup {
        perspective: 1500px;
    }

    .phone-mockup img {
        max-width: 240px;
    }
    
    .phone-mockup.hovering img {
        filter: drop-shadow(35px 35px 40px rgba(0,0,0,0.25));
        transform: translateZ(50px) scale(1.08);
    }

    .hero-content {
        flex: 1.2;
        order: 2;
    
    }
    
    .mechanics-flow {
        height: 500px; /* Adjusted height for desktop */
    }

    .flow-step {
        font-size: 1rem;
    }
    
    .ai-dialog {
        flex-direction: row;
        align-items: center;
    }

    #neural-mesh-canvas {
        height: 400px;
    }

    .mesh-container {
        flex: 0.8;
    }

    .dialog-container {
        flex: 1.2;
        height: 400px;
        display: flex;
        flex-direction: column;
    }
    
    /* Desktop positions for flow steps in star formation */
    #step-1 { top: 5%; left: 50%; transform: translate(-50%, -50%); }
    #step-2 { top: 35%; left: 90%; transform: translate(-50%, -50%); }
    #step-3 { top: 85%; left: 75%; transform: translate(-50%, -50%); }
    #step-4 { top: 85%; left: 25%; transform: translate(-50%, -50%); }
    #step-5 { top: 35%; left: 10%; transform: translate(-50%, -50%); }
    
    .mission-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-hero {
        padding: 8rem 0;
    }
    
    .about-hero p {
        font-size: 1.4rem;
    }
}

/* --- Terms Page Styles --- */
.terms-content {
    background: #fff;
    border-radius: 18px;
    padding: 2rem;
    margin: 3rem auto;
    color: #212121;
    line-height: 1.8;
}
.terms-content h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}
.terms-content h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #33312f;
    border-left: 4px solid #BDBDBD;
    padding-left: 0.7rem;
}
.terms-content p {
    font-size: 1.05rem;
    margin-bottom: 1.2rem;
    opacity: 0.95;
}
.terms-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1.2rem;
    padding-left: 1.2rem;
}
.terms-content li {
    font-size: 1rem;
    margin-bottom: 0.7rem;
    opacity: 0.92;
}
.terms-content em {
    color: #BDBDBD;
    font-style: italic;
}
.terms-content a {
    color: #212121;
    text-decoration: underline;
    transition: color 0.2s;
}
.terms-content a:hover {
    color: #888;
}
@media (max-width: 768px) {
    .terms-content {
        padding: 2rem;
        margin: 1.5rem 0.2rem;
    }
    .terms-content h1 {
        font-size: 1.4rem;
    }
    .terms-content h2 {
        font-size: 1.1rem;
        padding-left: 0.4rem;
    }
}

#system-dialog .typing-cursor {
    display: inline-block;
    background-color: #212121;
    width: 12px; /* A 'fat' cursor */
    height: 1.5rem; /* Adjust to match line-height */
    margin-left: 5px;
    animation: blink 0.8s steps(1, end) infinite;
    vertical-align: middle; /* Align with the text */
}