/* ===== RESET & GLOBAL ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary: #10b981;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px 0 rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius: 0.5rem;
    --radius-sm: 0.25rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--white);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== CONTAINER ===== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 2rem;
    }
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    font-size: 1rem;
    line-height: 1.5;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border-color: var(--gray-300);
}

.btn-outline:hover {
    background-color: var(--gray-50);
    border-color: var(--primary);
}

.btn-large {
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
}

/* ===== HEADER ===== */
.site-header {
    background-color: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    color: var(--gray-600);
    font-weight: 500;
}

.main-nav a:hover {
    color: var(--primary);
}

.auth-buttons {
    display: flex;
    gap: 0.75rem;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-600);
    cursor: pointer;
}

/* ===== HERO SECTION ===== */
.hero {
    padding: 5rem 0 3rem;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
}

.hero .highlight {
    color: var(--primary);
}

.hero p {
    font-size: 1.25rem;
    color: var(--gray-600);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ===== FEATURES SECTION ===== */
.features {
    padding: 4rem 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--gray-900);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    object-fit: contain; /* чтобы не искажалось */
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.feature-card p {
    color: var(--gray-600);
}

/* ===== CALL TO ACTION ===== */
.cta {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    padding: 4rem 0;
    border-radius: var(--radius);
    margin: 2rem 0;
}

.cta-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta .btn {
    background: white;
    color: var(--primary);
    border: none;
}

.cta .btn:hover {
    background: var(--gray-100);
}

/* ===== PLAN COMPARISON (MINI) ===== */
.plan-summary {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.plan-item {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    flex: 0 1 300px;
}

.plan-item h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.plan-item ul {
    list-style: none;
    margin: 1rem 0;
}

.plan-item li {
    padding: 0.375rem 0;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.plan-item li::before {
    content: "✓";
    color: var(--secondary);
    font-weight: 700;
}

.plan-item .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 1rem 0;
}

/* ===== ADAPTIVE (MEDIA QUERIES) ===== */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-nav, .auth-buttons {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
    .feature-icon {
        width: 40px;
        height: 40px;
    }

    .plan-summary {
        flex-direction: column;
        align-items: center;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.125rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
    }
}


/* ===== MOBILE MENU STYLES ===== */
@media (max-width: 768px) {
    .main-nav,
    .auth-buttons {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: var(--shadow-md);
        padding: 1.5rem;
        flex-direction: column;
        gap: 1rem;
        z-index: 100;
    }

    .main-nav.open,
    .auth-buttons.open {
        display: flex;
    }

    .main-nav.open {
        padding-bottom: 0.5rem;
    }

    .auth-buttons.open {
        top: calc(70px + var(--nav-height, 200px)); /* Динамически подстроим позже */
        border-top: 1px solid var(--gray-200);
        flex-direction: row;
        justify-content: center;
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .main-nav li {
        width: 100%;
        text-align: center;
    }

    .main-nav a {
        display: block;
        padding: 0.5rem;
    }

    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 1.75rem;
        color: var(--gray-600);
        cursor: pointer;
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: var(--radius);
        transition: background 0.2s;
    }

    .mobile-menu-toggle:hover {
        background: var(--gray-100);
    }

    .mobile-menu-toggle.active {
        color: var(--primary);
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .auth-buttons.open {
        flex-direction: column;
        width: 100%;
    }
}



/* ===== LEARN PAGE ===== */
.learn-page {
    padding: 2rem 0;
    min-height: calc(100vh - 70px - 200px); /* header + примерный footer */
    background: var(--gray-50);
}

.learn-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.learn-header h1 {
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--gray-800);
}

.progress-indicator {
    font-size: 1.125rem;
    color: var(--gray-600);
    background: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

/* Карточка */
.card-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.flashcard {
    width: 100%;
    max-width: 600px;
    height: 300px;
    background: white;
    border-radius: var(--radius-lg, 1rem);
    box-shadow: var(--shadow-lg);
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    cursor: pointer;
}

.flashcard.flipped {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    border-radius: var(--radius-lg, 1rem);
    background: white;
    box-shadow: var(--shadow-lg);
}

.card-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
}

.card-front .word {
    font-family: 'Noto Serif TC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans', sans-serif;
    font-size: 2.5rem;
    font-weight: 500;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.card-front .transcription {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
}

.tts-button {
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.2s;
    margin-bottom: 1rem;
}

.tts-button:hover {
    background: var(--gray-100);
}

.card-front .example {
    font-size: 1.125rem;
    color: var(--gray-700);
    font-style: italic;
    margin-bottom: 0.5rem;
    text-align: center;
}

.card-front .example-translation {
    font-size: 1rem;
    color: var(--gray-500);
    text-align: center;
}

.card-back .translation {
    font-family: 'Noto Serif TC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.flip-button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius);
    font-size: 1.125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: var(--shadow);
}

.flip-button:hover {
    background: var(--primary-dark);
}

/* Кнопки оценки */
.review-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.review-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: white;
    min-width: 100px;
}

.review-btn.again {
    background: #ef4444; /* красный */
}
.review-btn.again:hover {
    background: #dc2626;
}

.review-btn.hard {
    background: #f59e0b; /* оранжевый */
}
.review-btn.hard:hover {
    background: #d97706;
}

.review-btn.good {
    background: #10b981; /* зелёный */
}
.review-btn.good:hover {
    background: #059669;
}

.review-btn.easy {
    background: #3b82f6; /* синий */
}
.review-btn.easy:hover {
    background: #2563eb;
}

/* Адаптивность */
@media (max-width: 640px) {
    .learn-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .flashcard {
        height: 250px;
    }

    .card-front .word {
        font-size: 2rem;
    }

    .card-back .translation {
        font-size: 1.5rem;
    }

    .review-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .review-btn {
        width: 100%;
    }
}

/* ===== GUEST REMINDER ===== */
.guest-reminder {
    margin-top: 2rem;
    padding: 1rem;
    background: #e0f2fe; /* светло-голубой */
    border: 1px solid #bae6fd;
    border-radius: var(--radius);
    text-align: center;
    color: var(--gray-700);
}

.guest-reminder a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
}

.guest-reminder a:hover {
    color: var(--primary-dark);
}

/* ===== NEXT SET MESSAGE ===== */
#next-set-message {
    background: white;
    border-radius: var(--radius-lg, 1rem);
    padding: 3rem;
    box-shadow: var(--shadow);
    margin: 2rem 0;
}

