:root {
    --primary: #f1c40f;
    --primary-dim: #b7950b;
    --secondary: #e74c3c;
    --bg-dark: #050505;
    --bg-panel: rgba(5, 5, 5, 0.9);
    --text-main: #ecf0f1;
    --text-muted: #95a5a6;
    --border-color: rgba(255, 255, 255, 0.1);
    --accent-green: #2ecc71;
}

/* PRELOADER */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-title {
    font-size: 3rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 1rem;
    letter-spacing: 5px;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

.loader-text {
    color: #666;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { opacity: 0.5; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1); }
    100% { opacity: 0.5; transform: scale(0.95); }
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    background: transparent !important; /* Arka plan tamamen temizlendi */
    color: var(--text-main);
    overflow-x: hidden !important; 
    width: 100%;
    position: relative;
    scroll-behavior: smooth;
}

#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: #000000; /* Sadece en alttaki canvas siyah kalsın */
}

/* HERO SECTION */
header, 
header .container-fluid, 
header .row, 
header .col-12 {
    background: transparent !important;
}

header {
    min-height: 100vh;
    width: 100%;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    background: transparent !important; /* Arka plan tamamen temizlendi */
    overflow: hidden;
    pointer-events: none; /* Let mouse pass through to canvas */
}

header .btn-cta,
header #mute-btn,
header #scroll-down {
    pointer-events: auto; /* Re-enable for interactive elements */
}

@media (min-width: 992px) {
    header {
        min-height: 94vh;
    }
}

h1 {
    font-size: clamp(2.5rem, 12vw, 7rem); 
    margin: 0;
    background: linear-gradient(90deg, #fff, #f1c40f, #fff, #f1c40f);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: clamp(4px, 1.5vw, 12px);
    filter: drop_shadow(0 0 35px rgba(0, 0, 0, 1));
    opacity: 1; 
    transform: translateY(0);
    animation: shine 4s infinite linear;
    max-width: 100%;
}

@keyframes shine {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.tagline {
    font-size: clamp(1.2rem, 4vw, 2rem);
    margin-top: 1.5rem;
    font-weight: 300;
    color: #ddd;
    opacity: 1; 
    transform: translateY(0);
    text-shadow: 0 4px 20px rgba(0,0,0,1);
    position: relative;
    padding: 15px 0;
    width: 100%;
    z-index: 10;
}

.tagline::before, #intro-text::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    /* BORDERLAR KALDIRILDI */
    z-index: -1;
}

.tagline span {
    color: var(--secondary);
    font-weight: bold;
}

.btn-cta {
    background: var(--primary);
    color: #000;
    padding: 1.2rem 3.5rem;
    font-size: 1.3rem;
    font-weight: 900;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 95% 100%, 0 100%);
    transition: 0.1s;
    margin-top: 3rem;
    text-decoration: none;
    display: inline-block;
    opacity: 1; 
    position: relative;
    animation: flicker-base 4s infinite;
}

.btn-cta::before, .btn-cta::after {
    content: "BAŞLAYALIM MI?";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: -1;
    opacity: 0;
}

.btn-cta::before {
    background: #ff003c;
    color: #fff;
    animation: glitch-1-3 3s infinite steps(1);
}

.btn-cta::after {
    background: #00f0ff;
    color: #000;
    animation: glitch-1-3-extra 2.5s infinite steps(1);
}

@keyframes flicker-base {
    0%, 19.999%, 22%, 62.999%, 64%, 64.999%, 70%, 100% { opacity: 1; }
    20%, 21.999%, 63%, 63.999%, 65%, 69.999% { opacity: 0.8; }
}

@keyframes glitch-1-3 {
    0%, 100% { opacity: 0; transform: translate(0); clip-path: inset(0 0 0 0); }
    10% { opacity: 1; transform: translate(-5px, 2px); clip-path: inset(10% 0 80% 0); }
    12% { transform: translate(5px, -2px); clip-path: inset(40% 0 40% 0); }
    14% { opacity: 0; }
    45% { opacity: 0; }
    46% { opacity: 1; transform: translate(10px, 0); clip-path: inset(80% 0 5% 0); }
    48% { opacity: 0; }
}

@keyframes glitch-1-3-extra {
    0%, 100% { opacity: 0; transform: translate(0); clip-path: inset(0 0 0 0); }
    25% { opacity: 1; transform: translate(5px, -2px); clip-path: inset(70% 0 10% 0); }
    27% { transform: translate(-5px, 2px); clip-path: inset(20% 0 60% 0); }
    29% { opacity: 0; }
    80% { opacity: 0; }
    81% { opacity: 1; transform: translate(-10px, 0); clip-path: inset(5% 0 90% 0); }
    83% { opacity: 0; }
}

