:root {
    --bg-color: #050505;
    --text-color: #e0e0e0;
    --accent-cyan: #00f2ea;
    --accent-red: #ff0050;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
}

h1,
h2,
h3,
h4 {
    font-family: 'Fira Code', monospace;
    text-transform: uppercase;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Canvas Background */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
    position: relative;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    backdrop-filter: blur(5px);
}

nav .logo {
    font-family: 'Fira Code', monospace;
    font-weight: 700;
    color: white;
    font-size: 1.2rem;
}

nav .logo span {
    color: var(--accent-cyan);
}

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

nav a:hover,
nav button:hover {
    color: var(--accent-cyan);
}

.hamburger {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 15px;
    z-index: 101;
}

.lang-switch {
    background: transparent;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 5px 10px;
    font-family: 'Fira Code', monospace;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

.glitch-wrapper {
    position: relative;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: -2px;
    color: white;
    position: relative;
    text-shadow: 2px 2px 0px var(--accent-red), -2px -2px 0px var(--accent-cyan);
    animation: glitch 3s infinite;
}

@keyframes glitch {
    0% {
        transform: translate(0);
    }

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

    4% {
        transform: translate(2px, -2px);
    }

    6% {
        transform: translate(0);
    }

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

.hero h2 {
    font-size: 1.2rem;
    color: var(--accent-cyan);
    margin-top: 10px;
    font-weight: 400;
    letter-spacing: 2px;
}

.typing-container {
    margin-top: 20px;
    font-family: 'Fira Code', monospace;
    font-size: 1.1rem;
    min-height: 1.6em;
    color: rgba(255, 255, 255, 0.7);
}

.cursor {
    display: inline-block;
    width: 10px;
    background-color: var(--accent-red);
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.btn-cta {
    margin-top: 40px;
    padding: 15px 30px;
    background: transparent;
    border: 2px solid var(--accent-cyan);
    color: var(--accent-cyan);
    font-family: 'Fira Code', monospace;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: inline-block;
}

.btn-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-cyan);
    z-index: -1;
    transition: left 0.4s ease;
}

.btn-cta:hover {
    color: var(--bg-color);
    box-shadow: 0 0 20px var(--accent-cyan);
}

.btn-cta:hover::before {
    left: 0;
}

/* Glass Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 242, 234, 0.1);
    border-color: var(--accent-cyan);
}

/* Sections */
.section-title {
    font-size: 2rem;
    margin-bottom: 50px;
    color: white;
    border-left: 4px solid var(--accent-red);
    padding-left: 20px;
}

/* Mission */
#mission p {
    font-size: 1.25rem;
    color: #bbb;
    max-width: 800px;
}

/* Specs Grid */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.spec-item h3 {
    color: var(--accent-cyan);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.spec-item p {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
}

/* Roadmap */
.roadmap-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-left: 2px solid var(--glass-border);
    padding-left: 30px;
    margin-left: 10px;
}

.roadmap-item {
    position: relative;
}

.roadmap-item::before {
    content: '';
    position: absolute;
    left: -37px;
    top: 6px;
    width: 12px;
    height: 12px;
    background: var(--bg-color);
    border: 2px solid var(--accent-cyan);
    border-radius: 50%;
}

.roadmap-item.completed::before {
    background: var(--accent-cyan);
}

.roadmap-item.in-progress::before {
    background: var(--accent-red);
    border-color: var(--accent-red);
    box-shadow: 0 0 10px var(--accent-red);
}

.roadmap-item span {
    display: block;
    font-size: 0.85rem;
    color: #777;
    font-family: 'Fira Code', monospace;
    margin-bottom: 5px;
}

.roadmap-item h4 {
    font-size: 1.1rem;
    color: white;
}

