/* Основная цветовая палитра Алгоритмики */
:root {
    --primary-color: #6a3d9f;      /* Фиолетовый */
    --secondary-color: #ff6f61;    /* Оранжево-розовый */
    --accent-color: #00b8d9;       /* Бирюзовый */
    --background-color: #f7f7f7;   /* Светлый фон */
    --text-color: #333333;         /* Тёмный текст */
    --button-hover: #ff4a3d;       /* Оранжевый при наведении */
    --button-active: #ff2a1b;      /* Оранжевый при клике */
    --success-color: #2ecc71;      /* Зеленый */
    --error-color: #e74c3c;        /* Красный */
    --warning-color: #f1c40f;      /* Желтый */
}

/* Общие стили */
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* Навигационная панель */
.navbar {
    background-color: var(--primary-color) !important;
    box-shadow: 0 4px 12px rgba(106, 61, 159, 0.15);
    padding: 1rem 0;
}

.navbar-brand {
    color: white !important;
    font-weight: 600;
    font-size: 1.5rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Заголовки */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Карточки */
.card {
    background-color: white;
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(106, 61, 159, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(106, 61, 159, 0.12);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid rgba(106, 61, 159, 0.1);
    padding: 1.25rem;
}

.card-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0;
}

/* Кнопки */
.btn {
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--button-hover);
    border-color: var(--button-hover);
}

.btn-primary:active {
    background-color: var(--button-active) !important;
    border-color: var(--button-active) !important;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Формы */
.form-control {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(106, 61, 159, 0.1);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(106, 61, 159, 0.25);
}

.input-group-text {
    border-radius: 12px;
    background-color: rgba(106, 61, 159, 0.05);
    border: 2px solid rgba(106, 61, 159, 0.1);
    color: var(--primary-color);
}

/* Уведомления */
.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.1);
    color: var(--success-color);
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--error-color);
}

.alert-warning {
    background-color: rgba(241, 196, 15, 0.1);
    color: var(--warning-color);
}

/* Списки */
.list-group-item {
    border: none;
    border-radius: 12px !important;
    margin-bottom: 0.5rem;
    background-color: rgba(106, 61, 159, 0.03);
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background-color: rgba(106, 61, 159, 0.05);
    transform: translateX(5px);
}

/* Модальные окна */
.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(106, 61, 159, 0.15);
}

.modal-header {
    border-bottom: 1px solid rgba(106, 61, 159, 0.1);
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid rgba(106, 61, 159, 0.1);
    padding: 1.5rem;
}

/* Значки и иконки */
.badge {
    padding: 0.5em 1em;
    border-radius: 25px;
    font-weight: 500;
}

.badge-primary {
    background-color: var(--primary-color);
}

/* Астрокоины */
.astrocoins-balance {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Таблицы */
.table {
    border-radius: 12px;
    overflow: hidden;
}

.table th {
    background-color: rgba(106, 61, 159, 0.05);
    border-bottom: 2px solid rgba(106, 61, 159, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

/* Вкладки */
.nav-tabs {
    border-bottom: 2px solid rgba(106, 61, 159, 0.1);
}

.nav-tabs .nav-link {
    border: none;
    color: var(--text-color) !important;
    font-weight: 500;
    padding: 1rem 1.5rem;
    border-radius: 0;
    margin-bottom: -2px;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    background-color: transparent;
    color: var(--primary-color) !important;
}

.nav-tabs .nav-link.active {
    color: var(--primary-color) !important;
    border-bottom: 2px solid var(--primary-color);
    background-color: transparent;
}

/* Профиль */
.profile-header {
    background-color: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(106, 61, 159, 0.08);
}

/* Транзакции */
.transaction-amount {
    font-weight: 600;
}

.transaction-amount.positive {
    color: var(--success-color);
}

.transaction-amount.negative {
    color: var(--error-color);
}

/* Специальные награды */
.special-award {
    color: var(--primary-color);
    font-weight: 600;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Загрузка */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: inherit;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

/* Адаптивность */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .modal-dialog {
        margin: 0.5rem;
    }
}