/* 
 * CHARBYTE.ORG // CORPORATE THEME
 * STATUS: PRODUCTION
 */

:root {
    /* PALETTE // DEEP NAVY */
    --bg-core: #020617;
    /* Slate 950 */
    --bg-gradient-start: #1e293b;
    /* Slate 800 */
    --bg-gradient-end: #0f172a;
    /* Slate 900 */

    --text-primary: #f8fafc;
    /* Slate 50 */
    --text-secondary: #94a3b8;
    /* Slate 400 */
    --text-accent: #38bdf8;
    /* Sky 400 */

    --accent-blue: #3b82f6;
    /* Blue 500 */
    --accent-violet: #8b5cf6;
    /* Violet 500 */
    --accent-glow: rgba(59, 130, 246, 0.5);

    /* FONT */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'Fira Code', monospace;

    /* UTILS */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --radius-lg: 16px;
    --radius-md: 8px;
}

/* --- RESET & BASE --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    height: 100%;
    background-color: var(--bg-core);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* SMOOTH SCROLL */
html {
    scroll-behavior: smooth;
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: #fff;
}

h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 2.25rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 65ch;
    font-size: 1.1rem;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--text-primary);
}

/* --- LAYOUT UTILS --- */
.screen-section {
    width: 100vw;
    width: 100vw;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 6rem 2rem;
    position: relative;
    /* Subtle separation */
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
}

/* --- COMPONENTS --- */

/* HEADER */
.nav-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: var(--glass-border);
}

.brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand span {
    font-weight: 400;
    color: var(--text-secondary);
}

.brand img {
    height: 32px;
    width: auto;
    margin-right: 0.75rem;
    image-rendering: pixelated;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.nav-link:hover {
    color: #fff;
}

/* HERO */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(circle at 50% 0%, var(--bg-gradient-start), transparent 70%),
        radial-gradient(circle at 0% 50%, rgba(59, 130, 246, 0.25), transparent 40%),
        radial-gradient(circle at 100% 50%, rgba(139, 92, 246, 0.25), transparent 40%);
    background-size: 200% 200%;
    animation: aurora-move 15s ease infinite alternate;
}

/* Optional Grid Overlay */
.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
    pointer-events: none;
}

@keyframes aurora-move {
    0% {
        background-position: 50% 0%;
    }

    100% {
        background-position: 50% 20%;
    }
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-violet));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: var(--accent-blue);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

/* PRODUCT SPLIT */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
    width: 100%;
}

.split-layout.reverse {
    direction: rt;
    /* Visual trick, better to use order */
}

.split-layout.reverse>* {
    direction: ltr;
    /* Reset text direction */
}

/* Better reverse approach with grid areas or order */
.split-layout.reverse .text-col {
    order: 2;
}

.split-layout.reverse .visual-col {
    order: 1;
}

.visual-card {
    background: var(--glass-bg);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 4/3;
    /* Taller ~30% increase from 16/9 */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease;
}

.visual-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
}

.feature-list {
    list-style: none;
    margin-bottom: 2rem;
}

.feature-list li {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

.feature-icon {
    color: var(--accent-blue);
    font-size: 1.1rem;
}

/* BUTTONS */
.btn-primary {
    display: inline-block;
    padding: 0.85rem 1.75rem;
    background: var(--accent-blue);
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    color: #fff;
}

.btn-secondary {
    display: inline-block;
    padding: 0.85rem 1.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 6, 23, 0.85);
    /* Darker backdrop */
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-card {
    background: #0f172a;
    /* Slate 900 */
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

/* Custom Scrollbar for Modal */
.modal-card::-webkit-scrollbar {
    width: 6px;
}

.modal-card::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.modal-card::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-header h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.05);
}

