:root {
    --bg-color: #1a1a1a;
    --text-color: white;
    --accent-color: rgb(59, 130, 246);
    --container-bg-color: #2a2a2a;
    --input-bg-color: #2a2a2a;
    --button-hover-color: rgb(59, 130, 246);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 24px;
    font-weight: 400;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Courier New', Courier, monospace;
    padding: 20px;
    transition: background-color 0.5s, background-image 0.5s;
}
.typewriter-container {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    border: 2px solid var(--accent-color);
    padding: 20px;
    border-radius: 10px;
    background-color: var(--container-bg-color);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
    width: 600px;
    height: 60px;
    font-size: 50px;
}
.text {
    position: relative;
    color: var(--accent-color);
    margin-left: 10px; 
}

.cursor {
    display: inline-block;
    background-color: var(--accent-color);
    width: 5px;
    height: 1em;
    margin-left: 2px;
    animation: blink 1s infinite;
}
@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}
.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 400px;
}
.controls input[type="text"], .controls input[type="range"], .controls button {
    width: 100%;
    margin: 5px;
    padding: 10px;
    font-size: 16px;
    border-radius: 5px;
    border: 2px solid var(--accent-color);
    background-color: var(--input-bg-color);
    color: var(--text-color);
    transition: all 0.3s ease;
}
.controls button:hover {
    background-color: var(--button-hover-color);
    color: white;
    cursor: pointer;
}
.controls input[type="range"] {
    appearance: none;
    height: 5px;
    background: #ddd;
    outline: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.controls input[type="range"]:hover {
    opacity: 1;
}
.controls input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 15px;
    height: 15px;
    background: var(--accent-color);
    cursor: pointer;
    border-radius: 50%;
}
body.light-theme {
    --bg-color: #ffffff;
    --text-color: #000000;
    --accent-color: #3b82f6;
    --container-bg-color: #f0f0f0;
    --input-bg-color: #e0e0e0;
    --button-hover-color: #1e3a8a;
}
