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

:root {
    --green: #4ade80;
    --green-dim: #22c55e;
    --green-glow: rgba(74,222,128,0.1);
    --green-muted: #166534;
    --gray: #aaa;
    --gray-dim: #666;
    --bg: #0c0c0c;
}

body {
    font-family: 'Gugi', cursive;
    background: var(--bg);
    color: var(--gray);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* CRT scanline */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.1) 2px, rgba(0,0,0,0.1) 4px);
    pointer-events: none;
    z-index: 200;
}

a { color: inherit; text-decoration: none; }

/* ── HEADER ── */
header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 210;
    padding: 1.1rem 1.5rem;
    background: rgba(12,12,12,0.95);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    font-size: 1.2rem;
    text-decoration: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.header-logo .w { color: var(--green); text-shadow: 0 0 8px var(--green-glow); }
.header-logo .site { color: #ccc; }
.header-logo, .header-back, .header-status { transition: opacity 0.4s; }

.header-back {
    font-size: 0.75rem;
    color: var(--gray-dim);
    text-decoration: none;
    width: 80px;
    transition: color 0.2s;
}

.header-back:hover { color: var(--green); }

.header-status {
    font-size: 0.7rem;
    color: var(--gray-dim);
    letter-spacing: 0.1em;
    width: 80px;
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.toggle {
    position: relative;
    width: 28px;
    height: 14px;
    background: #333;
    border-radius: 7px;
    display: inline-block;
    vertical-align: middle;
    transition: background 0.4s;
}

.toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    background: #555;
    border-radius: 50%;
    transition: all 0.4s;
}

.toggle.on { background: var(--green-muted); }
.toggle.on::after { left: 16px; background: var(--green); box-shadow: 0 0 6px var(--green-glow); }

/* ── FOOTER ── */
footer {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 210;
    padding: 0.8rem 1.5rem;
    text-align: center;
    font-size: 0.72rem;
    color: var(--gray-dim);
    letter-spacing: 0.08em;
    background: rgba(12,12,12,0.95);
    border-top: 1px solid rgba(255,255,255,0.06);
}

footer a { color: inherit; text-decoration: none; }

/* ── CODE RAIN ── */
.code-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    overflow: hidden;
    opacity: 0.18;
}

.code-col {
    position: absolute;
    top: 0;
    font-family: 'Nanum Gothic Coding', monospace;
    font-size: 12px;
    line-height: 2.2;
    color: var(--green-dim);
    white-space: pre;
    animation: rain linear infinite;
}

@keyframes rain {
    from { transform: translateY(-100%); }
    to { transform: translateY(100vh); }
}

/* ── MAIN ── */
.main {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem;
}

/* ── TERMINAL WINDOW ── */
.term-window {
    background: rgba(30,30,30,0.95);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.term-titlebar {
    background: #2a2a2a;
    padding: 0.6rem 0.8rem;
    display: flex;
    align-items: center;
}

.term-btns { display: flex; gap: 8px; }

.term-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
}