#intro-text {
    margin-top: 2rem;
    width: 100%; 
    text-align: center;
    font-size: clamp(1.2rem, 4vw, 1.8rem); 
    color: #bbb;
    min-height: 8rem; 
    opacity: 0; 
    pointer-events: none;
    will-change: opacity, transform; 
    transform: translateZ(0); 
    text-shadow: 0 4px 10px rgba(0,0,0,1);
    display: flex; 
    align-items: center;
    justify-content: center;
    padding: 1rem 0; 
    position: relative;
    z-index: 10;
}

/* MUTE BUTTON */
#mute-btn {
    position: fixed;
    top: 9px;
    right: 9px;
    z-index: 99999; 
    background: rgba(0,0,0,0.8);
    border: 1px solid #444;
    color: #fff;
    padding: 0; 
    border-radius: 50%;
    cursor: pointer;
    width: 45px;
    height: 45px;
    display: none; 
    font-size: 1.2rem;
    align-items: center;
    justify-content: center;
    transition: transform 0.05s ease-out, background 0.3s; 
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    will-change: transform;
}

/* NAVIGATION TABS */
.nav-container {
    position: relative;
    width: 100%;
    min-height: 60px; 
    height: 60px; 
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(15px);
    z-index: 3000; 
    border-bottom: 1px solid var(--border-color);
    padding: 0; 
    display: flex;
    align-items: center; 
    justify-content: center;
    transition: opacity 1s ease, background 0.3s ease;
    opacity: 0; 
}

.nav-container.fixed-top {
    position: fixed !important;
    top: 0 !important;
    width: 100%;
    background: rgba(0,0,0,0.95) !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    z-index: 3000; 
    display: flex;
    align-items: center; 
    animation: slideDown 0.3s ease;
}

@media (max-width: 991px) {
    .nav-container.loaded {
        position: fixed !important;
        top: 0 !important;
        opacity: 1 !important;
    }
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.nav-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    text-transform: uppercase;
    transition: 0.3s;
    cursor: pointer; 
    letter-spacing: 1px;
    display: inline-block; 
    padding: 0 1.5rem;
}

.nav-item:hover, .nav-item.active {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary);
}

/* BURGER MENU */
#burger-menu {
    width: 30px;
    height: 20px;
    position: relative;
    cursor: pointer;
    z-index: 3000;
}

#burger-menu span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--primary);
    border-radius: 9px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

#burger-menu span:nth-child(1) { top: 0px; }
#burger-menu span:nth-child(2) { top: 10px; }
#burger-menu span:nth-child(3) { top: 20px; }

#burger-menu.open span:nth-child(1) { top: 10px; transform: rotate(135deg); }
#burger-menu.open span:nth-child(2) { opacity: 0; left: -60px; }
#burger-menu.open span:nth-child(3) { top: 10px; transform: rotate(-135deg); }

/* MOBILE NAV OVERLAY */
#mobile-nav {
    position: fixed;
    top: 0;
    right: -100%; 
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    z-index: 2000;
    transition: 0.5s cubic-bezier(0.7, 0, 0.3, 1);
}

#mobile-nav.open {
    right: 0;
}

.mobile-nav-item {
    color: #fff;
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    margin: 1.5rem 0;
    text-decoration: none;
    letter-spacing: 5px;
    cursor: pointer;
    transition: 0.3s;
}

.mobile-nav-item:hover {
    color: var(--primary);
    transform: scale(1.1);
}

/* SCROLL INDICATOR */
#scroll-down {
    animation: bounce 2s infinite;
    opacity: 0;
    transition: opacity 1s ease;
}

.mouse-icon {
    width: 26px;
    height: 42px;
    border: 2px solid var(--primary);
    border-radius: 15px;
    margin: 0 auto;
    position: relative;
}

.mouse-icon::after {
    content: "";
    width: 4px;
    height: 8px;
    background: var(--primary);
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: mouse-scroll 1.5s infinite;
}

@keyframes mouse-scroll {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(15px); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* SCROLL TO TOP */
#scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--primary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 4000;
    transition: all 0.5s cubic-bezier(0.7, 0, 0.3, 1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    clip-path: polygon(20% 0%, 80% 0%, 100% 20%, 100% 80%, 80% 100%, 20% 100%, 0% 80%, 0% 20%);
}

#scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#scroll-top:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 20px var(--primary);
    animation: jitter 0.1s infinite;
}

/* CONTAINER */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
    z-index: 2;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h2 {
    font-size: 3.5rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-weight: 900;
    text-shadow: 0 5px 15px rgba(0,0,0,0.8);
    background: rgba(0,0,0,0.6);
    display: inline-block;
    padding: 10px 30px;
    border-radius: 10px;
    max-width: 100%;
}

