body {
    background-color: #0d0d0d;
    color: #00ff00;
    font-family: 'Roboto Mono', monospace;
    padding: 20px;
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    overflow: hidden;
}

#terminal {
    width: 100%;
    height: 90vh;
    background-color: #000000;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%230d0d0d' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
    padding: 30px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 2px solid #00ff00;
    box-sizing: border-box;
    border-radius: 5px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.5);
    background-image: linear-gradient(to bottom, #0d0d0d, #000000);
    position: relative;
    animation: scanLine 5s infinite;
}

@keyframes scanLine {
    0% { box-shadow: inset 0 -2px 10px rgba(0, 255, 0, 0.1); }
    50% { box-shadow: inset 0 0 10px rgba(0, 255, 0, 0.2); }
    100% { box-shadow: inset 0 2px 10px rgba(0, 255, 0, 0.1); }
}

#input-line {
    display: flex;
    align-items: center;
    height: 20px;
    margin-top: 10px;
    position: relative;
}

#input-line span {
    color: var(--prompt-color, #00ffff);
    margin-right: 10px;
    white-space: nowrap;
}

#input {
    background-color: transparent;
    color: var(--text-color, #00ff00);
    border: none;
    outline: none;
    width: 100%;
    font-family: 'Roboto Mono', monospace;
    caret-color: var(--text-color, #00ff00);
    flex-grow: 1;
    padding: 0;
}

#input:focus {
    box-shadow: 0 0 3px var(--link-color, #00ffff);
    border: 1px solid var(--link-color, #00ffff);
}

.input-placeholder {
    height: 20px;
    visibility: hidden;
}

.security-animation {
    color: white;
    animation: scan-multi 3s ease-in-out infinite, fadeIn 1s ease-in;
    opacity: 0;
    animation-fill-mode: forwards;
}

@keyframes scan-multi {
    0% { text-shadow: 0px 0px 5px var(--text-color, #00ff00); }
    25% { text-shadow: 0px 0px 10px #ff8c00; }
    50% { text-shadow: 0px 0px 5px var(--link-color, #00ffff); }
    75% { text-shadow: 0px 0px 10px #ff00ff; }
    100% { text-shadow: 0px 0px 5px var(--text-color, #00ff00); }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes glitch {
    2%, 64% { transform: translate(2px, 0) skew(0deg); }
    4%, 60% { transform: translate(-2px, 0) skew(0deg); }
    62% { transform: translate(0, 0) skew(5deg); }
}

@keyframes shake {
    0% { transform: translate(0, 0); }
    10% { transform: translate(-5px, 0); }
    20% { transform: translate(5px, 0); }
    30% { transform: translate(-5px, 0); }
    40% { transform: translate(5px, 0); }
    50% { transform: translate(-5px, 0); }
    60% { transform: translate(5px, 0); }
    70% { transform: translate(-5px, 0); }
    80% { transform: translate(5px, 0); }
    90% { transform: translate(-5px, 0); }
    100% { transform: translate(0, 0); }
}

.shake {
    animation: shake 0.5s, glitch 0.5s; /* Combine shake and glitch */
    animation-iteration-count: 4; /* 4 iterations × 0.5s = 2 seconds */
}

.shake-constant {
    animation: shake 0.5s infinite, glitch 0.5s infinite; /* Infinite shake and glitch */
}

a {
    color: var(--link-color, #00ffff);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    text-decoration: underline;
    color: var(--link-hover-color, #00ff00);
}

#output p {
    margin-bottom: 15px;
}

#output hr {
    border: none;
    border-top: 1px solid var(--text-color, #00ff00);
    margin: 15px 0;
}

#output ul li {
    line-height: 1.5;
}

#output .error {
    color: var(--error-color, #ffff00);
}

#welcome {
    font-size: 16px;
    color: var(--text-color, #00ff00);
    margin-bottom: 10px;
}

#output .help-command {
    color: white;
}

.typed-cursor {
    display: none;
}

#output > ul:first-of-type {
    color: white;
}

#output > ul:first-of-type > li {
    color: var(--text-color, #00ff00);
}

/* Custom Scrollbar */
#terminal::-webkit-scrollbar {
    width: 10px;
}

#terminal::-webkit-scrollbar-track {
    background: #000;
}

#terminal::-webkit-scrollbar-thumb {
    background: var(--text-color, #00ff00);
    border-radius: 5px;
}

/* Keyboard Spacer for Mobile */
#keyboard-spacer {
    height: 0;
    transition: height 0.2s ease;
}

@media (max-width: 768px) {
    body { padding: 1rem; }
    #terminal { padding: 1rem; font-size: 0.9rem; }
}