html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: auto;
}

body {
    background-color: black;
    color: white;
    font-family: monospace;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100vw;
    height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background-color: black;
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200"%3E%3Ctext x="50%25" y="50%25" font-size="40" text-anchor="middle" fill="white" dominant-baseline="middle" font-family="monospace" transform="rotate(45 100 100)"%3E(◣_◢)%3C/text%3E%3C/svg%3E');
    background-size: 150px 150px;
    background-repeat: repeat;
    filter: blur(4px);
    z-index: -1;
    animation: scrollBackground 100s linear infinite;
}

@keyframes scrollBackground {
    from {
        transform: translate(-1%, -1%);
    }
    to {
        transform: translate(-50%, -50%);
    }
}

input {
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #6b6b6b;
    background-color: #333;
    color: white;
    font-size: 1em;
    opacity: 0.7;
    width: 90%;
    max-width: 400px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    input {
        width: 80%;
    }
}

@media (max-width: 480px) {
    input {
        width: 70%;
    }
}

#quotes {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
    white-space: pre-wrap;
}

.quote-container {
    margin: 10px 0;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid #444;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
    width: 100%;
    text-align: center;
    word-wrap: break-word;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.quote-container:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

#quote-counter {
    font-size: 1em;
    margin-bottom: 20px;
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
    border: 1px solid #444;
}

a {
    text-decoration: none;
}

.glitch {
    position: relative;
    font-size: calc(0.4vw + 0.4vh);
    color: #fff;
    overflow: hidden;
    letter-spacing: 1px;
    line-height: 1.2;
    text-shadow: 
        0 0 5px rgba(255,255,255,0.7),
        0 0 10px rgba(255,255,255,0.5),
        0 0 15px rgba(255,255,255,0.3);
    animation: glitch-anim 0.7s infinite, color-change 0.7s infinite alternate-reverse;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    color: #fff;
    z-index: 1;
}

.glitch::before {
    animation: glitch-anim-before 0.7s infinite, color-change 0.7s infinite alternate-reverse;
}

.glitch::after {
    animation: glitch-anim-after 0.7s infinite, color-change 0.7s infinite alternate-reverse;
    z-index: 2;
}

@keyframes glitch-anim {
    0% { transform: translate(0, 0); }
    20% { transform: translate(-5px, -5px); }
    40% { transform: translate(5px, 5px); }
    60% { transform: translate(-5px, 5px); }
    80% { transform: translate(5px, -5px); }
    100% { transform: translate(0, 0); }
}

@keyframes glitch-anim-before {
    0% { clip: rect(0, 100%, 0, 0); }
    20% { clip: rect(0, 100%, 20%, 0); }
    40% { clip: rect(20%, 100%, 40%, 0); }
    60% { clip: rect(40%, 100%, 60%, 0); }
    80% { clip: rect(60%, 100%, 80%, 0); }
    100% { clip: rect(0, 100%, 0, 0); }
}

@keyframes glitch-anim-after {
    0% { clip: rect(0, 0, 0, 0); }
    20% { clip: rect(0, 100%, 20%, 0); }
    40% { clip: rect(20%, 100%, 40%, 0); }
    60% { clip: rect(40%, 100%, 60%, 0); }
    80% { clip: rect(60%, 100%, 80%, 0); }
    100% { clip: rect(0, 100%, 0, 0); }
}

@keyframes color-change {
    0% { color: #fff; }
    25% { color: rgb(163, 163, 163); }
    50% { color: rgb(163, 163, 163); }
    100% { color: #fff; }
}

.ascii-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 10px;
    box-sizing: border-box;
    overflow: hidden;
}

#ascii-art {
    font-size: 0.5vw;
    line-height: 1.2;
    white-space: pre;
    text-align: center;
    transform-origin: center;
    transform: scale(1);
}

@media (max-width: 1200px) {
    #ascii-art {
        font-size: 0.6vw;
    }
}

@media (max-width: 992px) {
    #ascii-art {
        font-size: 0.7vw;
    }
}

@media (max-width: 768px) {
    #ascii-art {
        font-size: 0.9vw;
    }
}

@media (max-width: 576px) {
    #ascii-art {
        font-size: 1.2vw;
    }
}

@media (max-width: 400px) {
    #ascii-art {
        font-size: 1.5vw;
    }
}
