:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #3f37c9;
    --accent: #4cc9f0;
    --success: #4ade80;
    --warning: #f59e0b;
    --danger: #ef4444;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray: #94a3b8;
}

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

body {
    background-color: #f5f9ff;
    color: var(--dark);
    padding-bottom: 80px; /* Для меню-карусели внизу */
    position: relative;
    min-height: 100vh;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.hidden {
    display: none !important;
}

/* Общие стили компонентов */
.card {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    padding: 30px;
    margin-bottom: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary), var(--accent));
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Стили для хедера */
header {
    text-align: center;
    padding: 20px 0;
}

.logo {
    font-size: 32px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 15px;
    display: inline-block;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-small {
    font-size: 24px;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.logo-small:hover {
    transform: scale(1.05);
}

.tagline {
    color: var(--gray);
    font-size: 16px;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Стили для карточек */
.card-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary);
    position: relative;
    padding-bottom: 10px;
}

.card-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    border-radius: 3px;
}

.card-description {
    margin-bottom: 25px;
    line-height: 1.6;
    color: var(--dark);
}

/* Стили для кнопок */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    border: none;
    text-align: center;
}

.primary-btn {
    background: linear-gradient(to right, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    position: relative;
    overflow: hidden;
}

.primary-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

.primary-btn:hover::before {
    left: 100%;
}

.secondary-btn {
    background-color: white;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.secondary-btn:hover {
    background-color: rgba(67, 97, 238, 0.05);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.1);
}

.btn:disabled {
    background: linear-gradient(to right, #cbd5e1, #cbd5e1);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn:disabled::before {
    display: none;
}

.start-btn {
    display: block;
    width: 100%;
    padding: 15px 25px;
    font-size: 18px;
    margin: 30px auto;
}

/* Стили для шагов алгоритма */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 25px;
    right: 25px;
    height: 3px;
    background-color: #e2e8f0;
    z-index: 1;
}

.step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
}

.step-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    color: white;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.step.active .step-circle {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(67, 97, 238, 0.5);
}

.step.completed .step-circle {
    background-color: var(--success);
}

.step-label {
    margin-top: 8px;
    font-size: 12px;
    color: var(--gray);
    transition: all 0.3s ease;
}

.step.active .step-label {
    color: var(--primary);
    font-weight: 600;
    transform: scale(1.05);
}

.step.completed .step-label {
    color: var(--success);
}

/* Стили для пропущенных шагов */
.step.skipped .step-circle {
    background: linear-gradient(135deg, #a8b0c0, #c8d0e0);
    border: 1px dashed #94a3b8;
    opacity: 0.7;
}

.step.skipped .step-label {
    color: #94a3b8;
    font-style: italic;
}

.step.skipped .step-circle::after {
    content: '↷';
    position: absolute;
    font-size: 14px;
    color: var(--gray);
}

/* Стили для вопросов */
.question-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--primary);
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.question-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    border-radius: 3px;
}

/* Стили для опций */
.options-container {
    margin-top: 30px;
}

/* Стили для информационного блока заглушки */
.info-container {
    margin-top: 30px;
    background-color: white;
    border: 2px solid rgba(67, 97, 238, 0.1);
    border-radius: 12px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.info-container::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 5px;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
    transition: all 0.3s ease;
}

.info-content {
    color: var(--dark);
    line-height: 1.6;
    margin-bottom: 20px;
}

.info-content p {
    margin-bottom: 15px;
}

.examples-block {
    background-color: rgba(76, 201, 240, 0.05);
    border-radius: 10px;
    padding: 20px;
    border-left: 3px solid var(--accent);
}

.examples-block p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.examples-block p:last-child {
    margin-bottom: 0;
}

.option-btn {
    display: block;
    width: 100%;
    background-color: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: left;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.option-btn:last-child {
    margin-bottom: 0;
}

.option-btn:hover {
    border-color: var(--primary);
    background-color: rgba(67, 97, 238, 0.02);
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.option-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 5px;
    background-color: transparent;
    transition: all 0.3s ease;
}

.option-btn:hover::before {
    background-color: var(--primary);
}

.option-btn.selected {
    border-color: var(--primary);
    background-color: rgba(67, 97, 238, 0.05);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.2);
}

