/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000000;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
    /* Mobile viewport height fix */
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

/* Mobile viewport height fix */
html {
    height: -webkit-fill-available;
}



/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 20px;
}

.nav-logo {
    height: 120px;
    width: auto;
    object-fit: contain;
    margin: 0;
}

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

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 25px;
}

.nav-links a:hover {
    color: #ffffff;
    border-color: #cccccc;
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}



/* Hero section */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    position: relative;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.reel {
    display: inline-block;
    overflow: hidden;
    width: 1em;
    height: 1em;
    position: relative;
    vertical-align: top;
    margin: 0 1px;
    will-change: transform;
    line-height: 1;
}

.reel-inner {
    display: flex;
    will-change: transform;
    transform: translateX(0);
}

.reel-inner span {
    width: 1em;
    height: 1em;
    line-height: 1;
    text-align: center;
    flex-shrink: 0;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 25px;
    opacity: 0.8;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    min-width: 150px;
}

.btn.primary {
    background: #ffffff;
    color: #000000;
}

.btn.primary:hover {
    background: #cccccc;
}

.btn.secondary {
    background: transparent;
    border: 1px solid #ffffff;
    color: #ffffff;
}

.btn.secondary:hover {
    background: #ffffff;
    color: #000000;
}

.btn.large {
    padding: 20px 40px;
    font-size: 1.3rem;
    min-width: 200px;
}

.btn.small {
    padding: 8px 16px;
    font-size: 0.8rem;
    min-width: 100px;
    margin-top: 15px;
}

/* Sections */
section {
    padding: 30px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 30px;
    color: #ffffff;
}

