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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ff1493 0%, #ff4500 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 900px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 0 50px rgba(255, 20, 147, 0.5), 0 0 100px rgba(255, 69, 0, 0.3);
}

header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.back-to-games {
    position: absolute;
    left: 0;
    top: 0;
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #ff1493;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.back-to-games:hover {
    background: rgba(255, 20, 147, 0.3);
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.5);
    transform: translateX(-5px);
}

h1 {
    font-size: 48px;
    background: linear-gradient(135deg, #ff1493 0%, #ff4500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 20, 147, 0.5);
    margin-bottom: 10px;
}

.subtitle {
    color: #fff;
    font-size: 18px;
    opacity: 0.9;
}

.screen {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Level Selection */
.level-info {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid #ff1493;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.3);
}

.level-info h2 {
    color: #ff4500;
    font-size: 36px;
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(255, 69, 0, 0.5);
}

.level-description {
    color: #fff;
    font-size: 20px;
    margin-bottom: 25px;
    line-height: 1.6;
}

.level-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.stat {
    flex: 1;
    min-width: 150px;
}

.stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    display: block;
    margin-bottom: 5px;
}

.stat-value {
    color: #ff4500;
    font-size: 28px;
    font-weight: bold;
    text-shadow: 0 0 15px rgba(255, 69, 0, 0.5);
}

.start-btn {
    width: 100%;
    padding: 20px;
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(135deg, #ff1493 0%, #ff4500 100%);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(255, 20, 147, 0.5);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(255, 20, 147, 0.7), 0 0 60px rgba(255, 69, 0, 0.5);
}

.level-navigation {
    display: flex;
    gap: 15px;
}

.nav-btn {
    flex: 1;
    padding: 15px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid #ff1493;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover:not(:disabled) {
    background: rgba(255, 20, 147, 0.3);
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.5);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Typing Area */
.stats-bar {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 2px solid #ff1493;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-item .stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    display: block;
    margin-bottom: 5px;
}

.stat-item .stat-value {
    color: #ff4500;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 15px rgba(255, 69, 0, 0.5);
}

.text-display {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-to-type {
    font-size: 28px;
    line-height: 1.8;
    color: #333;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    user-select: none;
}

.text-to-type .char {
    display: inline-block;
    position: relative;
}

.text-to-type .char.correct {
    color: #00cc00;
}

.text-to-type .char.incorrect {
    color: #ff0000;
    background: rgba(255, 0, 0, 0.1);
}

.text-to-type .char.current {
    background: rgba(255, 20, 147, 0.2);
    animation: pulse 1s infinite;
}

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

.input-area {
    margin-bottom: 30px;
}

.typing-input {
    width: 100%;
    padding: 20px;
    font-size: 24px;
    font-family: 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid #ff1493;
    border-radius: 15px;
    color: white;
    outline: none;
    letter-spacing: 2px;
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.3);
}

.typing-input:focus {
    border-color: #ff4500;
    box-shadow: 0 0 30px rgba(255, 69, 0, 0.5);
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
    border: 2px solid #ff1493;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff1493 0%, #ff4500 100%);
    transition: width 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.5);
}

.back-btn {
    padding: 15px 30px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid #ff1493;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 20, 147, 0.3);
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.5);
}

/* Results Screen */
#resultsScreen h2 {
    color: #ff4500;
    font-size: 42px;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(255, 69, 0, 0.5);
}

.results-stats {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid #ff1493;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
}

.result-value {
    color: #ff4500;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 0 15px rgba(255, 69, 0, 0.5);
}

.results-message {
    text-align: center;
    color: white;
    font-size: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.results-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.result-btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 25px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid #ff1493;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.result-btn:hover {
    background: rgba(255, 20, 147, 0.3);
    box-shadow: 0 0 20px rgba(255, 20, 147, 0.5);
}

.result-btn.primary {
    background: linear-gradient(135deg, #ff1493 0%, #ff4500 100%);
    border: none;
    box-shadow: 0 0 30px rgba(255, 20, 147, 0.5);
}

.result-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(255, 20, 147, 0.7), 0 0 60px rgba(255, 69, 0, 0.5);
}