/* Documentation Specific */
.doc-content h2 {
    color: var(--accent-cyan);
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

.doc-content h3 {
    color: white;
    margin-top: 30px;
    margin-bottom: 15px;
}

.doc-content p,
.doc-content ul {
    margin-bottom: 15px;
    color: #ccc;
}

.doc-content ul {
    padding-left: 20px;
}

.doc-content li {
    margin-bottom: 10px;
}

/* Footer */
footer {
    padding: 50px 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    margin-top: 50px;
}

footer p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.highlight {
    color: var(--accent-cyan);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero h2 {
        font-size: 1rem;
    }

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

    .specs-grid {
        grid-template-columns: 1fr;
    }

    .hamburger {
        display: block;
    }

    nav ul {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 5, 16, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        justify-content: center;
        align-items: center;
        z-index: 100;
        gap: 40px;
    }

    nav ul.active {
        display: flex;
    }

    nav ul li a {
        font-size: 1.5rem;
        font-family: 'Fira Code', monospace;
    }
}

/* Language Visibility Helpers */
.content-en,
.content-tr {
    display: none;
}

body.show-en .content-en {
    display: block;
}

body.show-tr .content-tr {
    display: block;
}

/* Inline elements helper */
span.content-en,
span.content-tr {
    display: none;
}

body.show-en span.content-en {
    display: inline;
}

body.show-tr span.content-tr {
    display: inline;
}

/* Language Switcher Button Style */
.lang-switch-wrapper {
    /* Previously fixed, now static to sit in nav */
    display: flex;
    gap: 5px;
    margin-left: 20px;
    /* Space from logo */
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: #888;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-family: monospace;
    font-weight: bold;
    transition: all 0.3s ease;
}

.lang-btn.active {
    background: #00fff2;
    /* Cyan accent */
    color: #000;
}

/* --- CHESS HIGHLIGHTS --- */
.ai-highlight {
    /* FIXED: Do not use background-color: !important, it erases the board square color! */
    /* Use box-shadow to overlay on top of existing color */
    box-shadow: inset 0 0 8px rgba(0, 242, 234, 0.6);
    /* Soft inner glow */
}

/* Legal Move Indicators (Optional, if using dots) */
/* .legal-move-dot { ... } implies internal chess.js modification usually,
   but we are using background highlighting in js/arena.js */

/* --- MOBILE SPECIFIC --- */
#board {
    /* Prevent Pull-to-refresh or accidental scrolling when dragging pieces */
    touch-action: none;
    width: 600px;
    /* Default Desktop */
}

#mobile-controls {
    display: none;
}

/* Responsive Board for Mobile */
@media (max-width: 650px) {
    #board {
        width: 100% !important;
        /* Force fit */
        max-width: 350px;
        margin: 0 auto;
    }

    .arena-container {
        padding-top: 60px;
        /* Less padding on mobile */
    }

    /* Hide desktop logs or make smaller */
    #terminal {
        height: 150px;
        font-size: 0.8rem;
    }
}

.kaira-btn {
    background: transparent;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 10px 20px;
    font-family: 'Fira Code', monospace;
    cursor: pointer;
    margin: 5px;
    transition: all 0.3s ease;
}

.kaira-btn:hover {
    background: var(--accent-cyan);
    color: #000;
}

.kaira-btn.small {
    padding: 5px 10px;
    font-size: 0.8rem;
}

/* --- Verification Card Section --- */
#verification {
    padding-bottom: 0;
}

.verification-wrapper {
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.verification-card {
    width: 100%;
    max-width: 500px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(0, 242, 234, 0.3);
    position: relative;
    overflow: hidden;
    padding: 0;
    /* Custom padding for inner layout */
    margin: 20px 0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.verification-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-red), var(--accent-cyan));
    animation: scan-line 3s linear infinite;
    background-size: 200% 100%;
}