#next-set-message h2 {
    font-size: 2rem;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

#next-set-message p {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

#next-set-message .btn {
    margin: 0 0.5rem;
}

@media (max-width: 640px) {
    #next-set-message .btn {
        display: block;
        margin: 0.5rem auto;
        width: 100%;
    }
}


/* Error pages */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.error-container {
    max-width: 600px;
}

.error-code {
    font-size: 6rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 0 var(--gray-200);
}

.error-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--gray-800);
}

.error-message {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

@media (max-width: 640px) {
    .error-code {
        font-size: 4rem;
    }
    .error-title {
        font-size: 1.5rem;
    }
}


/* ===== VARIABLES (добавьте в :root, если их нет) ===== */
:root {
    /* ... существующие переменные ... */
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --success: #10b981;
    --success-dark: #059669;
    --warning: #f59e0b;
    --warning-dark: #d97706;
    --info: #3b82f6;
    --info-dark: #2563eb;
}

/* ===== SETS PAGE ===== */
.sets-page {
    padding: 2rem 0;
    min-height: calc(100vh - 70px - 200px); /* header + footer */
    background: var(--gray-50);
}

.sets-page .container {
    max-width: 1200px;
}

/* Информация о наборе */
.set-info {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    padding: 1.5rem 2rem;
    border-radius: var(--radius-lg, 1rem);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.set-info h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    color: white;
}

.set-info p {
    margin: 0.25rem 0 0;
    opacity: 0.9;
    font-size: 1rem;
}

.set-info .badge {
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 500;
}

/* Форма добавления слова */
.add-word-form {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 2.5rem;
    border: 1px solid var(--gray-200);
}

.add-word-form h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--gray-800);
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 0.75rem;
}

.add-word-form .form-group {
    margin-bottom: 1.25rem;
}

