/* Цветовая схема из приложения */
:root {
    --primary: #6B87E3;
    --primary-light: #A4B9FF;
    --bg: #F4F8FF;
    --surface: #ffffff;
    --text-main: #222222;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border: #e0e0e0;
    --red: #F44336;
    --green: #3bb272d0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 16px;
    min-height: 100vh;
}

.content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Заголовок */
.header {
    text-align: center;
    margin-bottom: 8px;
}

.title {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 8px;
}

.subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Блок с балансом монет */
.coin-block {
    background-color: var(--surface);
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.coin-balance {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.coin-label {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 600;
}

.coin-amount {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary);
}

/* Контейнер пакетов */
.packages-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Карточка пакета */
.package-card {
    background-color: var(--surface);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
}

.package-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 135, 227, 0.15);
}

.package-card:active {
    transform: translateY(0);
}

.package-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.coin-count {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

.package-price {
    font-size: 16px;
    font-weight: bold;
    color: var(--primary);
}

/* Блок информации */
.info-block {
    background-color: var(--surface);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.info-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 12px;
}

.info-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 20px;
    margin-bottom: 8px;
}

.info-text:last-child {
    margin-bottom: 0;
}

/* Сообщение об ошибке */
.error-message {
    background-color: #fff5f5;
    border: 1px solid var(--red);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--red);
    font-size: 14px;
    margin-top: 8px;
}

/* Индикатор загрузки */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px;
    background-color: var(--surface);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--primary-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading p {
    color: var(--text-secondary);
    font-size: 14px;
}

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

    .title {
        font-size: 24px;
    }

    .coin-amount {
        font-size: 32px;
    }

    .package-card {
        padding: 16px;
    }
}

/* Стили для успешной оплаты */
.success-message {
    background-color: #f0fdf4;
    border: 1px solid var(--green);
    border-radius: 8px;
    padding: 16px;
    color: var(--green);
    font-size: 14px;
    margin-top: 8px;
    text-align: center;
}

/* Стили для страницы авторизации */
.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 16px;
}

.auth-message {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Стили для ссылок в правовых блоках */
.info-block a:hover {
    text-decoration: underline;
}

.info-block ul {
    list-style-type: disc;
}
