/* ============================================
   TURINGTEST.CLUB - Human vs Machine Dialogue
   ============================================ */

:root {
    --machine-bg: #0a0a0a;
    --human-bg: #f5e6d0;
    --phosphor: #33ff33;
    --ink: #2c2c2c;
    --amber: #ffaa00;
    --coral: #e85d4a;
    --cyan: #00d4ff;
    --border: #666666;
    --sticky: #fff8b0;
    --coffee: #8b6f47;
}

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

html {
    background: var(--machine-bg);
}

body {
    overflow-x: hidden;
    background: var(--machine-bg);
}

/* === Split Sections === */
.split-section {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.panel {
    flex: 1;
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* === Machine Panel === */
.machine-panel {
    background: var(--machine-bg);
    transform: perspective(800px) rotateX(0.5deg);
    transform-origin: center center;
}

.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.08) 2px,
        rgba(0,0,0,0.08) 4px
    );
    pointer-events: none;
    z-index: 2;
}

.terminal-content {
    position: relative;
    z-index: 3;
    max-width: 500px;
}

.term-line {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.85rem, 1vw, 1rem);
    font-weight: 400;
    color: var(--phosphor);
    line-height: 1.6;
    text-shadow: 0 0 8px rgba(51,255,51,0.4);
    opacity: 0;
    margin-bottom: 0.3rem;
}

.term-line.visible {
    opacity: 1;
}

.section-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--phosphor);
    opacity: 0.5;
    text-shadow: 0 0 8px rgba(51,255,51,0.3);
    margin-bottom: 1.5rem;
}

.blink-cursor {
    animation: cursorBlink 1.2s step-end infinite;
    color: var(--phosphor);
    text-shadow: 0 0 8px rgba(51,255,51,0.6);
}

@keyframes cursorBlink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* === Human Panel === */
.human-panel {
    background: var(--human-bg);
    position: relative;
}

.human-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

.paper-content {
    position: relative;
    z-index: 2;
    max-width: 500px;
}

.human-text {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.1rem, 1.3vw, 1.3rem);
    font-weight: 400;
    color: var(--ink);
    line-height: 1.7;
    margin-bottom: 1.2rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.human-text.revealed {
    opacity: 1;
    transform: translateY(0);
}

.handwritten-block {
    opacity: 0;
    transition: opacity 1s ease;
}

.handwritten-block.visible {
    opacity: 1;
}

.handwritten-line {
    font-family: 'Caveat', cursive;
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.5;
}

/* === Dividers === */
.divider {
    width: 2px;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.divider-crisp {
    background: rgba(51,255,51,0.6);
}

.divider-wobbly {
    background: transparent;
    overflow: visible;
}

.divider-wobbly::before {
    content: '';
    position: absolute;
    top: 0;
    left: -1px;
    width: 4px;
    height: 100%;
    background: var(--human-bg);
    opacity: 0.7;
    border-radius: 2px;
}

.divider-glitch {
    background: rgba(51,255,51,0.6);
    animation: glitchDivider 2s ease-in-out infinite;
}

@keyframes glitchDivider {
    0%, 40% { background: rgba(51,255,51,0.6); }
    42% { background: var(--human-bg); transform: translateX(-2px); }
    44% { background: rgba(51,255,51,0.6); transform: translateX(1px); }
    46% { background: var(--human-bg); }
    48%, 100% { background: rgba(51,255,51,0.6); transform: translateX(0); }
}

/* === Title Halves === */
.title-half {
    font-family: 'Bungee', cursive;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 400;
    position: absolute;
    bottom: 3rem;
    line-height: 1.1;
}

.title-machine {
    color: var(--phosphor);
    text-shadow: 0 0 15px rgba(51,255,51,0.5);
    right: 2rem;
    text-align: right;
}

.title-human {
    color: var(--ink);
    left: 2rem;
}

/* === Sticky Notes === */
.sticky-note {
    background: var(--sticky);
    max-width: 280px;
    padding: 1rem 1.2rem;
    margin: 1.5rem 0;
    transform: rotate(calc(var(--rotation, 2) * 1deg));
    box-shadow: 2px 3px 8px rgba(0,0,0,0.15);
    position: relative;
    z-index: 3;
}

.sticky-note::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 16px 16px;
    border-color: transparent transparent #e6d890 transparent;
}

.sticky-note p {
    font-family: 'Caveat', cursive;
    font-size: 1rem;
    font-weight: 400;
    color: var(--ink);
    line-height: 1.5;
}

/* === Coffee Rings === */
.coffee-ring {
    position: absolute;
    width: 80px;
    height: 80px;
    right: 1rem;
    bottom: 5rem;
    opacity: 0;
    transition: opacity 2s ease;
    z-index: 1;
}

.coffee-ring.visible {
    opacity: 1;
}

.coffee-ring-2 {
    right: auto;
    left: 2rem;
    bottom: auto;
    top: 3rem;
    width: 100px;
    height: 100px;
}