.add-word-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
}

.add-word-form input[type="text"],
.add-word-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: var(--gray-50);
}

.add-word-form input:focus,
.add-word-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background-color: white;
}

.add-word-form textarea {
    resize: vertical;
    min-height: 80px;
}

.add-word-form button[type="submit"] {
    margin-top: 0.5rem;
    padding: 0.75rem 2rem;
    font-size: 1.125rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    font-weight: 500;
}

.add-word-form button[type="submit"]:hover {
    background-color: var(--primary-dark);
}

.add-word-form button[type="submit"]:active {
    transform: scale(0.98);
}

.add-word-form button[type="submit"]:disabled {
    background-color: var(--gray-400);
    cursor: not-allowed;
    transform: none;
}

/* Таблица слов */
.words-list {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
}

.words-list h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--gray-800);
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 0.75rem;
}

/* Адаптивная таблица */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
}

.words-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* чтобы на мобильных был скролл */
}

.words-table th,
.words-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.words-table th {
    background-color: var(--gray-100);
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
}

.words-table td {
    vertical-align: middle;
    color: var(--gray-800);
}

.words-table tr:hover td {
    background-color: var(--gray-50);
}

.words-table .word-cell {
    font-weight: 600;
    color: var(--primary-dark);
}

.words-table .transcription-cell {
    font-family: 'Courier New', monospace;
    color: var(--gray-600);
}

.words-table .example-cell {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--gray-600);
    font-style: italic;
}

/* Кнопки действий */
.btn-small {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

.btn-small.btn-danger {
    background-color: var(--danger);
    color: white;
    border-color: var(--danger);
}

.btn-small.btn-danger:hover {
    background-color: var(--danger-dark);
    border-color: var(--danger-dark);
}

.btn-small.btn-edit {
    background-color: var(--gray-200);
    color: var(--gray-800);
    border-color: var(--gray-300);
    margin-right: 0.5rem;
}

.btn-small.btn-edit:hover {
    background-color: var(--gray-300);
}

/* Ссылка на импорт */
#import-link {
    margin-top: 2rem;
    text-align: center;
}

#import-link .btn {
    min-width: 200px;
}

/* Пустой набор */
#empty-set-message {
    text-align: center;
    padding: 3rem;
    color: var(--gray-500);
    font-style: italic;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 2px dashed var(--gray-300);
}

/* Адаптивность */
@media (max-width: 768px) {
    .set-info {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .add-word-form {
        padding: 1.5rem;
    }

    .words-list {
        padding: 1rem;
    }

    .words-table th,
    .words-table td {
        padding: 0.75rem;
    }

    .btn-small {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .sets-page {
        padding: 1rem 0;
    }

    .add-word-form button[type="submit"] {
        width: 100%;
    }
}

/* Карточки наборов */
.sets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.set-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
}

.set-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.set-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--gray-800);
}

.set-card p {
    margin: 0.25rem 0;
    color: var(--gray-600);
    font-size: 0.95rem;
}

.set-card-footer {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

/* Кнопка выбора набора */
.set-card .btn-small {
    background-color: var(--primary);
    color: white;
    border: none;
}

.set-card .btn-small:hover {
    background-color: var(--primary-dark);
}

/* Панель слов */
.set-words-panel {
    margin-top: 2rem;
    padding: 2rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}

.set-words-panel h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.set-words-panel > p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* ===== FORM STYLES ===== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* ===== ALERTS ===== */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

.alert-danger {
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.alert-success {
    background-color: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

/* ===== UTILITY CLASSES ===== */
.mt-3 {
    margin-top: 1rem;
}

.text-center {
    text-align: center;
}

/* ===== AUTH CONTAINER ===== */
.auth-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 2rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.auth-container h1 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--gray-800);
}

.btn-block {
    width: 100%;
    display: block;
}

.user-greeting {
    display: inline-block;
    padding: 0.625rem 1rem;
    color: var(--gray-700);
    font-weight: 500;
}

/* Адаптация для мобильного меню */
@media (max-width: 768px) {
    .user-greeting {
        padding: 0.5rem;
        text-align: center;
        width: 100%;
    }
}

/* ===== ОБНОВЛЁННЫЙ ФУТЕР ===== */
.site-footer {
    background-color: var(--gray-800);
    color: var(--gray-300);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--gray-700);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    color: white;
    font-size: 1.125rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
}