.option-btn.selected::before {
    background-color: var(--primary);
}

.option-btn.selected::after {
    content: '✓';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-weight: bold;
    font-size: 20px;
}

.option-icon {
    display: inline-block;
    width: 40px;
    height: 40px;
    text-align: center;
    margin-right: 15px;
    font-size: 22px;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    line-height: 40px;
    vertical-align: middle;
    box-shadow: 0 3px 10px rgba(67, 97, 238, 0.3);
    transition: all 0.3s ease;
}

.option-btn:hover .option-icon,
.option-btn.selected .option-icon {
    transform: rotate(360deg) scale(1.1);
}

.option-content {
    display: inline-block;
    vertical-align: middle;
    width: calc(100% - 65px);
}

.option-title {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 18px;
    transition: color 0.3s ease;
}

.option-btn:hover .option-title,
.option-btn.selected .option-title {
    color: var(--primary);
}

.option-description {
    font-size: 14px;
    color: var(--gray);
    transition: color 0.3s ease;
}

.option-btn:hover .option-description {
    color: var(--dark);
}

/* Стили для навигации */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.nav-btn {
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    border: none;
}

.back-btn {
    background-color: white;
    border: 2px solid #e2e8f0;
    color: var(--gray);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.back-btn:hover {
    background-color: #f8fafc;
    border-color: var(--gray);
    transform: translateX(-5px);
}

.next-btn {
    background: linear-gradient(to right, var(--primary), var(--accent));
    border: none;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.next-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
}

.next-btn:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

.next-btn:hover::before {
    left: 100%;
}

.next-btn:disabled {
    background: linear-gradient(to right, #cbd5e1, #cbd5e1);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.next-btn:disabled::before {
    display: none;
}

/* Стили для прогресс-бара */
.progress-bar {
    height: 8px;
    width: 100%;
    background-color: #e2e8f0;
    border-radius: 4px;
    margin-top: 25px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    width: 20%;
    background: linear-gradient(to right, var(--primary), var(--accent));
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.65, 0, 0.35, 1);
    position: relative;
}

/* Стили для подсказок */
.hint-box {
    background-color: rgba(76, 201, 240, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 3px 15px rgba(76, 201, 240, 0.1);
}

.hint-box:hover {
    background-color: rgba(76, 201, 240, 0.15);
    box-shadow: 0 6px 20px rgba(76, 201, 240, 0.15);
    transform: translateY(-5px);
}

.hint-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--accent), var(--primary));
    border-radius: 4px 0 0 4px;
}

.hint-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.hint-icon {
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(76, 201, 240, 0.3);
}

.hint-title {
    font-weight: 600;
    color: var(--accent);
    font-size: 18px;
}

.hint-content {
    font-size: 15px;
    line-height: 1.6;
    color: var(--dark);
}

.example {
    margin-top: 15px;
    padding: 12px 15px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    font-style: italic;
    color: var(--secondary);
    border: 1px dashed rgba(76, 201, 240, 0.3);
}

/* Стили для результатов */
.result-header {
    text-align: center;
    margin-bottom: 30px;
}

