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

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 2rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

nav {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 0;
    margin: 0;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    display: block;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    background: #f5f5f5;
    color: #667eea;
}

nav ul li a.active {
    background: #667eea;
    color: white;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feature-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    background: #f8f9ff;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card h2 {
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.feature-card p {
    margin-bottom: 1rem;
    color: #666;
}

button {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

button:hover {
    background: #5a6fd8;
}

.content-section {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    min-height: 400px;
}

.content-section h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.content-section p {
    margin-bottom: 1rem;
}

.vocabulary-container,
.grammar-container,
.text-container,
.translation-container {
    display: none;
}

.active {
    display: block;
}

.word-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid #667eea;
}

.word-card h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.word-card .meaning {
    font-weight: bold;
    margin: 0.5rem 0;
}

.word-card .example {
    font-style: italic;
    color: #666;
}

.grammar-exercise {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.grammar-exercise h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.grammar-exercise .question {
    margin-bottom: 1rem;
}

.grammar-exercise .options {
    margin-left: 1rem;
}

.grammar-exercise .option {
    margin-bottom: 0.5rem;
}

.text-paragraph {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.text-paragraph .original {
    margin-bottom: 0.5rem;
}

.text-paragraph .translation {
    color: #666;
    font-style: italic;
}

.translation-exercise {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.translation-exercise h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.translation-exercise .source-text {
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
}

.translation-exercise textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 1rem;
}

.check-btn {
    background: #4CAF50;
}

.check-btn:hover {
    background: #45a049;
}

.result {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
    font-weight: bold;
}

.correct {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.incorrect {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .content-section {
        padding: 1.5rem;
    }
}