/* --- VARIABLES & RESET --- */
:root {
    --primary-color: #33FF33;
    --accent-color: #99FF99;
    --bg-color: #000000;
    --glow-color: rgba(51, 255, 51, 0.75);
    --strong-glow: 0 0 10px var(--primary-color);
    --soft-glow: 0 0 5px var(--glow-color);
}
* { box-sizing: border-box; margin: 0; padding: 0; }

/* --- POWER-ON ANIMATION --- */
#power-on {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: var(--bg-color); z-index: 100;
    animation: power-on-single-flash 1.2s forwards;
}
@keyframes power-on-single-flash {
    0% { transform: scaleY(0.005); }
    70% { transform: scaleY(0.005); }
    100% { transform: scaleY(1); visibility: hidden; }
}

/* --- CRT & GLOBAL STYLES --- */
body {
    background-color: var(--bg-color); color: var(--primary-color);
    font-family: 'IBM Plex Sans Arabic', monospace; font-size: 1.2rem; line-height: 1.6;
    text-shadow: var(--soft-glow); overflow-x: hidden; direction: rtl; text-align: right;
}
#terminal { opacity: 0; transition: opacity 0.5s ease-in; }
#terminal.loaded { opacity: 1; }
#crt-container {
    width: 100%; min-height: 100vh; padding: 2rem; position: relative;
    transform: perspective(1000px) rotateX(1deg); animation: flicker 0.15s infinite;
}
#crt-container::before {
    content: ' '; display: block; position: fixed; top: 0; left: 0; bottom: 0; right: 0;
    background: repeating-linear-gradient(rgba(18, 16, 16, 0) 0px, rgba(0, 0, 0, 0.4) 1px, rgba(0, 0, 0, 0.4) 2px, rgba(18, 16, 16, 0) 3px);
    z-index: 2; pointer-events: none; box-shadow: inset 0 0 150px rgba(0,0,0,0.75);
}

/* --- TYPOGRAPHY & LAYOUT --- */
.hidden { display: none; }
section { margin-bottom: 2rem; }
p, h1, li, label, a, button { word-wrap: break-word; }
a { color: var(--accent-color); text-decoration: none; font-weight: bold; }
a:hover, button:hover { background-color: var(--primary-color); color: var(--bg-color); text-shadow: none; cursor: pointer; }
#brand-logo { color: var(--primary-color); text-shadow: var(--strong-glow); font-size: 1.5rem; font-weight: bold; margin: 1.5rem 0; }
ul { list-style: none; }
.success-text { color: var(--accent-color); text-shadow: var(--strong-glow); font-weight: bold; }

.system-note {
    color: var(--accent-color); font-style: italic; font-size: 1rem;
    border: 1px dashed rgba(153, 255, 153, 0.4); padding: 0.5rem 1rem;
    margin-top: 1.5rem; margin-bottom: 2rem; background-color: rgba(51, 255, 51, 0.05);
}

/* --- CURSOR --- */
.cursor { animation: blink 1s step-end infinite; background-color: var(--primary-color); display: inline-block; width: 1ch; height: 1.2rem; box-shadow: var(--strong-glow); margin-right: 4px; margin-left: 0; }

/* --- FORM STYLING (UPDATED) --- */
#form-section { margin-top: 3rem; }
.form-title { font-weight: bold; font-size: 1.5rem; text-shadow: var(--strong-glow); }
.form-subtitle { font-size: 1rem; color: var(--accent-color); margin-bottom: 1.5rem; }
.form-line { display: flex; align-items: flex-start; /* Changed to align-items: flex-start for textarea label */ margin-bottom: 1rem; }
.form-line label { min-width: 120px; padding-top: 5px; /* Aligns label with first line of textarea */ }
/* UPDATED SELECTOR TO INCLUDE TEXTAREA */
.form-line input, .form-line textarea {
    background: transparent; border: 1px dashed rgba(153, 255, 153, 0.4);
    padding: 5px 10px; color: var(--primary-color);
    font-family: inherit; font-size: inherit; flex-grow: 1;
    text-shadow: var(--soft-glow); outline: none; transition: border-color 0.3s, box-shadow 0.3s;
    direction: rtl; text-align: right;
    resize: vertical; /* Allow vertical resize, but not horizontal */
}
/* UPDATED SELECTOR TO INCLUDE TEXTAREA */
.form-line input:focus, .form-line textarea:focus {
    border-color: var(--accent-color); box-shadow: 0 0 5px rgba(153, 255, 153, 0.5);
}
.form-line input::placeholder { color: rgba(153, 255, 153, 0.4); }
.submit-btn {
    background: transparent; border: 1px solid var(--primary-color);
    color: var(--primary-color); font-family: inherit; font-size: inherit;
    padding: 10px 20px; margin-top: 1rem; text-shadow: var(--soft-glow); font-weight: bold;
}

/* --- ANIMATIONS --- */
@keyframes blink { from, to { background-color: transparent; box-shadow: none; } 50% { background-color: var(--primary-color); box-shadow: var(--strong-glow); } }
@keyframes flicker { 0%, 100% { opacity: 1; text-shadow: var(--soft-glow); } 50.0% { opacity: 0.95; text-shadow: var(--strong-glow); } 50.2% { opacity: 1; text-shadow: var(--soft-glow); } 50.4% { opacity: 0.8; text-shadow: none; } 50.6% { opacity: 1; text-shadow: var(--soft-glow); } }

/* --- RESPONSIVENESS --- */
@media (max-width: 768px) {
    body { font-size: 1rem; }
    #crt-container { padding: 1rem; transform: none; }
    .form-line { flex-direction: column; align-items: flex-start; }
    .form-line label { min-width: auto; margin-bottom: 0.5rem; padding-top: 0; }
    .form-line input, .form-line textarea { width: 100%; }
}