.footer-description {
    color: var(--gray-400);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-copyright {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.footer-menu,
.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li,
.footer-contact li {
    margin-bottom: 0.5rem;
}

.footer-menu a,
.footer-contact a {
    color: var(--gray-400);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-menu a:hover,
.footer-contact a:hover {
    color: white;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-400);
}

/* Адаптивность */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-contact li {
        justify-content: center;
    }
}

/* ===== CONTENT PAGE STYLES ===== */
.content-page {
    max-width: 900px; /* Оптимальная ширина для чтения */
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Заголовки */
.content-page h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

.content-page h2 {
    font-size: 2rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem;
    color: var(--gray-800);
    letter-spacing: -0.01em;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 0.5rem;
}

.content-page h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--gray-800);
}

.content-page h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem;
    color: var(--gray-700);
}

/* Абзацы */
.content-page p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--gray-700);
    margin-bottom: 1.5rem;
}

.content-page .lead {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--gray-600);
    margin-bottom: 2rem;
    font-weight: 300;
}

/* Списки */
.content-page ul,
.content-page ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.content-page li {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.content-page li strong {
    color: var(--primary-dark);
    font-weight: 600;
}

/* Карточки (для преимуществ, планов и т.п.) */
.content-page .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.content-page .card {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    transition: transform 0.2s, box-shadow 0.2s;
}

.content-page .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.content-page .card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.35rem;
    color: var(--primary);
}

.content-page .card ul {
    margin: 0;
    padding-left: 1.25rem;
}

.content-page .card li {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* Цитаты */
.content-page blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: var(--gray-100);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--gray-700);
}

.content-page blockquote p {
    margin-bottom: 0;
}

/* Изображения */
.content-page img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 2rem 0;
}

/* Кнопки в контенте */
.content-page .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Горизонтальная линия */
.content-page hr {
    margin: 3rem 0;
    border: none;
    border-top: 1px solid var(--gray-200);
}

/* Адаптивность */
@media (max-width: 768px) {
    .content-page {
        padding: 1.5rem 1rem;
    }
    .content-page h1 {
        font-size: 2rem;
    }
    .content-page h2 {
        font-size: 1.75rem;
    }
    .content-page h3 {
        font-size: 1.35rem;
    }
    .content-page .lead {
        font-size: 1.125rem;
    }
    .content-page p,
    .content-page li {
        font-size: 1rem;
    }
}

/* ===== PLANS SECTION (dark background) ===== */
.plans-section {
    background-color: #392ea8; /* Тёмно-синий фон, можно заменить на var(--gray-900) */
    padding: 2rem 0;
    color: white;
}

.plans-section .section-title {
    color: white;
    margin-bottom: 2rem;
}

.plans-section .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.plans-section .card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    display: flex;
    flex-direction: column;
}

.plans-section .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

.plans-section .card h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 0.75rem;
    text-align: center;
}

.plans-section .card ul {
    margin: 1.5rem 0;
    padding-left: 0;
    list-style: none;
    flex-grow: 1;
}

.plans-section .card li {
    color: var(--gray-700);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.plans-section .card li::before {
    content: "✓";
    color: var(--secondary);
    font-weight: 700;
    font-size: 1.1rem;
}

.plans-section .card li strong {
    color: var(--gray-900);
}

.plans-section .price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 1.5rem 0 1rem;
    text-align: center;
}

.plans-section .btn {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    margin-top: 0.5rem;
}

/* Адаптивность */
@media (max-width: 768px) {
    .plans-section {
        padding: 3rem 0;
    }
    .plans-section .card-grid {
        gap: 1.5rem;
    }
    .plans-section .card {
        padding: 1.5rem;
    }
}