.term-btn.close { background: #ff5f56; }
.term-btn.min { background: #ffbd2e; }
.term-btn.max { background: #27c93f; }

.term-title {
    flex: 1;
    text-align: center;
    font-size: 0.75rem;
    color: #666;
}

.term-body {
    padding: 1.2rem;
    background: #000;
    font-size: 0.85rem;
    line-height: 1.9;
    color: var(--gray);
}

.cursor-block {
    display: inline-block;
    width: 8px;
    height: 1em;
    background: var(--gray);
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

/* ── INDEX PAGE ── */
.page-index::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.6) 100%);
    pointer-events: none;
    z-index: 199;
}

.page-index { --green: #00ff41; --green-dim: #00cc33; --green-glow: rgba(0,255,65,0.15); --green-muted: #1a6b2a; }

.center { text-align: center; position: relative; z-index: 1; padding: 2rem; }

.logo {
    font-size: clamp(2.5rem, 8vw, 7rem);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 30px var(--green-glow), 0 0 60px rgba(0,255,65,0.08);
}
.logo .w { color: var(--green); }
.logo .site { color: #e0e0e0; text-shadow: none; }

.sub { line-height: 2; }
.sub-kr {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: var(--green-dim);
}
.cursor {
    display: inline-block;
    width: 10px;
    height: 1.1em;
    background: var(--green);
    margin-left: 4px;
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

/* ── PROCESS PAGE ── */
.dos-window { width: 100%; max-width: 680px; }
.dos-window .term-body { min-height: 320px; }
.dos-line { opacity: 0; white-space: pre-wrap; word-break: break-all; }
.dos-line.visible { opacity: 1; }
.dos-line.dim { color: var(--gray-dim); }
.dos-line.bright { color: #fff; }
.dos-line.white { color: var(--gray); }
.dos-line.highlight { color: var(--green); }

/* ── PRICING PAGE ── */
.page-pricing .main { flex-direction: column; gap: 1.5rem; }

.page-title {
    font-size: 1.3rem;
    color: var(--green);
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    width: 100%;
    max-width: 1200px;
}

.cards .term-body {
    padding: 1rem;
    font-size: 0.78rem;
    min-height: 280px;
}

.plan-name { color: var(--green); font-size: 1.1rem; margin-bottom: 0.8rem; }
.plan-name span { color: #fff; }
.plan-line { color: var(--gray); }
.plan-line span { color: var(--gray-dim); }

.plan-divider {
    margin: 0.5rem -0.5rem;
    padding: 0 0.5rem;
    border-bottom: 1px solid #333;
    height: 0;
    font-size: 0;
    line-height: 0;
}

.plan-price { color: var(--green); font-size: 0.95rem; margin-top: 0.8rem; }

.note {
    font-size: 0.75rem;
    color: var(--gray-dim);
    text-align: center;
    line-height: 1.8;
}

.btn-contact {
    display: inline-block;
    padding: 0.6rem 2rem;
    background: var(--green);
    color: #000;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: opacity 0.2s;
}
.btn-contact:hover { opacity: 0.8; }

/* ── CONTACT PAGE ── */
.page-contact .term-window { width: 100%; max-width: 500px; }
.page-contact .term-body { padding: 1.5rem; line-height: 1.8; }

.form-title { color: var(--green); font-size: 1rem; margin-bottom: 1.2rem; }
.form-field { margin-bottom: 1rem; }
.form-field label { display: block; font-size: 0.75rem; color: var(--gray-dim); margin-bottom: 0.3rem; }
.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    background: #111;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 0.6rem 0.8rem;
    color: var(--gray);
    font-size: 0.82rem;
    outline: none;
    transition: border-color 0.2s;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus { border-color: var(--green-dim); }
.form-field textarea { resize: vertical; min-height: 100px; }
.form-field select option { background: #111; color: var(--gray); }
.form-submit {
    width: 100%;
    padding: 0.7rem;
    background: var(--green);
    color: #000;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity 0.2s;
}
.form-submit:hover { opacity: 0.8; }
.form-msg { text-align: center; margin-top: 1rem; font-size: 0.8rem; color: var(--green-dim); display: none; }

.required { color: var(--green); }

.privacy-text {
    width: 100%;
    height: 100px;
    background: #0a0a0a;
    border: 1px solid #222;
    border-radius: 4px;
    padding: 0.6rem 0.8rem;
    color: var(--gray-dim);
    font-size: 0.72rem;
    line-height: 1.6;
    resize: none;
    margin-bottom: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--gray);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    accent-color: var(--green);
}

/* ── MOBILE ── */
@media (max-width: 1024px) {
    .cards { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .cards { grid-template-columns: 1fr; max-width: 360px; }
}

@media (max-width: 640px) {
    .main { padding: 4.5rem 1rem; }
    header { padding: 1rem; }
    .header-back { width: 60px; font-size: 0.65rem; }
    .header-status { width: 60px; }
    .header-status .status-text { display: none; }
    .term-body { padding: 0.8rem; font-size: 0.78rem; }
    .page-contact .term-body { padding: 1rem; }
}
