@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

:root {
    --primary-color: #00ff00;
    --secondary-color: #ff00ff;
    --background-color: #0a0a0a;
    --text-color: #ffffff;
    --error-color: #ff0000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Share Tech Mono', monospace;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: 
        linear-gradient(rgba(0, 255, 0, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 0, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

.container {
    width: 95%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

.glitch {
    font-size: 3rem;
    font-weight: bold;
    text-transform: uppercase;
    position: relative;
    text-shadow: 0.05em 0 0 var(--secondary-color),
                -0.025em -0.05em 0 var(--primary-color),
                0.025em 0.05em 0 var(--error-color);
    animation: glitch 500ms infinite;
}

@keyframes glitch {
    0% {
        text-shadow: 0.05em 0 0 var(--secondary-color),
                    -0.025em -0.05em 0 var(--primary-color),
                    0.025em 0.05em 0 var(--error-color);
    }
    14% {
        text-shadow: 0.05em 0 0 var(--secondary-color),
                    -0.025em -0.05em 0 var(--primary-color),
                    0.025em 0.05em 0 var(--error-color);
    }
    15% {
        text-shadow: -0.05em -0.025em 0 var(--secondary-color),
                    0.025em 0.025em 0 var(--primary-color),
                    -0.05em -0.05em 0 var(--error-color);
    }
    49% {
        text-shadow: -0.05em -0.025em 0 var(--secondary-color),
                    0.025em 0.025em 0 var(--primary-color),
                    -0.05em -0.05em 0 var(--error-color);
    }
    50% {
        text-shadow: 0.025em 0.05em 0 var(--secondary-color),
                    0.05em 0 0 var(--primary-color),
                    0 -0.05em 0 var(--error-color);
    }
    99% {
        text-shadow: 0.025em 0.05em 0 var(--secondary-color),
                    0.05em 0 0 var(--primary-color),
                    0 -0.05em 0 var(--error-color);
    }
    100% {
        text-shadow: -0.025em 0 0 var(--secondary-color),
                    -0.025em -0.025em 0 var(--primary-color),
                    -0.025em -0.05em 0 var(--error-color);
    }
}

.stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    background: rgba(0, 255, 0, 0.1);
}

.label {
    font-size: 0.8rem;
    color: var(--primary-color);
}

.value {
    font-size: 1.5rem;
    font-weight: bold;
}

.type-box {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    position: relative;
    cursor: default;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 40vh;
}

.text-display {
    font-size: 2rem;
    line-height: 2.5;
    position: relative;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    justify-content: flex-start;
    align-items: center;
    padding: 0 2rem;
    max-width: 100%;
    margin: 0 auto
}

.cursor {
    position: absolute;
    width: 2px;
    height: 2.2rem;
    background-color: var(--primary-color);
    animation: cursor-blink 1s infinite;
    transition: all 0.1s ease;
    display: none;
    box-shadow: 0 0 5px var(--primary-color);
    z-index: 1;
    margin-top: -0.2rem;
}

.cursor.active {
    display: block;
}

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.control-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.mode-options {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.cyber-button {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.cyber-button:hover {
    background: var(--primary-color);
    color: var(--background-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.cyber-button.active {
    background: var(--primary-color);
    color: var(--background-color);
}

.time-options {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.custom-time {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.cyber-input {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem;
    width: 100px;
    font-size: 1rem;
    outline: none;
}

.cyber-input:focus {
    box-shadow: 0 0 5px var(--primary-color);
}

.completed {
    color: var(--primary-color);
    opacity: 0.4;
}

.remaining {
    color: var(--text-color);
    opacity: 0.25;
}

.correct {
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--primary-color);
    transition: all 0.2s ease;
}

.incorrect {
    color: var(--error-color);
    text-shadow: 0 0 5px var(--error-color);
    position: relative;
    transition: all 0.2s ease;
}

.incorrect::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--error-color);
    animation: underline-pulse 1s infinite;
    box-shadow: 0 0 5px var(--error-color);
}

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

.current {
    color: var(--text-color);
}

@keyframes cursor-blink {
    0% { background-color: rgba(255, 255, 255, 0.1); }
    50% { background-color: rgba(255, 255, 255, 0.15); }
    100% { background-color: rgba(255, 255, 255, 0.1); }
}

.extra {
    opacity: 0.5;
    text-decoration: line-through;
}