* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'JetBrains Mono', monospace;
    background: #0a0a0f;
    color: #c8e6c9;
    overflow: hidden;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.5), transparent),
        radial-gradient(2px 2px at 250px 120px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 300px 20px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 500px 200px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 650px 100px, rgba(255,255,255,0.5), transparent),
        radial-gradient(2px 2px at 800px 300px, rgba(255,255,255,0.3), transparent);
    background-repeat: repeat;
    background-size: 900px 350px;
    opacity: 0.35;
    z-index: 0;
    animation: drift 120s linear infinite;
}

@keyframes drift {
    from { background-position: 0 0; }
    to { background-position: 900px 350px; }
}

.terminal {
    position: relative;
    z-index: 1;
    width: min(640px, 92vw);
    background: #12121a;
    border: 1px solid #2a2a35;
    border-radius: 12px;
    box-shadow:
        0 0 40px rgba(76, 175, 80, 0.08),
        0 25px 50px -12px rgba(0, 0, 0, 0.7);
    overflow: hidden;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #1a1a22;
    border-bottom: 1px solid #2a2a35;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.title {
    margin-left: auto;
    color: #888899;
    font-size: 13px;
    letter-spacing: 0.08em;
}

.terminal-body {
    padding: 36px 32px;
}

.intro {
    margin-bottom: 28px;
}

.line {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.6;
}

.prompt {
    margin-top: 20px;
    color: #81c784;
}

.prompt::before {
    content: "$ ";
    color: #4caf50;
}

.accent {
    color: #4caf50;
    font-weight: 700;
}

.knock-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #0d0d12;
    border: 1px solid #2a2a35;
    border-radius: 8px;
    padding: 0 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrap:focus-within {
    border-color: #4caf50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.15);
}

.cursor-prefix {
    color: #4caf50;
    font-size: 16px;
    font-weight: 700;
}

.knock-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #e8f5e9;
    font-family: inherit;
    font-size: 15px;
    padding: 14px 0;
}

.knock-input::placeholder {
    color: #5a5a6a;
}

.knock-btn {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: #e8f5e9;
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
}

.knock-btn:hover {
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.25);
    transform: translateY(-1px);
}

.knock-btn:active {
    transform: translateY(0);
}

.error {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 12px 16px;
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 8px;
    color: #ef5350;
    font-size: 14px;
}

.error-icon {
    font-weight: 700;
}

@media (max-width: 480px) {
    .terminal-body {
        padding: 26px 20px;
    }
    .title {
        display: none;
    }
}
