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

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #2a2a2a;
    border-radius: 8px;
    padding: 20px;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    animation: modalSlideIn 0.3s ease-out;
    text-align: center;
}

.modal-content p {
    font-size: 10px;
    line-height: 1.4;
    margin-bottom: 16px;
    color: #ffffff;
}

.modal-button {
    background-color: #00ff88;
    color: #000000;
    border: none;
    padding: 8px 16px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 255, 136, 0.3);
}

.modal-button:hover {
    background-color: #00cc6a;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 255, 136, 0.4);
}

.modal-button:active {
    transform: translateY(0);
}

/* Theme-specific modal styles */
body.pokemon-dark .modal-content {
    background-color: #2a2a2a;
    border-color: #444;
    font-family: 'Press Start 2P', monospace;
}

body.pokemon-light .modal-content {
    background-color: #f0f0f0;
    border-color: #ddd;
    font-family: 'Press Start 2P', monospace;
}

body.pokemon-light .modal-content p {
    color: #333333;
}

body.pokemon-light .modal-button {
    background-color: #00aa44;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 170, 68, 0.3);
}

body.pokemon-light .modal-button:hover {
    background-color: #008833;
    box-shadow: 0 3px 6px rgba(0, 170, 68, 0.4);
}

body.normal-dark .modal-content {
    background-color: #2a2a2a;
    border-color: #444;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

body.normal-dark .modal-button {
    background-color: #4CAF50;
    color: #000000;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

body.normal-dark .modal-button:hover {
    background-color: #45a049;
    box-shadow: 0 3px 6px rgba(76, 175, 80, 0.4);
}

body.normal-light .modal-content {
    background-color: #ffffff;
    border-color: #ddd;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

body.normal-light .modal-content p {
    color: #333333;
}

body.normal-light .modal-button {
    background-color: #2E7D32;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(46, 125, 50, 0.3);
}

body.normal-light .modal-button:hover {
    background-color: #1B5E20;
    box-shadow: 0 3px 6px rgba(46, 125, 50, 0.4);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* Base styles */
body.pokemon-dark {
    background-color: #1a1a1a;
    color: #ffffff;
    font-family: 'Press Start 2P', 'Courier New', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

body.pokemon-light {
    background-color: #f0f0f0;
    color: #333333;
    font-family: 'Press Start 2P', 'Courier New', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

body.normal-dark {
    background-color: #1a1a1a;
    color: #ffffff;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

body.normal-light {
    background-color: #ffffff;
    color: #333333;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.theme-selector {
    position: fixed;
    top: 20px;
    left: 20px;
}

.theme-selector select {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    outline: none;
}

body.pokemon-dark .theme-selector select {
    background-color: #333;
    color: #fff;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
}

body.pokemon-light .theme-selector select {
    background-color: #ddd;
    color: #333;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
}

body.normal-dark .theme-selector select {
    background-color: #333;
    color: #fff;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

body.normal-light .theme-selector select {
    background-color: #f5f5f5;
    color: #333;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    border: 1px solid #ccc;
}

.typing-line {
    line-height: 1.5;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

body.pokemon-dark .typing-line,
body.pokemon-light .typing-line {
    font-size: 32px;
    letter-spacing: 2px;
}

body.normal-dark .typing-line,
body.normal-light .typing-line {
    font-size: 28px;
    letter-spacing: 1px;
}

.char {
    transition: opacity 0.2s ease, color 0.2s ease;
}

body.pokemon-dark .char.untyped {
    opacity: 0.3;
    color: #666;
}

body.pokemon-light .char.untyped {
    opacity: 0.3;
    color: #999;
}

body.normal-dark .char.untyped {
    opacity: 0.4;
    color: #666;
}

body.normal-light .char.untyped {
    opacity: 0.4;
    color: #aaa;
}

body.pokemon-dark .char.typed {
    opacity: 1;
    color: #00ff88;
    text-shadow: 0 0 5px #00ff88;
}

body.pokemon-light .char.typed {
    opacity: 1;
    color: #00aa44;
    font-weight: bold;
}

body.normal-dark .char.typed {
    opacity: 1;
    color: #4CAF50;
}

body.normal-light .char.typed {
    opacity: 1;
    color: #2E7D32;
    font-weight: 500;
}

body.pokemon-dark .char.current {
    opacity: 1;
    color: #ffff00;
    background-color: #333;
    animation: pulse 1s infinite;
}

body.pokemon-light .char.current {
    opacity: 1;
    color: #ff6600;
    background-color: #fff3cd;
    animation: pulse-light 1s infinite;
}

body.normal-dark .char.current {
    opacity: 1;
    color: #FFC107;
    background-color: #333;
    animation: pulse 1s infinite;
}

body.normal-light .char.current {
    opacity: 1;
    color: #F57C00;
    background-color: #fff3e0;
    animation: pulse-light 1s infinite;
}

body.pokemon-dark .char.error {
    opacity: 1;
    color: #ff4444;
    background-color: #441111;
}

body.pokemon-light .char.error {
    opacity: 1;
    color: #d32f2f;
    background-color: #ffebee;
}

body.normal-dark .char.error {
    opacity: 1;
    color: #f44336;
    background-color: #441111;
}

body.normal-light .char.error {
    opacity: 1;
    color: #d32f2f;
    background-color: #ffebee;
}

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

@keyframes pulse {
    0%, 100% { background-color: #333; }
    50% { background-color: #555; }
}

@keyframes pulse-light {
    0%, 100% { background-color: #fff3cd; }
    50% { background-color: #ffeaa7; }
}

.word-transition {
    animation: slideIn 0.3s ease-out;
}

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