:root {
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --secondary: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #111827;
    --gray-dark: #374151;
    --gray: #6b7280;
    --gray-light: #e5e7eb;
    --gray-lighter: #f9fafb;
    --white: #ffffff;
    --shadow: 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: 8px;
    --radius-lg: 12px;
}

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

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--dark);
    background-color: #f8fafc;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px 80px;
}

/* Заголовок страницы */
.pricing-header {
    text-align: center;
    margin-bottom: 80px;
}

.pricing-title {
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 16px;
    line-height: 1.2;
}

.pricing-subtitle {
    font-size: 1.2rem;
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto;
}

/* Переключатель периода */
.billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
}

.billing-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-dark);
    transition: color 0.2s ease;
}

.billing-label.active {
    color: var(--primary);
    font-weight: 600;
}

.badge {
    background-color: var(--secondary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 50px;
    margin-left: 5px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-light);
    transition: .3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 30px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Сетка карточек */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
    align-items: stretch;
}

/* Карточка тарифа */
.pricing-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-light);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.pricing-card.popular {
    border: 2px solid var(--primary);
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.15);
    transform: scale(1.05);
    z-index: 2;
}

.pricing-card.popular:hover {
    transform: scale(1.05) translateY(-8px);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 5px 20px;
    border-radius: 50px;
    white-space: nowrap;
    box-shadow: var(--shadow);
}

.pricing-card-header {
    text-align: center;
    margin-bottom: 30px;
}

.pricing-card-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.pricing-card-subtitle {
    color: var(--gray);
    font-size: 0.95rem;
}

.pricing-card-price {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--gray-light);
}

.price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.price-period {
    font-size: 0.95rem;
    color: var(--gray);
}

.pricing-card-features {
    list-style: none;
    margin-bottom: 35px;
    flex-grow: 1;
}

.pricing-card-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: var(--gray-dark);
    font-size: 0.95rem;
}

.pricing-card-features li i {
    width: 20px;
    font-size: 1rem;
}

.pricing-card-features li i.fa-check {
    color: var(--secondary);
}

.pricing-card-features li i.fa-times {
    color: var(--danger);
}

.pricing-card-features li.disabled {
    color: var(--gray);
}

.pricing-card-btn {
    display: inline-block;
    width: 100%;
    padding: 14px 24px;
    background-color: var(--primary);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.pricing-card-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Секция сравнения */
.comparison-section {
    margin-bottom: 80px;
}

.comparison-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    text-align: center;
    margin-bottom: 40px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.comparison-table th {
    background-color: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    padding: 18px 15px;
    text-align: center;
}

.comparison-table th:first-child {
    text-align: left;
    background-color: var(--primary-dark);
}

.comparison-table td {
    padding: 15px;
    border-bottom: 1px solid var(--gray-light);
    color: var(--gray-dark);
}

.comparison-table td:first-child {
    font-weight: 600;
    color: var(--dark);
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table td i.fa-check {
    color: var(--secondary);
    font-size: 1.2rem;
}

.comparison-table td i.fa-times {
    color: var(--danger);
    font-size: 1.2rem;
}

.comparison-table td:not(:first-child) {
    text-align: center;
}

/* FAQ секция */
.faq-section {
    margin-bottom: 80px;
}

.faq-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    text-align: center;
    margin-bottom: 40px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.faq-item {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.faq-question {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--gray-light);
}

.faq-answer {
    color: var(--gray);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Стили для сообщения об ошибке */
.pricing-error {
    background-color: #fee;
    color: #c33;
    padding: 15px 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
    border: 1px solid #fcc;
    font-size: 14px;
}

/* Убедимся, что цены отображаются корректно */
.pricing-card-price .price {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary, #4a6bff);
    line-height: 1.2;
}

.pricing-card-price .price-period {
    font-size: 14px;
    color: #718096;
    margin-left: 5px;
}

/* Стили для карточки текущего плана */




.current-plan-actions {
    margin-top: 20px;
}

.pricing-card-btn.secondary {
    background: transparent;
    color: #10b981;
    border: 1px solid #10b981;
}

.pricing-card-btn.secondary:hover {
    background: #10b981;
    color: white;
}

/* Блок текущего тарифа */

/* Блок текущего тарифа */
.current-plan-block {
    margin: 20px auto 30px;
    max-width: 800px;
    /* Ограничиваем ширину */
    animation: slideDown 0.3s ease;
}

.current-plan-header {
    text-align: center;
    margin-bottom: 15px;
}

.current-plan-header h2 {
    font-size: 30px;
    color: #1a1a1a;
    font-weight: 600;
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
}

.current-plan-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #4a6bff, #10b981);
    border-radius: 2px;
}

.current-plan-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 20px 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    border-left-width: 4px;
    max-width: 600px;
    /* Еще уже саму карточку */
    margin: 0 auto;
    /* Центрируем карточку */
}

.current-plan-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.current-plan-icon i {
    font-size: 24px;
}

.current-plan-info {
    flex: 1;
}

.current-plan-name {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 5px;
}

.plan-expiry {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #6b7280;
}

.expiry-date strong,
.expiry-days strong {
    color: #1a1a1a;
    font-weight: 600;
    margin-left: 4px;
}

.expiry-days.expiry-warning strong {
    color: #ef4444;
}

/* Адаптивность */
@media (max-width: 768px) {
    .current-plan-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .plan-expiry {
        flex-direction: column;
        gap: 8px;
        justify-content: center;
    }

    .current-plan-header h2 {
        font-size: 18px;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dashed var(--primary);
}

.faq-link:hover {
    border-bottom: 1px solid var(--primary);
}


/* Кнопка активированного тарифа */
.pricing-card-btn.activated {
    background: #10b981;
    color: white;
    cursor: default;
    opacity: 0.8;
}

.pricing-card-btn.activated:hover {
    transform: none;
    box-shadow: none;
}

/* Анимации */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .current-plan-card {
        flex-direction: column;
        text-align: center;
    }

    .plan-expiry {
        flex-direction: column;
        gap: 8px;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .current-plan-badge {
        font-size: 10px;
        padding: 4px 12px;
    }
}

/* Адаптивность */
@media (max-width: 1100px) {
    .pricing-card.popular {
        transform: scale(1.02);
    }

    .pricing-card.popular:hover {
        transform: scale(1.02) translateY(-8px);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px 15px 60px;
    }

    .pricing-title {
        font-size: 2rem;
    }

    .pricing-subtitle {
        font-size: 1rem;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .pricing-card.popular {
        transform: scale(1);
        order: -1;
    }

    .pricing-card.popular:hover {
        transform: translateY(-8px);
    }

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

    .comparison-table {
        font-size: 0.9rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 12px 8px;
    }

    .cta-section {
        padding: 40px 20px;
    }

    .cta-title {
        font-size: 1.8rem;
    }

    .cta-btn {
        padding: 14px 30px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .billing-toggle {
        gap: 10px;
    }

    .badge {
        display: block;
        margin: 5px 0 0;
    }

    .comparison-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .pricing-card {
        padding: 30px 20px;
    }

    .price {
        font-size: 2rem;
    }
}