@keyframes scan-line {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

/* Card Header */
.card-header {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
}

.institution-logo {
    font-size: 2.5rem;
    color: var(--accent-cyan);
    margin-right: 15px;
    text-shadow: 0 0 10px rgba(0, 242, 234, 0.5);
}

.institution-name h4 {
    font-size: 1rem;
    color: white;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.institution-name h5 {
    font-size: 0.75rem;
    color: #888;
    font-weight: 400;
}

.card-chip {
    margin-left: auto;
    width: 40px;
    height: 30px;
    background: linear-gradient(135deg, #ffd700, #b8860b);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
    opacity: 0.8;
}

.chip-line {
    width: 25px;
    height: 1px;
    background: rgba(0, 0, 0, 0.3);
}

/* Card Body */
.card-body {
    padding: 25px 20px;
    font-family: 'Fira Code', monospace;
}

.label {
    display: block;
    font-size: 0.65rem;
    color: #666;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.value {
    display: block;
    font-size: 1rem;
    color: #ddd;
    font-weight: 600;
    margin-bottom: 15px;
}

.value.highlight {
    color: var(--accent-cyan);
    text-shadow: 0 0 5px rgba(0, 242, 234, 0.3);
}

.sensitive-data {
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 4px;
    border: 1px dashed var(--glass-border);
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.data-row:last-child {
    margin-bottom: 0;
}

.data-row .label {
    margin-bottom: 0;
    width: 100px;
}

.data-row .value {
    margin-bottom: 0;
    font-size: 0.9rem;
    text-align: right;
}

.value.redacted {
    color: var(--accent-red);
    opacity: 0.7;
    letter-spacing: 2px;
    text-shadow: 0 0 5px rgba(255, 0, 80, 0.3);
}

/* Card Footer */
.card-footer {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--glass-border);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #00ff88;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {

    0%,
    100% {
        opacity: 1;
        text-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
    }

    50% {
        opacity: 0.8;
        text-shadow: 0 0 5px rgba(0, 255, 136, 0.2);
    }
}

.verify-link {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.verify-link:hover {
    color: var(--accent-cyan);
}

/* Holographic Overlay Effects */
.holo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        linear-gradient(115deg, transparent 40%, rgba(0, 242, 234, 0.1) 45%, transparent 50%),
        repeating-linear-gradient(0deg, transparent 0px, transparent 2px, rgba(0, 0, 0, 0.1) 3px);
    pointer-events: none;
    z-index: 2;
    opacity: 0.5;
}

@media (max-width: 600px) {
    .verification-card {
        margin: 10px;
    }

    .institution-name h4 {
        font-size: 0.9rem;
    }

    .card-footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* --- Model Loader --- */
#model-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 5, 16, 0.95);
    /* Deep dark background */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    backdrop-filter: blur(10px);
    transition: opacity 0.5s ease-out;
}

.loader-content {
    text-align: center;
    color: var(--accent-cyan);
    font-family: 'Fira Code', monospace;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 242, 234, 0.3);
    border-top: 4px solid var(--accent-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
    box-shadow: 0 0 15px var(--accent-cyan);
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* --- MOBILE LANDSCAPE ENFORCER --- */
#rotate-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 99999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.rotate-icon {
    font-size: 4rem;
    color: var(--accent-cyan);
    margin-bottom: 20px;
    animation: rotate-phone 2s infinite ease-in-out;
}

@keyframes rotate-phone {

    0%,
    10% {
        transform: rotate(0deg);
    }

    40%,
    60% {
        transform: rotate(-90deg);
    }

    90%,
    100% {
        transform: rotate(-90deg);
    }
}

/* Force Landscape on Mobile */
@media (max-width: 1000px) and (orientation: portrait) {
    #rotate-overlay {
        display: flex;
    }

    .soul-container,
    nav {
        display: none !important;
    }
}

/* Optimize Landscape View for Small Screens */
@media (max-width: 950px) and (orientation: landscape) {
    .soul-container {
        transform: scale(0.65);
        transform-origin: top left;
        width: 154%;
        /* 100vh / 0.65 = ~153.8vh. We use 140vh to ensure it fits comfortably,
           inner panels handle scrolling. */
        height: 145vh;
        min-height: 145vh;
        overflow: hidden;
        background-color: #050505;
        margin-bottom: -50vh;
        /* Pull up next elements if any, irrelevant here */
    }

    nav {
        zoom: 0.7;
    }

    body {
        /* Allow scrolling so user can reach the bottom 'Request Access' if perfectly fit fails */
        overflow-y: auto;
        background-color: #050505;
    }

    /* Additional tweak to ensure chat input area is visible */
    .chat-input-area {
        position: relative;
        /* Ensure it stays in flow */
    }
}

/* --- Check Alert --- */
#check-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    pointer-events: none;
    /* Let clicks pass through */
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px 40px;
    border: 2px solid red;
    box-shadow: 0 0 50px red;
    border-radius: 10px;
    animation: flash-red 0.5s infinite alternate;
}

.alert-content h1.warning {
    color: red;
    font-size: 2rem;
    font-weight: 900;
    margin: 0;
    text-shadow: 0 0 10px red;
}

@keyframes flash-red {
    0% {
        background: rgba(50, 0, 0, 0.8);
        box-shadow: 0 0 20px red;
    }

    100% {
        background: rgba(100, 0, 0, 0.9);
        box-shadow: 0 0 60px red;
    }
}

/* Rainbow Text Animation */
.rainbow-text {
    font-size: 2.5rem;
    font-weight: 900;
    margin-top: 20px;
    background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8f00ff);
    background-size: 400% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: rainbow-flow 3s linear infinite;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

@keyframes rainbow-flow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 400% 50%;
    }
}
/* --- Team Section --- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 30px;
}

.team-member {
    text-align: center;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.4s ease;
}

.team-member:hover {
    transform: translateY(-10px);
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 40px rgba(0, 242, 234, 0.15);
}

.member-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 25px;
    border: 3px solid var(--glass-border);
    transition: border-color 0.3s ease;
    background: #111;
}

.team-member:hover .member-photo {
    border-color: var(--accent-cyan);
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-member h3 {
    margin: 10px 0 5px;
    color: white;
    font-size: 1.5rem;
}

.team-member .role {
    color: var(--accent-cyan);
    font-size: 0.95rem;
    font-family: 'Fira Code', monospace;
    margin-bottom: 20px;
    font-weight: bold;
}

.linkedin-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #aaa;
    font-size: 0.9rem;
    padding: 8px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.linkedin-link:hover {
    background: #0077b5;
    border-color: #0077b5;
    color: white;
}