.section-header .divider {
    width: 120px;
    height: 5px;
    background: var(--primary);
    margin: 0 auto;
}

/* CONTENT BOXES */
.mission-box {
    background: rgba(5, 10, 20, 0.95);
    border: 1px solid rgba(52, 152, 219, 0.3);
    padding: 5rem 3rem;
    margin: 6rem 0;
    border-radius: 20px;
    text-align: center;
    backdrop-filter: blur(30px);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.8);
    opacity: 1; 
    transform: scale(1);
    position: relative;
    overflow: hidden;
}

.mission-box::before {
    content: "CODE";
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 10rem;
    opacity: 0.03;
    font-weight: 900;
    color: #fff;
    pointer-events: none;
}

.mission-title {
    font-size: 3rem;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 2rem;
    text-shadow: 0 0 20px var(--primary);
    font-weight: 900;
}

.mission-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #ddd;
    max-width: 900px;
    margin: 0 auto 2rem auto;
}

.manifesto-box {
    background: rgba(10, 5, 5, 0.92);
    border: 1px solid rgba(231, 76, 60, 0.3);
    padding: 5rem 3rem;
    margin: 8rem 0;
    border-radius: 20px;
    text-align: center;
    backdrop-filter: blur(30px);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.8);
    opacity: 1; 
    transform: scale(1);
    position: relative;
    overflow: hidden;
}

.manifesto-box::before {
    content: "İKAZ EDİYORUZ";
    position: absolute;
    bottom: -10px;
    right: 10px;
    font-size: 8rem;
    opacity: 0.05;
    font-weight: 900;
    color: var(--secondary);
    pointer-events: none;
    white-space: nowrap;
    transform: rotate(-5deg);
    transition: all 0.5s ease;
}

/* Orta Segment (Laptop/Geniş Tablet) Fix */
@media (max-width: 1200px) {
    .manifesto-box::before {
        font-size: 5.5rem;
        bottom: 10%;
        right: 5%;
        transform: rotate(-15deg);
    }
}

.manifesto-title {
    font-size: 3.5rem;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 2rem;
    text-shadow: 0 0 20px var(--secondary);
    font-weight: 900;
    overflow-wrap: normal;
    word-wrap: normal;
    word-break: normal;
    max-width: 100%;
}

.manifesto-vs {
    color: #999; 
    font-size:0.9rem; 
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
}

.mobile-box {
    background: rgba(10, 10, 10, 0.95);
    border-left: 5px solid var(--primary);
    padding: 4rem;
    margin: 6rem 0;
    position: relative;
    overflow: hidden;
    border-radius: 0 20px 20px 0;
    backdrop-filter: blur(30px);
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
    opacity: 1; 
}

.mobile-box::after {
    content: "📱";
    position: absolute;
    right: 20px;
    bottom: -20px;
    font-size: 15rem;
    opacity: 0.05;
    transform: rotate(-20deg);
}

