:root {
    --green: #35ff69;
    --green-dim: #18a83f;
    --green-dark: #092a12;
    --black: #020502;
    --panel: rgba(4, 18, 7, .88);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    background: #000;
    color: var(--green);
    font-family: "Courier New", Consolas, monospace;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.crt {
    width: min(1200px, 100%);
    min-height: min(850px, calc(100vh - 48px));
    position: relative;
    overflow: hidden;
    border: 2px solid var(--green-dim);
    background:
        radial-gradient(circle at center, rgba(30,120,45,.12), transparent 60%),
        #010401;
    box-shadow: 0 0 35px rgba(53,255,105,.14), inset 0 0 70px rgba(53,255,105,.05);
    border-radius: 10px;
}

.crt::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(rgba(255,255,255,.025) 50%, rgba(0,0,0,.08) 50%);
    background-size: 100% 4px;
    opacity: .45;
    z-index: 5;
}

.scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 6;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 3px,
        rgba(53,255,105,.025) 4px
    );
}

.login-screen, .portal {
    position: relative;
    z-index: 2;
}

.login-screen {
    min-height: min(850px, calc(100vh - 48px));
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dos-header {
    border: 1px solid var(--green-dim);
    padding: 10px 14px;
    background: var(--green-dark);
    text-align: center;
    letter-spacing: 2px;
}

.ascii-logo {
    margin: 30px auto 10px;
    max-width: 100%;
    overflow: hidden;
    text-align: center;
    text-shadow: 0 0 8px rgba(53,255,105,.7);
}

.ascii-logo pre {
    font-size: clamp(5px, 1vw, 12px);
    line-height: 1.05;
    display: inline-block;
    text-align: left;
}

.boot-text {
    line-height: 1.7;
    margin: 20px 0;
}

.terminal-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.prompt { font-weight: bold; }

input[type=password] {
    flex: 1;
    min-width: 220px;
    background: #000;
    color: var(--green);
    border: 1px solid var(--green-dim);
    padding: 12px;
    outline: none;
    font: inherit;
    caret-color: var(--green);
}

input[type=password]:focus {
    box-shadow: 0 0 12px rgba(53,255,105,.2);
}

button, .logout {
    font: inherit;
    color: var(--green);
    background: var(--green-dark);
    border: 1px solid var(--green);
    padding: 11px 16px;
    cursor: pointer;
    text-decoration: none;
}

button:hover, .logout:hover {
    background: var(--green);
    color: #000;
}

.error {
    margin-top: 18px;
    border: 1px solid #ff5555;
    color: #ff5555;
    padding: 10px;
    animation: blink .8s steps(2) infinite;
}

.footer-line {
    margin-top: 42px;
    text-align: center;
    color: var(--green-dim);
    font-size: 12px;
}

.portal {
    padding: 28px;
}

.portal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--green-dim);
    padding-bottom: 22px;
}

.eyebrow {
    color: var(--green-dim);
    font-size: 12px;
    margin-bottom: 6px;
}

h1, h2, p { margin-top: 0; }

h1 {
    margin-bottom: 4px;
    font-size: clamp(22px, 4vw, 40px);
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(53,255,105,.45);
}

.subtitle { font-size: 13px; }

.system-bar {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    padding: 13px 0;
    color: var(--green-dim);
    border-bottom: 1px dashed var(--green-dim);
    font-size: 12px;
}

.system-bar b { color: var(--green); }

.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 22px;
}

.project-card {
    color: var(--green);
    text-decoration: none;
    border: 1px solid var(--green-dim);
    background: var(--panel);
    padding: 18px;
    min-height: 190px;
    display: flex;
    flex-direction: column;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.project-card:hover {
    transform: translateY(-2px);
    background: rgba(15, 50, 20, .95);
    box-shadow: 0 0 20px rgba(53,255,105,.16);
}

.card-top {
    display: flex;
    justify-content: space-between;
    color: var(--green-dim);
    font-size: 12px;
}

.status { border: 1px solid var(--green-dim); padding: 3px 7px; }

.project-card h2 {
    margin: 25px 0 10px;
    font-size: 20px;
}

.project-card p {
    color: #8cffaa;
    line-height: 1.5;
    font-size: 13px;
}

.launch {
    margin-top: auto;
    padding-top: 18px;
    font-size: 12px;
}

.add-card {
    border-style: dashed;
    opacity: .8;
}

code {
    color: var(--green);
    background: #000;
    padding: 2px 5px;
}

.terminal-panel {
    margin-top: 22px;
    border: 1px solid var(--green-dim);
    background: #000;
    padding: 16px;
    line-height: 1.8;
    font-size: 12px;
}

.terminal-title {
    color: var(--green-dim);
    border-bottom: 1px dashed var(--green-dim);
    margin-bottom: 8px;
    padding-bottom: 5px;
}

.cursor { animation: blink 1s steps(2) infinite; }

footer {
    color: var(--green-dim);
    text-align: center;
    font-size: 10px;
    padding-top: 25px;
}

.blink { animation: blink 1s steps(2) infinite; }

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

@media (max-width: 650px) {
    body { padding: 8px; }
    .crt { min-height: calc(100vh - 16px); }
    .login-screen, .portal { padding: 18px; }
    .portal-header { align-items: flex-start; flex-direction: column; }
    .logout { width: 100%; text-align: center; }
}
