* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.encouragement {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #6366f1;
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1000;
}

body {
    background: linear-gradient(135deg, #f0f4f8 0%, #d9e2ec 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #2d3748;
    padding-top: 80px;
    font-size: 16px;
    line-height: 1.5;
}

.container {
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    padding: 30px;
    width: 90%;
    max-width: 600px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #2d3748;
    margin-bottom: 30px;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.mode-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

button {
    background-color: #6366f1;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s;
}

button:hover {
    background-color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

button:hover:before {
    left: 100%;
}

button:active {
    transform: translateY(0);
}

.word-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.word-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.word {
    font-size: 36px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
}

.definition {
    font-size: 18px;
    color: #666;
    line-height: 1.6;
}

.navigation {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
}

.typing-area {
    margin: 20px 0;
}

input[type="text"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 18px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    background-color: #ffffff;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

input[type="text"]:focus {
    border-color: #6366f1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.feedback {
    font-size: 16px;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
}

.correct {
    background-color: #d4edda;
    color: #155724;
}

.incorrect {
    background-color: #f8d7da;
    color: #721c24;
}

.progress {
    margin-top: 20px;
    font-size: 16px;
    color: #718096;
    background-color: #edf2f7;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress span {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 4px;
    transition: width 0.5s ease;
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
    }
    .word {
        font-size: 28px;
    }
    button {
        padding: 12px 20px;
        font-size: 16px;
    }
}

#back-to-mode, #back-to-mode-typing {
    background-color: #95a5a6;
}

#back-to-mode:hover, #back-to-mode-typing:hover {
    background-color: #7f8c8d;
}

#mistakes-container h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.mistake-item {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.mistake-item:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.mistake-word {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.mistake-definition {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
    align-self: stretch;
}

.remove-mistake {
    background-color: #e74c3c;
    padding: 8px 15px;
    font-size: 14px;
    align-self: flex-end;
}

.remove-mistake:hover {
    background-color: #c0392b;
}

.no-mistakes {
    color: #7f8c8d;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

#clear-mistakes {
    background-color: #e74c3c;
}

#clear-mistakes:hover {
    background-color: #c0392b;
}

#back-to-mode-mistakes {
    background-color: #95a5a6;
}

#back-to-mode-mistakes:hover {
    background-color: #7f8c8d;
}