.close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    h1 {
        font-size: 2.5rem;
    }

    .nav-header {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        display: none;
    }

    /* Could add mobile menu later */

    .split-layout,
    .split-layout.reverse {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
        width: 100%;
    }

    .text-col,
    .visual-col {
        order: unset !important;
    }

    .feature-list li {
        justify-content: center;
    }

    .visual-card {
        aspect-ratio: auto;
        height: 400px;
        /* Increased from 300px */
    }

    .modal-card {
        padding: 1.5rem;
        max-width: 95%;
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* --- INTERACTIVE DEMO STYLES (Restored) --- */
.simulation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 20000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.simulation-overlay.active {
    display: flex;
    opacity: 1;
}

.sim-container {
    width: 90%;
    max-width: 700px;
    text-align: center;
}

.sim-terminal {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 20px;
    font-family: var(--font-mono);
    text-align: left;
    height: 300px;
    overflow-y: auto;
    margin-bottom: 2rem;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.terminal-line {
    margin-bottom: 8px;
    font-size: 0.9rem;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

.terminal-line.success {
    color: #3fb950;
}

/* GitHub Green */
.terminal-line.info {
    color: #58a6ff;
}

/* GitHub Blue */
.terminal-line.warn {
    color: #d29922;
}

/* GitHub Yellow */
.terminal-line.error {
    color: #f85149;
}

/* GitHub Red */

.sim-visual {
    height: 100px;
    width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    margin-bottom: 1rem;
}

/* Website Barcode Specifics */
.generated-barcode {
    display: flex;
    width: 100%;
    height: 100%;
}

.barcode-segment {
    flex: 1;
    height: 100%;
    transition: background 0.5s ease;
}

/* Video Barcode Specifics */
.sim-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    width: 100%;
    height: 100%;
}

.grid-cell {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.2);
    transition: background 0.1s;
}



/* --- PLINKEDIN SIMULATION STYLES --- */
:root {
    --plinkedin-green: #0072b1;
    /* Classic Blue for now, or user wanted "Plankton Green"? User said "Plankton Green" */
    --plankton-green: #0a66c2;
    /* Actually user said "Plankton Green" logo. Let's make a custom green. */
    --plankton-brand: #2ecc71;
}

.fake-browser {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    text-align: left;
    height: 400px;
    display: flex;
    flex-direction: column;
}

.browser-bar {
    background: #f3f4f6;
    padding: 10px;
    display: flex;
    gap: 10px;
    border-bottom: 1px solid #e5e7eb;
    align-items: center;
}

.browser-dots {
    display: flex;
    gap: 6px;
    margin-right: 10px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
}

.dot.red {
    background: #ed6a5e;
}

.dot.yellow {
    background: #f5bf4f;
}

.dot.green {
    background: #61c554;
}

.url-bar {
    background: #fff;
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.85rem;
    color: #555;
    display: flex;
    align-items: center;
}

.lock-icon {
    margin-right: 8px;
    color: #059669;
    /* Green lock */
}

.browser-content {
    flex: 1;
    background: #f3f2ef;
    /* LinkedIn-ish bg */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* PlinkedIn Login */
.plinkedin-login-card {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 320px;
    text-align: center;
}

.plinkedin-logo {
    color: var(--plankton-brand);
    font-weight: 800;
    font-size: 1.8rem;
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}

.pl-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.pl-btn {
    background: var(--plankton-brand);
    color: #fff;
    border: none;
    width: 100%;
    padding: 10px;
    border-radius: 20px;
    font-weight: 600;
    cursor: not-allowed;
}

/* PlinkedIn Feed */
.pl-feed-post {
    background: #fff;
    width: 100%;
    max-width: 500px;
    margin: 1rem 0;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.pl-post-header {
    padding: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.pl-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ccc;
}

.pl-info h4 {
    margin: 0;
    font-size: 0.9rem;
    color: #000;
}

.pl-info p {
    margin: 0;
    font-size: 0.75rem;
    color: #666;
}

.pl-video-container {
    width: 100%;
    height: 250px;
    background: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ai-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s;
    z-index: 10;
}

.ai-warning {
    background: #ef4444;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 1.2rem;
    border: 2px solid #fff;
    transform: rotate(-5deg);
}

.pl-actions {
    padding: 12px 10px;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #e5e5e5;
    color: #666;
    font-size: 0.95rem;
    font-weight: 600;
}

.pl-actions span {
    flex: 1;
    text-align: center;
    padding: 8px 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pl-actions span:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* VIDEO SIMULATION: FRAME ANIMATION */
.sim-frames-container {
    display: flex;
    gap: 2px;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: #000;
    z-index: 5;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.sim-frames-container.active {
    opacity: 1;
}

.sim-frame {
    flex: 1;
    background-size: cover;
    background-position: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.sim-frame.glitch-detected {
    border: 2px solid #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5) inset;
}

.scan-laser {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
    z-index: 20;
    opacity: 0;
}

.analysis-barcode-container {
    height: 60px;
    width: 100%;
    background: #000;
    margin-top: 5px;
    display: flex;
    opacity: 0;
    transition: opacity 0.5s;
}

.analysis-barcode-container.visible {
    opacity: 1;
}

/* Controls within simulate modal override */
.sandbox-controls {
    margin-bottom: 1rem;
}

.sandbox-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 2rem;
    justify-content: center;
}

.sandbox-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--accent-blue);
    color: #fff;
    padding: 10px 15px;
    border-radius: 6px;
    font-family: var(--font-mono);
    width: 60%;
    font-size: 1rem;
}

.sandbox-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.sandbox-btn.primary {
    background: var(--accent-blue);
    color: #fff;
}

.sandbox-btn.primary:hover {
    background: var(--accent-glow);
}

.sandbox-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn.active.safe {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.toggle-btn.active.danger {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
}

.live-barcode-strip {
    height: 120px;
    width: 100%;
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.5);
}

.live-barcode-segment {
    flex: 1;
    height: 100%;
    transition: background 0.3s ease;
}

.status-indicator {
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    margin-top: 1rem;
    display: inline-block;
    min-width: 200px;
}

.status-indicator.safe {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-indicator.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    .sim-container {
        padding: 5px;
    }

    .fake-browser {
        height: auto;
        min-height: 400px;
    }

    .plinkedin-login-card {
        width: 100%;
        max-width: 300px;
        /* Ensure 320px screens have padding */
        padding: 1.5rem;
    }

    .pl-feed-post {
        width: 100%;
        margin: 0.5rem 0;
        border-radius: 4px;
        border: none;
        border-top: 1px solid #e0e0e0;
        border-bottom: 1px solid #e0e0e0;
    }

    .pl-video-container {
        height: 200px;
        /* Slightly smaller on mobile */
    }

    .sandbox-input-group {
        flex-direction: column;
        align-items: center;
    }

    .sandbox-input {
        width: 100%;
    }

    .sandbox-controls {
        flex-wrap: wrap;
    }

    .toggle-btn {
        flex: 1;
        text-align: center;
        padding: 10px 5px;
        font-size: 0.9rem;
    }

    #browser-url {
        font-size: 0.75rem;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
        max-width: 200px;
    }

    /* Ensure modal close button doesn't overlap content on small screens */
    .close-btn {
        font-size: 2rem !important;
        padding: 10px;
        z-index: 100;
    }
}