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

body {
    font-family: 'Courier New', monospace;
    background-color: #000000;
    color: #00ff41;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Matrix rain background */
#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.3;
}

.container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 30px;
    border: 1px solid #00ff41;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

h1 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    margin-bottom: 10px;
    color: #00ff41;
    text-shadow: 0 0 10px #00ff41, 0 0 20px #00ff41;
    animation: glitch 3s infinite;
}

@keyframes glitch {
    0%, 90%, 100% { transform: translate(0); }
    91% { transform: translate(-2px, 2px); }
    92% { transform: translate(2px, -2px); }
    93% { transform: translate(0); }
}

.prompt {
    color: #00ff41;
    margin-bottom: 30px;
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    opacity: 0.8;
}

ul {
    list-style: none;
    padding: 0;
}

li {
    margin: 20px 0;
    padding-left: 25px;
    position: relative;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

li:nth-child(1) { animation-delay: 0.1s; }
li:nth-child(2) { animation-delay: 0.2s; }
li:nth-child(3) { animation-delay: 0.3s; }

li::before {
    content: ">";
    position: absolute;
    left: 0;
    color: #00ff41;
    font-weight: bold;
    font-size: 1.2em;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

a {
    color: #00ff41;
    text-decoration: none;
    font-size: clamp(1rem, 4vw, 1.3rem);
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    text-shadow: 0 0 5px #00ff41;
}

a::before {
    content: '[';
    margin-right: 5px;
    opacity: 0;
    transition: opacity 0.3s;
}

a::after {
    content: ']';
    margin-left: 5px;
    opacity: 0;
    transition: opacity 0.3s;
}

a:hover::before,
a:hover::after {
    opacity: 1;
}

a:hover,
a.selected {
    color: #ffffff;
    text-shadow: 0 0 10px #00ff41, 0 0 20px #00ff41, 0 0 30px #00ff41;
    transform: translateX(5px);
    letter-spacing: 2px;
}

a.selected::before,
a.selected::after {
    opacity: 1;
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 20px;
    background-color: #00ff41;
    animation: blink 1s infinite;
    margin-left: 5px;
    box-shadow: 0 0 5px #00ff41;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

footer {
    margin-top: auto;
    padding-top: 40px;
    font-size: clamp(0.75rem, 2.5vw, 0.9rem);
    color: #00ff41;
    opacity: 0.5;
    text-align: center;
}

/* Mobile optimizations */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 20px;
    }

    li {
        margin: 25px 0;
    }

    a {
        word-break: break-word;
    }
}

/* Touch device improvements */
@media (hover: none) {
    a:active {
        color: #ffffff;
        transform: translateX(5px);
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}