/* Модальное окно */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius);
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 10px;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Уведомления */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.notification {
    padding: 12px 20px;
    margin-bottom: 10px;
    border-radius: var(--radius);
    color: white;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notification-error {
    background-color: #f44336;
}

.notification-success {
    background-color: #4caf50;
}

/* Карточки наборов */
.set-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.set-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.set-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.set-card p {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.set-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.set-card-actions .btn-small {
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.set-card-actions .select-set {
    background-color: var(--primary);
    color: white;
}

.set-card-actions .select-set:hover {
    background-color: var(--primary-dark);
}

.set-card-actions .delete-set {
    background-color: transparent;
    color: var(--danger);
    font-size: 1.2rem;
    padding: 0.4rem 0.6rem;
    border: none;
    cursor: pointer;
}

.set-card-actions .delete-set:hover {
    background-color: var(--danger);
    color: white;
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid var(--gray-300);
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    position: relative;
}

.close {
    color: var(--gray-500);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 10px;
    line-height: 1;
}

.close:hover {
    color: var(--gray-800);
}

/* Статистика */
.stats-section {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.stats-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--gray-800);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-limit {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-left: 0.25rem;
}

/* Кнопки действий */
.sets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.sets-header h2 {
    font-size: 1.5rem;
    color: var(--gray-800);
}

.set-actions {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

/* Адаптивность */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .sets-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .set-actions {
        flex-direction: column;
    }
}

/* Улучшение внешнего вида полей ввода в модальных окнах */
.modal-content .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 1rem;
    line-height: 1.5;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #fff;
    box-sizing: border-box;
    margin-bottom: 0.5rem;
}

.modal-content .form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* Стили для группы кнопок в модалках */
.modal-content .form-group:last-child {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0;
}

/* Кнопки в модалках занимают равную ширину */
.modal-content .btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 1rem;
}

/* Для текстовых областей */
.modal-content textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* ===== УЛУЧШЕНИЯ ДЛЯ КАРТОЧЕК НАБОРОВ ===== */

/* Заголовок карточки */
.set-card h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--gray-800);
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 0.5rem;
}

/* Текстовая информация */
.set-card p {
    margin: 0.25rem 0;
    color: var(--gray-600);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Уровень прогресса с цветовыми индикаторами */
.set-progress-level {
    font-weight: 500;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin-top: 0.2rem;
}

/* Динамические классы для уровня прогресса */
.set-progress-level[data-level="слабо"] {
    background-color: #fee2e2;
    color: #b91c1c;
}
.set-progress-level[data-level="средне"] {
    background-color: #fff3cd;
    color: #856404;
}
.set-progress-level[data-level="хорошо"] {
    background-color: #d1e7dd;
    color: #0f5132;
}
.set-progress-level[data-level="отлично"] {
    background-color: #cfe2ff;
    color: #084298;
}
.set-progress-level[data-level="нет слов"] {
    background-color: var(--gray-200);
    color: var(--gray-600);
}

/* Контейнер действий */
.set-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
    border-top: 1px solid var(--gray-200);
    padding-top: 1rem;
    justify-content: flex-start;
    align-items: center;
}

/* Все кнопки внутри действий */
.set-card-actions .btn-small {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    white-space: nowrap;
}

/* Кнопка "Выбрать" */
.set-card-actions .select-set {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}
.set-card-actions .select-set:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Кнопка "Учить" (ссылка) */
.set-card-actions .btn-primary {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    text-decoration: none;
}
.set-card-actions .btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Кнопка "Сбросить прогресс" */
.set-card-actions .btn-secondary {
    background-color: var(--gray-200);
    color: var(--gray-700);
    border-color: var(--gray-300);
}
.set-card-actions .btn-secondary:hover {
    background-color: var(--gray-300);
    border-color: var(--gray-400);
}

/* Кнопка "Простое повторение" (эмодзи) */
.set-card-actions .btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    font-size: 1rem;
    padding: 0.4rem 0.6rem;
}
.set-card-actions .btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

/* Кнопка удаления */
.set-card-actions .delete-set {
    background-color: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
    font-size: 1rem;
    padding: 0.4rem 0.6rem;
}
.set-card-actions .delete-set:hover {
    background-color: var(--danger);
    color: white;
}

/* Адаптивность для маленьких экранов */
@media (max-width: 480px) {
    .set-card-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .set-card-actions .btn-small {
        width: 100%;
        text-align: center;
    }
}