.problem-solution {
    margin-bottom: 3rem;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(30px);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    opacity: 1; 
    transform: translateX(0);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.ps-problem {
    padding: 3rem;
    background: rgba(231, 76, 60, 0.05);
    border-right: 1px solid var(--border-color);
    position: relative;
}

.ps-problem::before {
    content: "SORUN";
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 0.8rem;
    background: var(--secondary);
    color: #fff;
    padding: 4px 10px;
    border-radius: 5px;
    font-weight: 900;
}

.ps-solution {
    padding: 3rem;
    background: rgba(46, 204, 113, 0.02);
    position: relative;
}

.ps-solution::before {
    content: "ÇÖZÜLDÜ";
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 0.8rem;
    background: #2ecc71;
    color: #000;
    padding: 4px 10px;
    border-radius: 5px;
    font-weight: 900;
}

.ps-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

.feature-card {
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(30px);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2.5rem;
    transition: 0.4s;
    opacity: 1; 
    transform: translateY(0);
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    transform: translateY(-10px);
}

.feature-card h3 {
    color: var(--primary);
    font-size: 1.6rem;
    margin-top: 0;
    text-transform: uppercase;
    font-weight: 700;
}

.meter-container {
    margin-top: 1.5rem;
}
.meter-label {
    display: flex; 
    justify-content: space-between;
    font-size: 0.95rem;
    margin-bottom: 8px;
}
.meter-bar {
    height: 12px;
    background: #222;
    border-radius: 6px;
    overflow: hidden;
}
.meter-fill {
    height: 100%;
    background: #2ecc71;
    width: 0%;
    transition: width 1.5s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

/* SECTION ANCHOR FIXES (Calculated via JS) */
#mission-section, #manifesto-section, #multiplatform-section, #engineering-section {
    position: relative;
}

footer {
    background: #000;
    padding: 5rem 2rem;
    text-align: center;
    border-top: 1px solid #222;
    margin-top: 8rem;
    position: relative;
    z-index: 10;
}

footer h2 {
    color: var(--primary);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.mission-badge {
    display: inline-block;
    padding: 15px 40px;
    border: 2px solid var(--primary);
    border-radius: 50px;
    color: #fff;
    font-weight: bold;
    letter-spacing: 3px;
    font-size: 1.2rem;
    background: rgba(241, 196, 15, 0.1);
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 991px) {
    #mute-btn {
        width: 40px !important;
        height: 40px !important;
        top: 9px;
        right: 9px;
        font-size: 1rem;
    }

    #scroll-top {
        width: 40px !important;
        height: 40px !important;
        bottom: 15px !important;
        right: 15px !important;
        font-size: 1rem !important;
    }

    /* Dikey çizgileri kaldır */
    .col-lg-6 {
        border-right: none !important;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem !important; 
        letter-spacing: 3px;
    }
    .tagline {
        font-size: 1rem;
        width: 100%;
        padding: 10px;
    }
    #intro-text {
        font-size: 1.8rem !important; 
        padding: 0 1rem;
        height: auto;
        min-height: 4rem;
    }
    .btn-cta {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    .nav-wrapper {
        white-space: nowrap;
        overflow-x: auto;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch; 
        text-align: left;
    }
    .nav-item {
        font-size: 0.9rem;
        display: inline-block;
        padding: 10px;
    }
    .nav-wrapper::-webkit-scrollbar {
        display: none;
    }
    .container {
        padding: 2rem 1rem;
    }
    .section-header h2 {
        font-size: 1.6rem; /* Biraz daha küçültüldü */
        padding: 8px 15px !important; /* Yan boşluklar daraltıldı */
        width: 95%; /* Daha geniş yayılım */
    }
    .mission-title, .manifesto-title, .mobile-box h2 {
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
    }
    .mission-box, .manifesto-box {
    padding: 2.5rem 1.2rem !important;
    margin: 3.5rem 0 !important;
    border-radius: 15px;
    text-align: center !important; /* Mobilde her şeyi ortala */
    }
    
    /* Liste ve paragrafları mobilde ortala */
    .mission-box p, .manifesto-box p, .mobile-box p, .problem-solution p {
        text-align: center !important;
    }
    
    .manifesto-box ul {
        display: inline-block;
        text-align: left; /* Maddelerin hizası bozulmasın ama liste bloğu ortalansın */
        padding: 0 !important;
    }

    .manifesto-box li {
        text-align: left;
    }

    .manifesto-vs {
        text-align: center !important;
    }

    .manifesto-title {
        font-size: 1.5rem !important; 
        letter-spacing: 1px;
    }
    /* Filigran Düzeltmeleri */
    .manifesto-box::before {
        font-size: 3.5rem !important;
        bottom: 15% !important;
        right: 10% !important; /* Merkeze yaklaştırıldı */
        opacity: 0.12 !important; /* Bir tık daha görünür */
        transform: rotate(-50deg) !important; /* Daha agresif tilt */
        white-space: nowrap;
    }
    .mission-box::before {
        font-size: 4rem !important;
        top: 10px !important;
        left: 5px !important;
        transform: rotate(-15deg);
    }
    .mission-title {
        font-size: 1.8rem !important;
    }
    .mobile-box {
        padding: 2rem;
        border-radius: 15px;
        border-left: none;
        border-top: 5px solid var(--primary);
    }
    .mobile-box h2 {
        font-size: 1.8rem !important;
    }
    /* Terminal Fix */
    #terminal-code {
        font-size: 0.8rem !important; /* Mobilde yazıyı biraz küçült ki daha az sarsın */
    }
    #terminal-code-container {
        min-height: 160px !important; /* Alt satıra kaymalara karşı güvenli alan */
    }
    .feature-card {
        padding: 1.5rem;
    }
    .mission-badge {
        padding: 10px 20px !important;
        font-size: 0.9rem !important;
        letter-spacing: 1px !important;
        width: 90%; 
    }
    
    .problem-solution {
        margin-bottom: 1rem !important; /* Kartlar arası boşluk azaldı */
    }
    
    .ps-problem, .ps-solution {
        padding: 1.5rem !important; /* Kart içi boşluk azaldı */
        border-right: none !important;
        border-bottom: 1px solid var(--border-color);
    }
    
    footer {
        padding: 3rem 1rem;
    }
}