@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #030712;
    --card-bg: rgba(17, 24, 39, 0.7);
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.35);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --input-bg: rgba(0, 0, 0, 0.4);
    --input-border: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.08);
}

/* Базовые стили */
body {
    background: radial-gradient(circle at 0% 0%, #1e1b4b 0%, #030712 50%),
                radial-gradient(circle at 100% 100%, #0c4a6e 0%, #030712 50%);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Контейнеры */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 2.5rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7),
                0 0 40px rgba(56, 189, 248, 0.05);
    animation: fadeIn 0.8s ease-out;
    box-sizing: border-box;
}

.glass-card.wide {
    max-width: 600px;
}

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

/* Логотип и заголовки */
.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.orbit-logo {
    width: 60px;
    height: 60px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: 0 0 20px var(--accent-glow);
    margin-bottom: 1rem;
}

.orbit-logo.small {
    width: 40px;
    height: 40px;
    margin: 0 auto;
}

.orbit-logo::after {
    content: '';
    width: 12px;
    height: 12px;
    background: var(--text-main);
    border-radius: 50%;
    box-shadow: 0 0 15px #fff;
}

.orbit-inner {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px dashed rgba(56, 189, 248, 0.4);
    border-radius: 50%;
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin: 0;
    background: linear-gradient(to right, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Поля ввода */
.input-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.input-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    margin-left: 4px;
}

input {
    background: var(--input-bg);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4), 
                0 1px 0 rgba(255, 255, 255, 0.05);
    border: 1px solid var(--input-border);
    border-radius: 14px;
    padding: 14px 16px;
    color: #e2e8f0;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.25s ease;
}

input:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5),
                0 0 15px rgba(56, 189, 248, 0.15); 
}

/* Кнопки */
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--accent), #0284c7);
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -6px rgba(56, 189, 248, 0.5);
    filter: brightness(1.1);
}

.btn-secondary {
    background: transparent; /* Убираем фоновую подложку */
    color: var(--text-dim);
    border: none;            /* Убираем рамку */
    padding: 8px 14px;       /* Уменьшаем отступы, так как рамки больше нет */
    border-radius: 14px;
    text-decoration: none !important;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.03); /* Едва заметный блик при наведении */
    color: var(--accent);
    transform: translateY(-1px);
}

/* Модификатор для компактной кнопки на главной */
.btn-small {
    width: auto !important;
    min-width: 400px;
    padding: 16px 28px !important;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Сетка преимуществ */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 3.5rem 0; /* Увеличили отступ сверху и снизу */
    align-items: stretch;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: transform 0.3s ease;
}

.feature-text {
    color: var(--text-dim);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

.balanced-text {
    max-width: 220px; /* Чуть увеличили ширину (было 190px) */
    text-wrap: balance;
    margin: 0 auto;
}

/* Действия на главной */
.home-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 2.5rem;
}

/* Статистика Дашборда */
.stats-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 2rem;
}

.stats-card {
    background: rgba(0, 0, 0, 0.3);
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.stats-card.highlight { border-left: 3px solid var(--accent); }

/* Футер и ссылки */
.footer-link, .logout-wrapper {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
}

.footer-link a, .logout-link {
    color: var(--accent);
    text-decoration: none !important;
    font-weight: 500;
    transition: color 0.3s;
}

.logout-link { color: var(--text-dim); }
.logout-link:hover { color: #fb7185; }

/* Сообщения об ошибках */
.error-msg {
    background: rgba(244, 63, 94, 0.1);
    color: #fb7185;
    padding: 10px;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    text-align: center;
    border: 1px solid rgba(244, 63, 94, 0.2);
}


/* Адаптивность */
@media (max-width: 480px) {
    .features-grid { grid-template-columns: 1fr; }
    .balanced-text { max-width: 100%; }
}
/* --- КОНТЕЙНЕР ТАРИФОВ --- */
.pricing-container {
    width: 95%;
    max-width: 1100px;
    margin: 2rem auto;
    animation: fadeIn 0.8s ease-out;
}

.pricing-header {
    text-align: center;
    margin-bottom: 4rem;
}

.pricing-header h1 {
    font-size: 2.5rem;
    margin-top: 1rem;
}

.back-link {
    color: var(--text-dim);
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--accent);
}

/* --- СЕТКА КАРТОЧЕК --- */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: center; /* Центрируем по вертикали, чтобы популярный тариф выделялся */
}

.plan-card {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border);
    border-radius: 32px;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

/* Эффект при наведении на обычную карточку */
.plan-card:hover {
    transform: translateY(-10px);
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* --- ПОПУЛЯРНЫЙ ТАРИФ (Орбита) --- */
.plan-card.popular {
    border: 2px solid var(--accent);
    background: rgba(17, 24, 39, 0.85);
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.15);
}

.plan-card.popular:hover {
    transform: scale(1.07) translateY(-5px);
    box-shadow: 0 0 40px rgba(56, 189, 248, 0.25);
}

.badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #030712;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 6px 16px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* --- ВНУТРЕННЕЕ НАПОЛНЕНИЕ --- */
.plan-card h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
}

.price {
    font-size: 3rem;
    font-weight: 800;
    margin: 2rem 0;
    display: flex;
    align-items: baseline;
    justify-content: center;
    color: var(--text-main);
}

.price span {
    font-size: 1.125rem;
    color: var(--text-dim);
    margin-left: 8px;
    font-weight: 400;
}

/* --- ОСОБЕННОСТИ ТАРИФА (СПИСОК) --- */
.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 3rem 0;
    text-align: left;
    flex-grow: 1; /* Чтобы все кнопки на одном уровне были */
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.4;
}

/* Иконки в списке */
.plan-features li i {
    color: var(--accent);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.9;
}

/* --- КНОПКИ В КАРТОЧКАХ --- */
.plan-card .btn-primary, 
.plan-card .btn-secondary {
    width: 100%;
    margin-top: auto; /* Прижимает кнопки к низу */
    box-sizing: border-box;
}

/* Особенность для кнопки Выбрать */
.plan-card .btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: #fff;
    padding: 16px;
    font-weight: 600;
    border-radius: 14px;
    transition: all 0.3s;
}

.plan-card .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: #fff; /* Чтобы не перекрывалось стилем из предыдущего запроса */
}

/* АДАПТИВНОСТЬ */
@media (max-width: 768px) {
    .pricing-header h1 { font-size: 1.8rem; }
    .plans-grid { grid-template-columns: 1fr; }
    .plan-card.popular { transform: none; scale: 1; margin: 20px 0; }
    .plan-card.popular:hover { transform: translateY(-5px); }
}
/* --- КНОПКА С КОНТУРОМ (Для дашборда) --- */
.btn-outline {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 16px; /* Такая же высота, как у синей кнопки */
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Отступ между иконкой и текстом */
    transition: all 0.3s ease;
    box-sizing: border-box;
    margin-top: 12px; /* Отступ от верхней синей кнопки */
}

.btn-outline i {
    width: 18px;
    height: 18px;
    color: var(--text-dim);
    transition: color 0.3s ease;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-2px);
}

.btn-outline:hover i {
    color: #fff;
}