.set-progress-level[data-level="начальный"] {
    background-color: var(--gray-300);
    color: var(--gray-700);
}

.set-navigation {
    margin-bottom: 1.5rem;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
}
.back-link:hover {
    text-decoration: underline;
}
.set-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--gray-800);
}

.simple-repeat-page {
    padding: 2rem 0;
    min-height: calc(100vh - 70px - 200px);
    background: var(--gray-50);
}

.simple-repeat-controls {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

#completion-message {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 2rem 0;
}

.completion-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

@media (max-width: 640px) {
    .completion-actions {
        flex-direction: column;
    }
}

.stats-section {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}
.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}
.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}
.upgrade-section, .export-section {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-200);
}
.upgrade-section {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: #fbbf24;
}
.pricing-page .plans-section {
    margin: 3rem 0;
}
.pricing-page .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.pricing-page .card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.2s;
}
.pricing-page .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.pricing-page .card.premium {
    border: 2px solid var(--primary);
    background: linear-gradient(135deg, #fff, #f0f9ff);
}
.pricing-page .card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--gray-800);
}
.pricing-page .card ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    text-align: left;
}
.pricing-page .card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-200);
}
.pricing-page .card li::before {
    content: "✓";
    color: var(--secondary);
    margin-right: 0.5rem;
    font-weight: bold;
}
.pricing-page .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 1.5rem 0;
}
.pricing-page .btn {
    width: 100%;
    margin-bottom: 0.5rem;
}
.pricing-page small {
    color: var(--gray-500);
}

.icon-btn {
    width: 25px;
    height: 25px;
    opacity: 0.5;
    cursor: pointer;
    vertical-align: middle;
    margin: 0 10px;
    transition: opacity 0.2s;
}
.icon-btn:hover {
    opacity: 0.3;
}

/* Profile page */
.stats-section {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}
.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}
.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}
.activity-section {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}
.activity-calendar {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    max-width: 700px;
    margin-top: 1rem;
}
.calendar-square {
    width: 15px;
    height: 15px;
    border-radius: 3px;
    transition: transform 0.1s;
}
.calendar-square:hover {
    transform: scale(1.2);
}
.activity-legend {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--gray-600);
}
.legend-item {
    display: inline-block;
    width: 15px;
    height: 15px;
    border-radius: 3px;
    margin-right: 0.25rem;
}
.settings-section,
.upgrade-section,
.export-section {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-200);
}
.upgrade-section {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: #fbbf24;
}

/* Profile page additional sections */
.plan-section,
.profile-info-section,
.password-section {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
}

.plan-section p {
    margin: 0.5rem 0;
    color: var(--gray-700);
}

.plan-section .btn {
    margin-top: 0.5rem;
}

/* Forms in profile */
.profile-info-section form,
.password-section form {
    margin-top: 1rem;
}

/* Alerts (уже есть, но для полноты) */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
}

.alert-danger {
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.alert-success {
    background-color: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.alert-danger ul,
.alert-success ul {
    margin: 0;
    padding-left: 1.5rem;
}

.stat-value.has-tooltip {
    position: relative;
    cursor: help; /* меняем курсор на вопросик */
}

.stat-value.has-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    background: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    white-space: nowrap;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    z-index: 1000;
    box-shadow: var(--shadow);
    pointer-events: none;
}

/* Маленькая стрелочка снизу */
.stat-value.has-tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
    margin-bottom: -2px;
    z-index: 1000;
    pointer-events: none;
}

.danger-zone {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 2rem;
    color: #c53030;
}

.danger-zone h3 {
    margin-top: 0;
    color: #c53030;
}

.danger-zone .btn-danger {
    background-color: #dc2626;
    color: white;
    border-color: #dc2626;
}

.danger-zone .btn-danger:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
}

/* Pricing page */
.pricing-page .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.pricing-page .card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.pricing-page .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.pricing-page .card.current-plan {
    border: 2px solid var(--primary);
    background: linear-gradient(135deg, #fff, #f0f9ff);
}

.pricing-page .card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--gray-800);
}