/* Projects */
.carousel {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 50px;
    overflow: visible;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 420px;
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card {
    flex: 0 0 100%;
    width: 100%;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 32px;
    padding: 50px 28px 28px 28px;
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 280px;
    position: relative;
    box-sizing: border-box;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    margin: 0 8px;
    overflow: hidden;
}

.project-card.active {
    transform: scale(1.04) translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.project-icon {
    color: var(--accent, #ffffff);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-icon svg {
    width: 40px;
    height: 40px;
}

.project-status {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 5px 14px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.project-status.public {
    color: #4cff4c;
    border-color: rgba(76, 255, 76, 0.25);
    box-shadow: 0 0 12px rgba(76, 255, 76, 0.1);
}

.project-status.private {
    color: #ffb347;
    border-color: rgba(255, 179, 71, 0.25);
    box-shadow: 0 0 12px rgba(255, 179, 71, 0.1);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #ffffff;
    width: 52px;
    height: 52px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.carousel-btn.prev {
    left: -8px;
}

.carousel-btn.next {
    right: -8px;
}

.carousel-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 10px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    transition: all 0.4s ease;
    padding: 0;
}

.indicator.active {
    background: #ffffff;
    width: 24px;
    border-radius: 4px;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

.project-card img {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    border-radius: 15px;
    background: #333333;
}

.project-card h3 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    margin-top: 0;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.project-card p {
    opacity: 0.75;
    line-height: 1.6;
    font-size: 0.9rem;
    text-align: center;
    margin: 0 0 16px 0;
    padding: 0;
    width: 100%;
    max-width: 280px;
    box-sizing: border-box;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 16px;
}

.project-tags span {
    padding: 4px 12px;
    font-size: 0.7rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* About, Join, Terms */
.about, .join, .terms, .terms-page {
    text-align: center;
}

.terms-page ul {
    list-style: none;
    padding: 0;
    margin: 20px auto;
    max-width: 600px;
    text-align: left;
    display: inline-block;
}

.terms-page ul li {
    padding: 10px 0 10px 24px;
    position: relative;
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.5;
}

.terms-page ul li::before {
    content: "›";
    position: absolute;
    left: 0;
    color: #ffffff;
    font-weight: bold;
    font-size: 1.3rem;
}

.terms-page .policy-meta {
    font-size: 0.9rem;
    opacity: 0.6;
    margin-bottom: 40px;
    text-align: center;
}

.terms-page .policy-section {
    max-width: 800px;
    margin: 0 auto 36px auto;
    text-align: left;
}

.terms-page .policy-section h3 {
    font-size: 1.4rem;
    color: #ffffff;
    margin-bottom: 16px;
    font-weight: 700;
}

.terms-page .policy-section p {
    font-size: 1rem;
    opacity: 0.85;
    line-height: 1.7;
    margin: 0 auto 12px auto;
    max-width: 100%;
}

.terms-page .policy-section ul {
    list-style: none;
    padding: 0;
    margin: 8px 0 16px 0;
}

.terms-page .policy-section ul li {
    padding: 6px 0 6px 20px;
    position: relative;
    font-size: 1rem;
    opacity: 0.8;
    line-height: 1.6;
}

.terms-page .policy-section ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.terms-page .policy-section ul li strong {
    color: #ffffff;
    opacity: 1;
}

.terms-page .contact-info {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    font-size: 1rem;
    line-height: 1.6;
    max-width: 100%;
}

.terms-page .policy-footer {
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.5;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.about p, .terms p, .terms-page p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    opacity: 0.9;
}

.about .about-detail {
    max-width: 800px;
    margin: 20px auto 0 auto;
    text-align: left;
}

.about .about-detail p {
    font-size: 1rem;
    opacity: 0.8;
    line-height: 1.7;
    margin-bottom: 12px;
    text-align: left;
}

.team-grid {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 50px;
}

.team-card {
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 36px 32px 32px 32px;
    text-align: center;
    width: 220px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.team-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.12);
}

.team-avatar {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px auto;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-avatar svg {
    width: 32px;
    height: 32px;
    opacity: 0.5;
}

.team-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.team-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
}

.team-sub {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .team-card {
        width: 180px;
        padding: 28px 20px 24px 20px;
    }

    .team-grid {
        gap: 16px;
        margin-top: 36px;
    }
}

@media (max-width: 480px) {
    .team-card {
        width: 160px;
        padding: 24px 16px 20px 16px;
    }

    .team-grid {
        gap: 12px;
    }
}

.join p {
    margin-bottom: 30px;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: #111111;
    border-top: 1px solid #333333;
    padding: 30px 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffffff;
}

.footer-links {
    display: flex;
    list-style: none;
    gap: 25px;
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

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



/* Mobile optimizations */
.nav-links a {
    min-height: 44px;
    display: flex;
    align-items: center;
}

.btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
}

.carousel-btn {
    touch-action: manipulation;
}

/* Improve scrolling performance on mobile */
.carousel-track {
    will-change: transform;
}

.project-card {
    will-change: transform;
}

/* Particle effect */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #00ff00;
    border-radius: 50%;
    pointer-events: none;
    animation: particle-fade 1s ease-out forwards;
    z-index: 100;
}

@keyframes particle-fade {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0) translateY(-20px);
    }
}



/* Loading state for mobile */
.loading {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Reduce motion for mobile performance */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    body {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }

    .hero h1 {
        font-size: clamp(1.8rem, 7vw, 2.3rem);
        line-height: 1.1;
        font-weight: 800;
    }

    .hero p {
        font-size: 0.9rem;
        line-height: 1.3;
    }

    .nav-container {
        position: relative;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 15px;
        padding: 15px 20px;
    }

    .nav-logo {
        height: 80px;
        flex-shrink: 0;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 260px;
        height: 100vh;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 25px;
        padding-top: 100px;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        transition: left 0.3s ease;
        z-index: 1000;
        box-sizing: border-box;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        padding: 15px 20px;
        font-size: 1.1rem;
        width: 200px;
        text-align: center;
        border-radius: 25px;
        margin: 0;
    }

    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        max-width: 300px;
        margin: 0 auto;
    }

    .btn {
        width: 100%;
        padding: 18px 24px;
        font-size: 1rem;
        font-weight: 600;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 20px;
    }

    .footer-links {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .carousel {
        padding: 20px;
        max-width: 100%;
        margin: 0 auto;
        overflow: hidden;
        border-radius: 36px;
    }

    .carousel-container {
        min-height: 420px;
        height: auto;
        overflow: hidden;
        touch-action: pan-x;
    }

    .project-card {
        padding: 44px 20px 24px 20px;
        min-height: 400px;
        box-sizing: border-box;
        align-items: center;
        margin: 0;
        border-radius: 28px;
    }

    .project-icon {
        margin-bottom: 10px;
    }

    .project-icon svg {
        width: 32px;
        height: 32px;
    }

    .project-card h3 {
        font-size: 1.3rem;
        margin-top: 0;
        margin-bottom: 8px;
        font-weight: 800;
        line-height: 1.2;
    }

    .project-card p {
        font-size: 0.85rem;
        line-height: 1.6;
        max-width: 100%;
        padding: 0 4px;
    }

    .project-tags {
        margin-bottom: 14px;
        gap: 5px;
    }

    .project-tags span {
        font-size: 0.65rem;
        padding: 4px 10px;
    }

    .project-status {
        top: 12px;
        right: 12px;
        font-size: 0.65rem;
        padding: 4px 10px;
    }

    .carousel-btn {
        width: 44px;
        height: 44px;
        font-size: 20px;
        display: none;
    }

    section {
        padding: 20px 15px;
    }

    section h2 {
        font-size: 1.8rem;
        margin-bottom: 20px;
        line-height: 1.2;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-content {
    background: #111111;
    border: 1px solid #333333;
    border-radius: 20px;
    margin: 15% auto;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    position: relative;
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #ffffff;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #cccccc;
}

#apply-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#apply-form label {
    font-size: 1.1rem;
    color: #ffffff;
}

#apply-form input {
    padding: 10px;
    border: 1px solid #333333;
    border-radius: 10px;
    background: #000000;
    color: #ffffff;
    font-size: 1rem;
}

#apply-form input:focus {
    outline: none;
    border-color: #ffffff;
}

/* Extra small screens */
@media (max-width: 480px) {
    .hero {
        padding: 15px 10px;
        min-height: 70vh;
    }

    .hero h1 {
        font-size: clamp(1.6rem, 6vw, 2.0rem);
    }

    .hero p {
        font-size: 0.85rem;
    }

    section {
        padding: 15px 10px;
    }

    .nav-container {
        padding: 8px 10px;
    }

    .nav-logo {
        height: 50px;
    }

    .nav-links {
        width: 220px;
        padding-top: 80px;
        gap: 20px;
    }

    .nav-links a {
        font-size: 0.9rem;
        width: 160px;
        padding: 10px 15px;
    }

    .cta-buttons {
        gap: 10px;
    }

    .btn {
        padding: 14px 18px;
        font-size: 0.9rem;
    }

    .carousel {
        padding: 14px 10px;
        overflow: hidden;
        border-radius: 30px;
    }

    .carousel-container {
        min-height: 380px;
        height: auto;
        touch-action: pan-x pinch-zoom;
    }

    .project-card {
        min-height: 360px;
        padding: 38px 16px 20px 16px;
        box-sizing: border-box;
        align-items: center;
        margin: 0;
        border-radius: 28px;
    }

    .project-icon {
        margin-bottom: 8px;
    }

    .project-icon svg {
        width: 28px;
        height: 28px;
    }

    .project-card h3 {
        font-size: 1.1rem;
        margin-bottom: 6px;
        margin-top: 0;
        font-weight: 800;
        line-height: 1.2;
    }

    .project-card p {
        font-size: 0.8rem;
        line-height: 1.5;
        max-width: 100%;
        padding: 0 2px;
    }

    .project-tags {
        margin-bottom: 12px;
        gap: 4px;
    }

    .project-tags span {
        font-size: 0.6rem;
        padding: 3px 8px;
    }

    .project-status {
        top: 10px;
        right: 10px;
        font-size: 0.6rem;
        padding: 3px 8px;
    }

    .footer-content {
        padding: 15px 10px;
        gap: 12px;
    }

    .footer-links {
        gap: 12px;
    }

    section h2 {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }

    .mobile-menu-toggle {
        width: 24px;
        height: 24px;
    }

    .hamburger-line {
        height: 2px;
    }
}