/* ===== GLOBALS ===== */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    color: #ffffff;
    background: #0a1f44;
}

/* ===== HEADER ===== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0a1f44;
    color: white;
    padding: 15px 30px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}
header h2 { font-size: 1.5rem; font-weight: bold; }
nav ul { display: flex; list-style: none; margin: 0; padding: 0; }
nav li { margin-left: 20px; }
nav a { color: white; text-decoration: none; font-weight: 500; transition: color 0.3s; }
nav a:hover, nav a.active { color: #ff914d; }
.menu-toggle { display: none; cursor: pointer; font-size: 1.5rem; }

/* ===== HERO ===== */
.hero {
    height: 80vh;
    background: url('https://cdn.pixabay.com/photo/2023/02/08/08/50/frequency-wave-7776034_1280.jpg') center/cover no-repeat;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
    position: relative;
    padding: 0 10%;
}
.hero-content h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}
.hero-content h3 {
    font-size: 1.8rem;
    font-weight: 500;
    color: #b0d8ff;
    margin-bottom: 40px;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
}
.cursor {
    display: inline-block;
    width: 3px;
    background: #ffffff;
    margin-left: 4px;
    animation: blink 0.7s infinite;
    position: relative;
    bottom: -4px;
}
@keyframes blink { 50% { background: transparent; } }
.cta-btn {
    background: #ff914d;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s;
}
.cta-btn:hover { background: #ff5e00; transform: scale(1.05); }

/* ===== BLOCKS ===== */
.block {
    position: relative;
    overflow: hidden;
    padding: 120px 20px;
}
.block-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 50px;
}
.block-content.reverse { flex-direction: row-reverse; }
.block-content img {
    border-radius: 12px;
    max-width: 45%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.block-content .text { max-width: 50%; }
.block-content h2.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #ffffff;
}
.block-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #b0d8ff;
}
.highlight { color: #ff914d; font-weight: 700; }

/* ===== FEATURE CARDS ===== */
.feature-cards {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}
.feature-card {
    flex: 1 1 180px;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    transition: transform 0.3s, box-shadow 0.3s;
}
.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.feature-card h4 {
    color: #ff914d;
    font-family: 'Poppins', sans-serif;
    margin: 0 0 10px 0;
}
.feature-card p {
    font-size: 0.95rem;
    color: #b0d8ff;
    line-height: 1.5;
}

/* ===== GRADIENT & PATTERN BACKGROUNDS ===== */
.gradient1 { background: linear-gradient(135deg, #0a1f44, #0c1b2f); }
.gradient2 { background: linear-gradient(135deg, #0c1b2f, #0f2038); }
.gradient3 { background: linear-gradient(135deg, #0f2038, #14264c); }
.gradient4 { background: linear-gradient(135deg, #14264c, #1a2c60); }
.pattern-bg {
    background-image: linear-gradient(135deg, #0c1b2f, #0f2038),
                      url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ===== SLANTED SECTIONS ===== */
.slanted-top { clip-path: polygon(0 60px, 100% 0, 100% 100%, 0% 100%); margin-top: -60px; }
.slanted-bottom { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 60px), 0 100%); }
.slanted-both {
    clip-path: polygon(0 60px, 100% 0, 100% calc(100% - 60px), 0 100%);
    margin-top: -60px;
}

/* ===== FOOTER ===== */
footer {
    background: #06132b;
    padding: 50px 20px 20px 20px;
    color: #b0d8ff;
}
.footer-content {
    max-width: 1100px;
    margin: 0 auto 30px auto;
    display: flex;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
    text-align: left;
}
.footer-col { flex: 1 1 200px; }
.footer-col h4 {
    font-family: 'Poppins', sans-serif;
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.2rem;
}
.footer-col p, .footer-col li { font-size: 0.95rem; line-height: 1.6; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { color: #b0d8ff; text-decoration: none; transition: color 0.3s; }
.footer-col a:hover { color: #ff914d; }
.footer-bottom {
    text-align: center;
    font-size: 0.9rem;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ===== PLATFORM PAGE STYLES ===== */
.page-hero {
    padding-top: 160px;
    padding-bottom: 80px;
    text-align: center;
    background: linear-gradient(135deg, #0a1f44, #14264c);
}
.page-hero h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: #ffffff;
}
.page-hero h3 {
    font-size: 1.5rem;
    font-weight: 500;
    color: #b0d8ff;
    max-width: 700px;
    margin: 0 auto 40px auto;
}
.block-content.column {
    flex-direction: column;
    text-align: center;
}
.subtitle {
    max-width: 600px;
    margin: -10px auto 40px auto;
    font-size: 1.1rem;
    color: #b0d8ff;
}
.how-it-works-diagram {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 20px;
    width: 100%;
    flex-wrap: wrap;
}
.step-box {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 25px;
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    text-align: center;
    display: flex;
    flex-direction: column;
}
.step-number {
    width: 40px;
    height: 40px;
    background: #ff914d;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    color: white;
    margin: 0 auto 20px auto;
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
}
.step-box h4 {
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    margin: 0 0 10px 0;
    font-size: 1.3rem;
}
.step-box p {
    color: #b0d8ff;
    font-size: 0.95rem;
    line-height: 1.5;
    flex-grow: 1;
}
.connector-arrow {
    font-size: 2.5rem;
    color: #4da6ff;
    align-self: center;
}

/* ===== CAPTCHA DEMO STYLES ===== */
.demo-section {
    width: 100%;
    color: #e7eef7;
    font: 15px/1.5 system-ui,-apple-system,Segoe UI,Roboto;
    --ok:#34d399;
    --err:#ef4444;
}
.demo-section .card{
    background:#0f172a;
    border:1px solid rgba(255,255,255,.08);
    border-radius:12px;
    overflow:hidden;
    text-align: left;
    margin: 0 auto;
    max-width: 700px;
}
.demo-section .body{padding:12px}
.demo-section .game{position:relative;height:460px;border-radius:12px;background:linear-gradient(180deg,#0b1220,#0a101a);border:1px solid rgba(255,255,255,.06);overflow:hidden}
.demo-section .hint{position:absolute;top:8px;left:10px;font-size:12px;color:#99a9bd}
.demo-section .score{position:absolute;right:10px;top:8px;font-size:12px;color:#99a9bd}
.demo-section .target{position:absolute;width:44px;height:44px;border-radius:999px;background:#1f2937;border:2px dashed #334155;display:grid;place-items:center;opacity:.65;user-select:none;transition:transform .06s linear}
.demo-section .target[data-r="1"]{background:#0ea5e9;border:2px solid #7dd3fc;opacity:1}
.demo-section .flash{animation:flash .26s ease} @keyframes flash{50%{background:#072b4a}}
.demo-section .occl{position:absolute;background:#0b0f14aa;border:1px solid rgba(255,255,255,.06);border-radius:8px}
.demo-section .banner{position:absolute;inset:0;display:grid;place-items:center;background:rgba(2,6,23,.6)}
.demo-section .row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.demo-section button{all:unset;box-sizing: border-box; background:#0b1220;border:1px solid rgba(255,255,255,.08);padding:8px 12px;border-radius:10px;cursor:pointer;color:#e5e7eb; font-family: system-ui,-apple-system,Segoe UI,Roboto; font-size: 15px;}
.demo-section select, .demo-section input{background:#0b1220;border:1px solid rgba(255,255,255,.1);border-radius:8px;padding:6px 8px;color:#e5e7eb}
.demo-section .pill{display:inline-flex;gap:6px;align-items:center;background:#0b1220;border:1px solid rgba(255,255,255,.08);padding:6px 8px;border-radius:999px;font-size:12px;color:#cbd5e1}
.demo-section .ok{color:var(--ok)}
.demo-section .err{color:var(--err)}
.demo-section .stage2{position:absolute;inset:0;display:none;place-items:center;background:rgba(2,6,23,.80);backdrop-filter:blur(1px);pointer-events:auto;z-index:5}
.demo-section .game.s2 .target{pointer-events:none}
.demo-section .stage2 .panel{background:#0f172a;border:1px solid rgba(255,255,255,.12);padding:14px;border-radius:12px;max-width:560px;text-align:center}
.demo-section .dial{width:200px;height:200px;border-radius:999px;border:2px solid #32455a;margin:12px auto;position:relative;overflow:hidden;touch-action:none}
.demo-section .dial::after{content:"";position:absolute;left:50%;top:50%;width:6px;height:6px;margin:-3px 0 0 -3px;background:#7dd3fc;border-radius:999px}
.demo-section .dial .trail{position:absolute;inset:0;pointer-events:none}
.demo-section .s2status{font-size:12px;color:#a8b4c7;margin-top:6px}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .hero { text-align: center; justify-content: center; padding: 0 5%; }
    .hero-content h1 { font-size: 3rem; }
    .hero-content h3 { font-size: 1.5rem; }

    .block { padding: 80px 20px; }
    .block-content { flex-direction: column !important; text-align: center; }
    .block-content img, .block-content .text { max-width: 90%; }
    
    .feature-cards { justify-content: center; }

    nav ul {
        display: none;
        flex-direction: column;
        background:#0a1f44;
        position:absolute;
        top: 65px;
        right:0;
        width:100%;
        padding: 10px 0;
    }
    nav.active ul { display:flex; }
    nav li { margin: 10px 20px; }
    .menu-toggle { display:block; }

    .footer-content { text-align: center; }
    
    .page-hero h1 { font-size: 2.5rem; }
    .page-hero h3 { font-size: 1.2rem; padding: 0 20px;}
    
    .how-it-works-diagram { flex-direction: column; align-items: center; }
    .connector-arrow { transform: rotate(90deg); margin: -10px 0; }
}

/* ===== NEW STYLES FOR WHY US PAGE ===== */

.comparison-container {
    width: 100%;
    max-width: 900px;
    margin-top: 30px;
    overflow-x: auto; /* Allows horizontal scrolling on small screens */
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(15, 23, 42, 0.7); /* dark panel color */
    border-radius: 12px;
    overflow: hidden;
    font-size: 1rem;
}

.comparison-table th, .comparison-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-table thead th {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.comparison-table tbody tr:last-child td {
    border-bottom: none;
}

.comparison-table td:nth-child(1) {
    font-weight: 500;
    color: #cbd5e1; /* Lighter text for the feature */
}

.comparison-table .positive {
    color: #34d399; /* Green for positive points */
}

.comparison-table .negative {
    color: #ef4444; /* Red for negative points */
}

/* ===== NEW STYLES FOR ABOUT US PAGE ===== */

.team-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 30px;
    max-width: 1000px;
}

.team-member {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    flex: 1 1 250px; /* Flexbox properties for responsive columns */
    max-width: 280px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.team-member:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.team-member img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid #ff914d;
}

.team-member h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    color: #ffffff;
    margin: 0 0 5px 0;
}

.team-member p.role {
    color: #ff914d;
    font-weight: 500;
    margin: 0 0 15px 0;
}

.team-member p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #b0d8ff;
}

/* Stat card adjustments for this page */
.stats-section {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    text-align: center;
    gap: 30px;
    width: 100%;
}
.stat-card {
    background: rgba(255,255,255,0.05);
    padding: 30px;
    border-radius: 12px;
    flex: 1 1 200px;
    max-width: 250px;
    transition: transform 0.3s;
}
.stat-card:hover {
    transform: scale(1.05);
}
.stat-number {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: #ff914d;
    margin: 10px 0;
}
.stat-card p {
    color: #b0d8ff;
    font-size: 1rem;
}

/* ===== STYLES FOR DEMOS PAGE (Light Theme Game) ===== */

.demo-container {
    padding: 80px 20px;
    background: linear-gradient(135deg, #0a1f44, #0f2038); /* Dark theme background */
}

.demo-header {
    text-align: center;
    margin-bottom: 20px;
}

.demo-header .section-title,
.demo-header .subtitle {
    color: #ffffff; /* White text on dark background */
}

/* Light-themed game container */
.game-wrapper {
    width: 350px;
    height: 400px;
    margin: 20px auto;
    border: 1px solid #ccc;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    background: #f0f8ff; /* Light background for the game */
    user-select: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    color: #333; /* Dark text for light background */
}

.game-overlay {
    position: absolute;
    inset: 0;
    background: rgba(240, 248, 255, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 100;
    font-size: 18px;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    color: #27ae60;
}

.restart-btn-styled {
    all: unset;
    box-sizing: border-box;
    margin-top: 20px;
    padding: 12px 24px;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s;
}

.restart-btn-styled:hover {
    background-color: #0056b3;
}

/* Styles for EmojiCatch Game */
#game-ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 8px;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    box-sizing: border-box;
    z-index: 10;
}

#catch-target, #score-display {
    background: rgba(255, 255, 255, 0.8);
    padding: 4px 8px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#paddle {
    position: absolute;
    bottom: 10px;
    width: 80px;
    height: 20px;
    background: #7f8c8d;
    border-radius: 6px;
    transform: translateX(-50%);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border-top: 5px solid #95a5a6;
}

.falling-item {
    position: absolute;
    font-size: 32px;
    line-height: 1;
    top: 0;
    left: 0;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #f1c40f;
    border-radius: 50%;
    z-index: 20;
    animation: burst 0.5s ease-out forwards;
}

@keyframes burst {
    from {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    to {
        transform: translate(calc(var(--vx, 0) * 15px), calc(var(--vy, 0) * 15px)) scale(0);
        opacity: 0;
    }
}

/* === Demo page (loader-only) additions === */
.demo-container { padding: 80px 20px; background: linear-gradient(135deg,#0a1f44,#0f2038); }
.demo-shell { max-width: 1100px; margin: 0 auto; }
.demo-card { box-shadow: 0 10px 30px rgba(0,0,0,0.25); }
@media (max-width: 900px){ .demo-container { padding: 60px 16px; } }

/* Tighten hero bottom spacing on pages with fixed header */
.page-hero { padding-top: 160px; padding-bottom: 80px; }