.pricing-page .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin: 1.5rem 0;
}

.pricing-page .card ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    text-align: left;
}

.pricing-page .card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.pricing-page .card li::before {
    content: "✓";
    color: var(--secondary);
    margin-right: 0.5rem;
    font-weight: bold;
}

.pricing-page .badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.pricing-page .badge.current {
    background: var(--primary);
    color: white;
}

.pricing-page .badge.disabled {
    background: var(--gray-200);
    color: var(--gray-600);
}

.pricing-page .btn {
    width: 100%;
    margin-top: 1rem;
}

/* Модальное окно для оплаты */
#payment-modal .modal-content {
    max-width: 400px;
}

/* Логотип в шапке */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.02em;
    text-decoration: none;
}

.logo-img {
    height: 30px;
    width: auto;
    transition: opacity 0.2s;
}

.logo:hover .logo-img {
    opacity: 0.8;
}

/* Логотип в подвале */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
}

.footer-logo-img {
    height: 30px;
    width: auto;
}

/* Адаптивность */
@media (max-width: 768px) {
    .logo-img,
    .footer-logo-img {
        height: 24px;
    }
    .logo,
    .footer-logo {
        font-size: 1.2rem;
    }
}

/* ===== HOW IT WORKS SECTION ===== */
.how-it-works {
    padding: 4rem 0;
    background-color: var(--gray-50);
}

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.step {
    position: relative;
    background: white;
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    border: 3px solid white;
}

/* Стрелки между шагами (только на десктопе) */
.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -1.5rem; /* выдвигаем в промежуток между карточками */
    transform: translateY(-50%);
    width: 1.5rem;
    height: 1.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%234f46e5' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 2;
    pointer-events: none; /* чтобы не мешать кликам */
}

.step-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    object-fit: contain;
}

.step h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.step p {
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .steps {
        grid-template-columns: repeat(2, 1fr);
    }
    /* убираем стрелки на планшетах */
    .step:not(:last-child)::after {
        display: none;
    }
}

@media (max-width: 640px) {
    .steps {
        grid-template-columns: 1fr;
    }

    .step-number {
        width: 36px;
        height: 36px;
        font-size: 1.25rem;
        top: -8px;
        left: -8px;
    }
}

.testimonials {
    padding: 4rem 0;
    background: white;
}
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}
.testimonial-card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
}
.testimonial-avatar {
    width: 64px;
    height: 64px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}
.testimonial-text {
    font-style: italic;
    color: var(--gray-700);
    margin-bottom: 1rem;
}
.testimonial-author {
    font-weight: 600;
    color: var(--gray-800);
}
@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}
.testimonial-avatar-img {
    width: 64px;
    height: 64px;
    border-radius: 50%;          /* делает аватар круглым */
    object-fit: cover;           /* обрезает картинку, чтобы заполнить круг */
    margin: 0 auto 1rem;
    display: block;
    box-shadow: var(--shadow-sm);
}

/* ===== PRICING SUMMARY (главная) ===== */
.pricing-summary {
    padding: 4rem 0;
    background: white;
    text-align: center;
    background-color: #392ea8;
}
.pricing-summary h2 {
    color: white;
}
.section-subtitle {
    font-size: 1.25rem;
    color: white;
    max-width: 700px;
    margin: 0 auto 3rem;
}
.pricing-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}
.pricing-feature {
    background: white;
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pricing-feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.pricing-icon {
     font-size: 3rem;
     margin-bottom: 1rem;
 }
.pricing-icon img {
    width: 64px;
    height: 64px;
    object-fit: cover;           /* обрезает картинку, чтобы заполнить круг */
    margin: 0 auto 0.2rem;
    display: block;
    box-shadow: var(--shadow-sm);
}

.pricing-feature h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--gray-800);
}
.pricing-feature p {
    color: var(--gray-600);
    line-height: 1.5;
}
.pricing-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}
@media (max-width: 768px) {
    .pricing-features {
        grid-template-columns: 1fr;
    }
    .pricing-actions {
        flex-direction: column;
        align-items: center;
    }
    .pricing-actions .btn {
        width: 100%;
        max-width: 300px;
    }
}