.result-icon {
    font-size: 64px;
    margin-bottom: 15px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.result-title {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 8px;
}

.result-subtitle {
    color: var(--gray);
    font-size: 18px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    margin: 30px 0 15px;
    color: var(--secondary);
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 15px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    width: 5px;
    height: 24px;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
    border-radius: 3px;
}

.section-icon {
    display: inline-block;
    font-size: 18px;
    margin-right: 8px;
    vertical-align: middle;
}

.formula-highlight, .formula-part {
    display: inline-block;
    background-color: rgba(76, 201, 240, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: var(--primary-dark);
    white-space: nowrap;
    border: 1px dashed rgba(76, 201, 240, 0.3);
}

/* Новые стили для обновленного экрана залогов */
.voice-card {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.voice-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transform: translateY(-5px);
}

.voice-description {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: var(--dark);
}

.voice-types {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.voice-type {
    padding-bottom: 15px;
}

.voice-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.voice-badge.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 3px 10px rgba(67, 97, 238, 0.2);
}

.voice-badge.passive {
    background: linear-gradient(135deg, var(--accent), #3db9d9);
    color: white;
    box-shadow: 0 3px 10px rgba(76, 201, 240, 0.2);
}

.voice-example-card {
    background-color: var(--light);
    border-radius: 10px;
    padding: 15px;
    margin-top: 12px;
    border-left: 4px solid var(--primary);
}

.example-label {
    font-size: 12px;
    color: var(--primary);
    margin-bottom: 8px;
    font-weight: 600;
}

.example-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.example-translation {
    font-size: 14px;
    color: var(--gray);
    font-style: italic;
}

/* Стили для шагов трансформации */
.transformation-steps {
    margin: 20px 0;
}

.step-item {
    display: flex;
    margin-bottom: 20px;
    align-items: flex-start;
}

.step-number {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(67, 97, 238, 0.2);
}

.step-content {
    flex: 1;
}

.step-content h4 {
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.step-example {
    background-color: rgba(67, 97, 238, 0.05);
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.5;
}

.highlight {
    border-radius: 4px;
    padding: 2px 5px;
    display: inline-block;
}

.highlight.subject {
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-dark);
}

.highlight.object {
    background-color: rgba(76, 201, 240, 0.1);
    color: var(--accent);
}

.highlight.verb {
    background-color: rgba(77, 222, 128, 0.1);
    color: var(--success);
}

.formula-arrow {
    display: inline-block;
    margin: 0 15px;
    font-size: 20px;
    font-weight: bold;
    color: var(--primary);
}

/* Стили для секции "Когда использовать" */
.usage-box {
    margin-bottom: 25px;
    padding: 20px;
    border-radius: 10px;
    background-color: var(--light);
}

.usage-title {
    display: flex;
    align-items: center;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 16px;
}

.usage-title.active {
    color: var(--primary);
}

.usage-title.passive {
    color: var(--accent);
}

.usage-icon {
    display: inline-block;
    margin-right: 10px;
    font-size: 18px;
}

.usage-list {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

.usage-list li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
    line-height: 1.6;
}

.usage-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

.usage-example {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
}

.usage-example-item {
    background-color: white;
    padding: 12px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.usage-example-text {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--dark);
    font-size: 15px;
}

.usage-example-note {
    font-size: 13px;
    color: var(--gray);
    font-style: italic;
}

/* Стили для примеров времен */
.tense-examples {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tense-example-item {
    background-color: var(--light);
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
}

.tense-example-item:hover {
    background-color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.tense-badge {
    display: inline-block;
    background: linear-gradient(to right, var(--primary), var(--accent));
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.tense-formula {
    background-color: rgba(67, 97, 238, 0.05);
    font-family: 'Courier New', monospace;
    color: var(--primary-dark);
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: 600;
    border: 1px dashed rgba(67, 97, 238, 0.2);
    display: inline-block;
}

.tense-example-text {
    line-height: 1.6;
}

.tense-active {
    margin-bottom: 8px;
    color: var(--primary-dark);
}

.tense-passive {
    color: var(--accent);
    font-weight: 600;
}

.formula-box {
    background-color: rgba(67, 97, 238, 0.05);
    border: 1px solid rgba(67, 97, 238, 0.2);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.formula-box:hover {
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.1);
    transform: translateY(-2px);
}

.formula-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 16px;
}

.formula-text {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    color: var(--dark);
    background-color: rgba(67, 97, 238, 0.03);
    padding: 8px 12px;
    border-radius: 6px;
}

.example-box {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 10px;
    background-color: rgba(76, 201, 240, 0.05);
    border-left: 4px solid var(--accent);
    transition: all 0.3s ease;
}

.example-box:hover {
    box-shadow: 0 4px 15px rgba(76, 201, 240, 0.1);
    background-color: rgba(76, 201, 240, 0.08);
}

.example-title {
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 8px;
}

.example-original {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 16px;
}

.example-translation {
    color: var(--gray);
    font-size: 14px;
}

.usage-list {
    list-style: none;
    margin-top: 10px;
}

.usage-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    line-height: 1.5;
}

.usage-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
    font-size: 18px;
}

.markers-box {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.marker-tag {
    background-color: rgba(76, 201, 240, 0.1);
    border: 1px solid rgba(76, 201, 240, 0.3);
    color: var(--accent);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.marker-tag:hover {
    background-color: rgba(76, 201, 240, 0.2);
    transform: translateY(-2px);
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.action-btn {
    flex: 1;
    padding: 14px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    font-size: 16px;
}

.additional-info {
    background-color: #f8fafc;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    border: 1px dashed #cbd5e1;
}

.additional-info p {
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Стили для навигационных вкладок */
.nav-tabs {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #f0f0f0;
    height: 50px; /* Увеличиваем высоту для большей наглядности */
    background-color: var(--light);
    border-radius: 8px 8px 0 0;
    padding: 0 5px;
}

.nav-tabs::-webkit-scrollbar {
    height: 4px;
}

.nav-tabs::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.nav-tabs::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 20px;
}

.nav-tab {
    padding: 12px 18px;
    cursor: pointer;
    color: var(--gray);
    font-weight: 600;
    position: relative;
    white-space: nowrap;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    height: 100%;
    box-sizing: border-box;
    margin: 0 2px;
    border-radius: 8px 8px 0 0;
}

.nav-tab:hover {
    color: var(--primary-dark);
    background-color: rgba(67, 97, 238, 0.05);
}

.nav-tab.active {
    color: var(--primary);
    background-color: white;
    box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.03);
}

.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    border-radius: 3px 3px 0 0;
}

/* Стили для содержимого вкладок */
.tab-container {
    min-height: 150px;
    transition: all 0.3s ease;
    padding: 15px 0;
}

.tab-content {
    animation: fadeIn 0.5s ease-in-out;
}

.tab-content h3 {
    color: var(--primary);
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 8px;
}

.tab-content h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    border-radius: 3px;
}

.tab-content p {
    line-height: 1.6;
    margin-bottom: 15px;
}

.tab-content ul {
    margin: 0 0 15px 20px;
}

.tab-content li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Стили для сетки времен */
.tenses-grid, .passive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.tense-group, .passive-group {
    background-color: rgba(67, 97, 238, 0.05);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
}

.tense-group:hover, .passive-group:hover {
    background-color: rgba(67, 97, 238, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.1);
}

.tense-group h4, .passive-group h4 {
    color: var(--primary);
    margin-bottom: 10px;
    text-align: center;
    font-size: 16px;
}

.tense-group ul, .passive-group ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tense-group li, .passive-group li {
    padding: 5px 0;
    border-bottom: 1px dashed rgba(67, 97, 238, 0.2);
    text-align: center;
}

.tense-group li:last-child, .passive-group li:last-child {
    border-bottom: none;
}

/* Стили для списка условных предложений */
.conditionals-list {
    margin-top: 20px;
}

.conditional-item {
    background-color: rgba(76, 201, 240, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    border-left: 4px solid var(--accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.conditional-item:hover {
    background-color: rgba(76, 201, 240, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(76, 201, 240, 0.15);
}

.conditional-item h4 {
    color: var(--primary);
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
}

.conditional-item p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: var(--dark);
}

.conditional-item p:last-child {
    margin-bottom: 0;
}

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

/* Стили для сценариев условных предложений */
.conditional-preview {
    margin: 25px 0;
}

.conditional-scenario {
    display: none;
    animation: fadeIn 0.5s ease;
}

.conditional-scenario.active {
    display: block;
}

.scenario-bubble {
    background-color: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    border-top: 4px solid var(--primary);
}

.scenario-text {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.5;
}

.if-part {
    color: var(--primary);
}

.then-part {
    color: var(--accent);
}

.scenario-description {
    color: var(--gray);
    font-size: 15px;
    line-height: 1.6;
    background-color: var(--light);
    padding: 15px;
    border-radius: 10px;
    border-left: 3px solid var(--primary);
}

/* Стили для карточек условных предложений */
.condition-card {
    background-color: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-top: 30px;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease;
}

.condition-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.condition-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.condition-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin-right: 15px;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.2);
}

.condition-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.condition-probability {
    color: var(--gray);
    font-size: 14px;
}

.condition-formula {
    background-color: rgba(67, 97, 238, 0.05);
    border: 1px dashed rgba(67, 97, 238, 0.2);
    border-radius: 10px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    font-size: 16px;
}

.examples-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.example-item {
    background-color: var(--light);
    border-radius: 10px;
    padding: 15px;
    border-left: 3px solid var(--accent);
    transition: all 0.3s ease;
}

.example-item:hover {
    background-color: rgba(76, 201, 240, 0.1);
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(76, 201, 240, 0.1);
}

.example-text {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 16px;
    color: var(--dark);
}

.example-translation {
    color: var(--gray);
    font-size: 14px;
    font-style: italic;
}

/* Стили для различных типов условных предложений */
.zero-conditional .condition-icon {
    background: linear-gradient(135deg, #4cc9f0, #49b4e3);
    box-shadow: 0 4px 15px rgba(76, 201, 240, 0.3);
}

.first-conditional .condition-icon {
    background: linear-gradient(135deg, #4361ee, #3a56d4);
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.second-conditional .condition-icon {
    background: linear-gradient(135deg, #3f37c9, #3730b1);
    box-shadow: 0 4px 15px rgba(63, 55, 201, 0.3);
}

.third-conditional .condition-icon {
    background: linear-gradient(135deg, #7209b7, #5c07a1);
    box-shadow: 0 4px 15px rgba(114, 9, 183, 0.3);
}

.mixed-conditional .condition-icon {
    background: linear-gradient(135deg, #f72585, #e5214d);
    box-shadow: 0 4px 15px rgba(247, 37, 133, 0.3);
}

/* Специальные стили для формул разных типов условных предложений */
.zero-conditional .condition-formula {
    background-color: rgba(76, 201, 240, 0.05);
    border: 1px dashed rgba(76, 201, 240, 0.3);
    color: #257ea8;
}

.first-conditional .condition-formula {
    background-color: rgba(67, 97, 238, 0.05);
    border: 1px dashed rgba(67, 97, 238, 0.3);
    color: #3a56d4;
}

.second-conditional .condition-formula {
    background-color: rgba(63, 55, 201, 0.05);
    border: 1px dashed rgba(63, 55, 201, 0.3);
    color: #3730b1;
}

.third-conditional .condition-formula {
    background-color: rgba(114, 9, 183, 0.05);
    border: 1px dashed rgba(114, 9, 183, 0.3);
    color: #5c07a1;
}

.mixed-conditional .condition-formula {
    background-color: rgba(247, 37, 133, 0.05);
    border: 1px dashed rgba(247, 37, 133, 0.3);
    color: #d82167;
}

/* Адаптивные стили для условных предложений */
@media (max-width: 480px) {
    .conditional-tabs {
        gap: 10px;
        padding: 5px 10px 10px;
    }
    
    .conditional-tab {
        padding: 10px 15px;
        font-size: 14px;
        min-width: auto;
        flex-shrink: 0;
    }
    
    .scenario-bubble {
        padding: 20px;
    }
    
    .scenario-text {
        font-size: 16px;
    }
    
    .scenario-description {
        font-size: 14px;
        padding: 12px;
    }
    
    .condition-card {
        padding: 20px;
    }
    
    .condition-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .condition-title {
        font-size: 18px;
    }
    
    .condition-formula {
        font-size: 14px;
        padding: 12px;
    }
    
    .example-item {
        padding: 12px;
    }
}

/* Стили для фич-грид на главной странице */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 25px;
}

.feature-item {
    background-color: var(--light);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    background-color: white;
    border-color: rgba(67, 97, 238, 0.1);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 15px;
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: transform 0.3s ease;
}

.feature-item:hover .feature-icon {
    transform: scale(1.2);
}

.feature-text {
    font-size: 14px;
    color: var(--dark);
    line-height: 1.4;
}

/* Футер */
.footer {
    text-align: center;
    padding: 25px 0;
    color: var(--gray);
    font-size: 14px;
    font-weight: 500;
    margin-top: 20px;
}

/* Стили для меню-карусели */
.carousel-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 15px 0;
    z-index: 1000;
}

.carousel-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 60px;
}

.carousel-tab:hover {
    background-color: rgba(67, 97, 238, 0.1);
}

.carousel-tab.active {
    background-color: rgba(67, 97, 238, 0.2);
}

.carousel-tab::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    transition: width 0.3s ease;
}

.carousel-tab.active::after {
    width: 100%;
}

.carousel-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.carousel-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--dark);
}

.carousel-tab.active .carousel-label {
    color: var(--primary);
}

/* Стили для контейнера карусели */
.carousel-container {
    position: relative;
    overflow: hidden;
}

/* Переход между экранами карусели */
.slide-transition {
    transition: transform 0.4s ease;
}

/* Кнопка возврата на домашний экран */
.home-button {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    cursor: pointer;
    z-index: 900;
    transition: all 0.3s ease;
}

.home-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}


/* Ссылка на практикум */
.practice-link {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 100;
}

.practice-link-button {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    transition: all 0.25s ease;
}

.practice-link-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.4);
}

/* Стили для кнопок практики на страницах грамматики */
.practice-btn-container {
    display: flex;
    justify-content: center;
    margin: 15px 0 25px;
}

.practice-btn {
    background: linear-gradient(to right, var(--primary), var(--accent));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
    position: relative;
    overflow: hidden;
}

.practice-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
}