/* === Handwritten Underlines & Accents === */
.hand-underline {
    text-decoration: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8'%3E%3Cpath d='M0,5 Q10,2 20,5 T40,5 T60,5 T80,5 T100,5' fill='none' stroke='%23e85d4a' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-position: bottom;
    background-size: 60px 6px;
    padding-bottom: 3px;
}

.crossed-out {
    text-decoration: line-through;
    text-decoration-color: var(--ink);
    opacity: 0.5;
}

.accent-amber {
    color: var(--amber);
    font-weight: 700;
}

.accent-coral {
    color: var(--coral);
    font-weight: 700;
    text-shadow: 0 0 8px rgba(232,93,74,0.4);
}

.accent-cyan {
    color: var(--cyan);
    text-shadow: 0 0 8px rgba(0,212,255,0.4);
}

/* === CAPTCHA Grid === */
.captcha-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 240px;
    margin: 0 auto;
    padding: 2rem 0;
    gap: 0;
}

.captcha-cell {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    border: 1px solid var(--border);
}

.cell-machine {
    background: var(--machine-bg);
    font-family: 'Share Tech Mono', monospace;
    color: var(--phosphor);
    text-shadow: 0 0 5px rgba(51,255,51,0.3);
}

.cell-human {
    background: var(--human-bg);
    font-family: 'Caveat', cursive;
    color: var(--ink);
    font-size: 1rem;
}

/* === Prompt Bar === */
#prompt-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    display: flex;
    z-index: 100;
}

.prompt-machine {
    flex: 1;
    background: var(--machine-bg);
    border-top: 1px solid rgba(51,255,51,0.3);
    display: flex;
    align-items: center;
    padding: 0 1rem;
}

.prompt-caret {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: var(--phosphor);
    text-shadow: 0 0 5px rgba(51,255,51,0.4);
}

.prompt-human {
    flex: 1;
    background: var(--human-bg);
    border-top: 1px solid rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    padding: 0 1rem;
}

.prompt-pencil {
    font-family: 'Caveat', cursive;
    font-size: 1rem;
    color: var(--ink);
    opacity: 0.4;
}

/* === Club Door / Membership Card === */
#club-door {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--machine-bg);
    padding: 2rem;
}

.membership-card {
    display: flex;
    max-width: 600px;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

.membership-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.card-machine-half {
    flex: 1;
    background: var(--machine-bg);
    padding: 2.5rem 2rem;
    border: 1px solid rgba(51,255,51,0.2);
    border-right: none;
    border-radius: 12px 0 0 12px;
}

.card-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--phosphor);
    opacity: 0.6;
    text-shadow: 0 0 5px rgba(51,255,51,0.3);
    margin-bottom: 1rem;
}

.card-id {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: var(--phosphor);
    text-shadow: 0 0 8px rgba(51,255,51,0.4);
    margin-bottom: 0.5rem;
}

.card-class {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: var(--phosphor);
    text-shadow: 0 0 8px rgba(51,255,51,0.4);
    margin-bottom: 0.25rem;
}

.card-status {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.5rem;
    color: var(--amber);
    text-shadow: 0 0 12px rgba(255,170,0,0.5);
}

.card-divider {
    width: 2px;
    background: linear-gradient(to bottom, var(--phosphor), var(--human-bg));
}

.card-human-half {
    flex: 1;
    background: var(--human-bg);
    padding: 2.5rem 2rem;
    border-radius: 0 12px 12px 0;
    position: relative;
}

.card-welcome {
    font-family: 'Caveat', cursive;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.8rem;
}

.card-note {
    font-family: 'Caveat', cursive;
    font-size: 1rem;
    color: var(--ink);
    line-height: 1.5;
    opacity: 0.7;
}

.card-smiley {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    font-family: 'Caveat', cursive;
    font-size: 2rem;
    color: var(--ink);
    opacity: 0.3;
}

.club-domain {
    font-family: 'Bungee', cursive;
    font-size: 1rem;
    background: linear-gradient(90deg, var(--phosphor) 50%, var(--human-bg) 50%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-top: 2rem;
    opacity: 0.6;
}

/* === Responsive === */
@media (max-width: 768px) {
    .split-section {
        flex-direction: column;
    }

    .panel {
        padding: 3rem 2rem;
        min-height: 50vh;
    }

    .divider {
        width: 100%;
        height: 2px;
    }

    .divider-crisp {
        background: rgba(51,255,51,0.4);
    }

    .title-half {
        position: relative;
        bottom: auto;
        right: auto;
        left: auto;
        font-size: 2rem;
        margin-top: 2rem;
    }

    .title-machine {
        text-align: left;
    }

    .membership-card {
        flex-direction: column;
    }

    .card-machine-half {
        border-radius: 12px 12px 0 0;
        border-right: 1px solid rgba(51,255,51,0.2);
        border-bottom: none;
    }

    .card-human-half {
        border-radius: 0 0 12px 12px;
    }

    .card-divider {
        width: 100%;
        height: 2px;
    }

    #prompt-bar {
        display: none;
    }

    .captcha-grid {
        max-width: 200px;
    }

    .captcha-cell {
        width: 66px;
        height: 66px;
    }
}

/* Padding for fixed prompt bar */
body {
    padding-bottom: 40px;
}