.practice-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

.practice-btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(to right, var(--primary), var(--accent));
    color: white;
}

/* Адаптивность */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .card {
        padding: 20px;
    }
    
    .practice-btn {
        font-size: 14px;
        padding: 8px 16px;
    }
    
    .voice-card {
        padding: 15px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .logo {
        font-size: 28px;
    }

    .card-title {
        font-size: 20px;
    }

    .question-title {
        font-size: 20px;
    }
    
    /* Стили для новых элементов залогов */
    .voice-description {
        font-size: 15px;
    }
    
    .step-item {
        align-items: flex-start;
    }
    
    .step-content h4 {
        font-size: 15px;
    }
    
    .step-example {
        font-size: 14px;
        padding: 12px;
    }
    
    .formula-text {
        display: flex;
        flex-direction: column;
    }
    
    .formula-part {
        margin-bottom: 10px;
    }
    
    .formula-arrow {
        margin: 5px 0 10px;
        transform: rotate(90deg);
    }
    
    .usage-title {
        font-size: 15px;
    }
    
    .usage-box {
        padding: 15px;
    }
    
    .usage-list li {
        font-size: 14px;
    }
    
    .tense-example-item {
        padding: 15px;
    }
    
    .tense-formula {
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .tense-active, .tense-passive {
        font-size: 14px;
    }
    /* Конец стилей для залогов */

    .option-btn {
        padding: 15px;
    }

    .option-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
        line-height: 36px;
        margin-right: 10px;
    }

    .option-content {
        width: calc(100% - 55px);
    }

    .option-title {
        font-size: 16px;
    }

    .option-description {
        font-size: 12px;
    }

    .navigation-buttons {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .nav-btn {
        width: 100%;
        text-align: center;
    }

    .action-buttons {
        flex-direction: column;
    }

    .markers-box {
        gap: 6px;
    }

    .marker-tag {
        font-size: 12px;
        padding: 4px 10px;
    }
    
    .tenses-grid, .passive-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tab-content h3 {
        font-size: 18px;
    }
    
    .conditional-item {
        padding: 12px;
    }
    
    .carousel-label {
        font-size: 10px;
    }
    
    .carousel-tab {
        padding: 6px 8px;
        min-width: 50px;
    }
    
    /* Адаптивность для модального окна */
    .modal-content {
        width: 95%;
        max-height: 85vh;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 15px 20px 25px;
    }
    
    .modal-title-container .result-icon {
        font-size: 32px;
    }
    
    .modal-title-container .result-title {
        font-size: 18px;
    }
    
    .modal-title-container .result-subtitle {
        font-size: 14px;
    }
}