/* Основные цвета сайта (legacy — переопределяются style_enhanced.css) */
/* style_enhanced.css подключается вторым и имеет приоритет */
:root {
    /* Эти переменные используются только в style.css */
    --bubble-primary: #667eea;
    --bubble-primary-light: #8b9cff;
    --bubble-primary-dark: #4a5db0;

    --bubble-secondary: #764ba2;
    --bubble-secondary-light: #9a6bc5;
    --bubble-secondary-dark: #5a3780;

    --bubble-success: #4facfe;
    --bubble-warning: #f6d365;
    --bubble-danger: #fa709a;

    --bubble-bg: #f5f7fa;
    --bubble-text: #2d3748;
    --bubble-text-light: #718096;

    --border-radius-sm: 6px;
    --border-radius-md: 12px;
    --border-radius-lg: 18px;
    --border-radius-xl: 28px;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.12);
}


/* Общие стили */
body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--bubble-bg);
    color: var(--bubble-text);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Baloo 2', cursive;
    font-weight: 700;
    color: var(--bubble-primary-dark);
}

a {
    color: var(--bubble-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--bubble-primary-dark);
}

.bubble-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-wrapper {
    flex: 1;
}

/* Кнопки */
.bubble-btn {
    background-color: var(--bubble-primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-md);
    padding: 0.5rem 1.2rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.bubble-btn:hover {
    background-color: var(--bubble-primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.bubble-btn-secondary {
    background-color: var(--bubble-secondary);
    color: white;
}

.bubble-btn-secondary:hover {
    background-color: var(--bubble-secondary-dark);
}

.bubble-btn-outline {
    background-color: transparent;
    color: var(--bubble-primary);
    border: 2px solid var(--bubble-primary);
    padding: 0.4rem 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    transition: all 0.3s ease;
}

.bubble-btn-outline:hover {
    background-color: var(--bubble-primary-light);
    color: white;
    border-color: var(--bubble-primary-light);
}

.bubble-btn-lg {
    padding: 0.8rem 1.8rem;
    font-size: 1.1rem;
    border-radius: var(--border-radius-lg);
}

.bubble-btn-secondary-lg {
    padding: 0.8rem 1.8rem;
    font-size: 1.1rem;
    background-color: var(--bubble-secondary);
    color: white;
    border: none;
    border-radius: var(--border-radius-lg);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.bubble-btn-secondary-lg:hover {
    background-color: var(--bubble-secondary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.bubble-btn-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--bubble-secondary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
    z-index: 100;
    transition: all 0.3s ease;
}

.bubble-btn-floating:hover {
    background-color: var(--bubble-secondary-dark);
    transform: scale(1.1);
}

/* Навигация */
.bubble-navbar {
    border-radius: 0 0 15px 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, var(--bubble-primary), var(--bubble-secondary));
    padding: 10px 0;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.bubble-navbar .nav-link {
    border-radius: 20px;
    margin: 0 5px;
    padding: 10px 15px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.bubble-navbar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.bubble-navbar .nav-link.active {
    background-color: white;
    color: var(--bubble-primary);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-shadow: none;
}

.bubble-navbar .nav-link i {
    margin-right: 5px;
    font-size: 1.1em;
}

.bubble-navbar .navbar-brand {
    display: flex;
    align-items: center;
}

.bubble-logo {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    transition: transform 0.5s ease;
}

.bubble-navbar .navbar-brand:hover .bubble-logo {
    transform: rotate(360deg);
}

.bubble-title {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #e0e0e0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-fill-color: transparent;
}

.bubble-search {
    position: relative;
}

.bubble-search .form-control {
    border-radius: var(--border-radius-md);
    border: 2px solid #eaeaea;
    padding-right: 40px;
    transition: all 0.3s ease;
}

.bubble-search .form-control:focus {
    border-color: var(--bubble-primary-light);
    box-shadow: 0 0 0 0.25rem rgba(74, 134, 232, 0.25);
}

.bubble-search .btn-search {
    position: absolute;
    right: 5px;
    top: 5px;
    background: none;
    border: none;
    color: var(--bubble-primary);
}

/* Аватар */
.avatar-small {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0.5rem;
}

/* Уведомления */
.bubble-alert {
    border-radius: var(--border-radius-md);
    border: none;
    box-shadow: var(--shadow-sm);
}

/* Футер */
.bubble-footer {
    background-color: var(--bubble-primary-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 2rem 0;
    margin-top: 2rem;
}

.bubble-footer-title {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.bubble-footer a {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.bubble-footer a:hover {
    color: white;
    text-decoration: underline;
}

.language-selector .form-select {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
}

/* Главная страница */
.bubble-hero {
    position: relative;
    padding: 3rem 0;
    overflow: hidden;
}

.bubble-hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--bubble-primary-dark);
}

.bubble-hero-subtitle {
    font-size: 1.2rem;
    color: var(--bubble-text-light);
    margin-bottom: 2rem;
}

.bubble-hero-image {
    transform: scale(1.1);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0) scale(1.1);
    }
    50% {
        transform: translateY(-10px) scale(1.1);
    }
    100% {
        transform: translateY(0) scale(1.1);
    }
}

/* Анимированные пузырьки */
.bubble-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -100px;
    background-color: rgba(74, 134, 232, 0.1);
    border-radius: 50%;
    animation: bubbleRise linear infinite;
    animation-duration: 10s;
    will-change: transform, opacity;
}

.bubble-1 {
    width: 60px;
    height: 60px;
    left: 30%;
    animation-delay: 1s;
}

.bubble-2 {
    width: 40px;
    height: 40px;
    left: 40%;
    animation-delay: 2s;
    background-color: rgba(232, 74, 156, 0.1);
}

.bubble-3 {
    width: 80px;
    height: 80px;
    left: 50%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.bubble-4 {
    width: 50px;
    height: 50px;
    left: 60%;
    animation-delay: 3s;
    background-color: rgba(232, 74, 156, 0.1);
}

.bubble-5 {
    width: 70px;
    height: 70px;
    left: 70%;
    animation-delay: 1.5s;
}

@keyframes bubbleRise {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0.2;
    }
    50% {
        transform: translateY(-50vh) translateX(20px);
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100vh) translateX(-20px);
        opacity: 0;
    }
}

/* Заголовки секций */
.bubble-section-title {
    position: relative;
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    display: inline-block;
}

.bubble-section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background: linear-gradient(to right, var(--bubble-primary), var(--bubble-secondary));
    border-radius: 10px;
}

/* Карточки особенностей */
.bubble-feature-card {
    background-color: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-sm);
    text-align: center;
    height: 100%;
    transition: all 0.3s ease;
}

.bubble-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.bubble-feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--bubble-primary);
}

.bubble-feature-card:nth-child(even) .bubble-feature-icon {
    color: var(--bubble-secondary);
}

.bubble-feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

/* Элементы таблицы Менделеева на главной */
.element-cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
}

.element-card {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: var(--border-radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.element-card:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.element-symbol {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.element-number {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.element-name {
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.2rem;
}

.element-weight {
    font-size: 0.8rem;
    color: var(--bubble-text-light);
}

/* Цвета для элементов */
.element-card.hydrogen {
    background-color: #FFE9EC;
    color: #E84A9C;
}

.element-card.oxygen {
    background-color: #E9F5FF;
    color: #4A86E8;
}

.element-card.carbon {
    background-color: #F0F0F0;
    color: #333333;
}

.element-card.gold {
    background-color: #FFF8E1;
    color: #FFA000;
}

.element-card.helium {
    background-color: #FFF0F0;
    color: #FF6B6B;
}

/* Секция призыва к действию */
.bubble-cta {
    margin: 3rem 0;
}

.bubble-cta-card {
    background: linear-gradient(135deg, var(--bubble-primary-light), var(--bubble-primary));
    color: white;
    padding: 3rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
}

.bubble-cta-card h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.bubble-cta-card p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* Адаптивность */
@media (max-width: 992px) {
    .periodic-table {
        grid-template-columns: repeat(18, 50px);
        grid-template-rows: repeat(10, 50px);
        gap: 3px;
    }
}

@media (max-width: 768px) {
    .bubble-hero-title {
        font-size: 1.8rem;
    }
    
    .bubble-hero-subtitle {
        font-size: 1rem;
    }
    
    .bubble-btn-lg, .bubble-btn-secondary-lg {
        padding: 0.6rem 1.2rem;
        font-size: 0.95rem;
    }
    
    .element-card {
        width: 120px;
        height: 120px;
    }
    
    .element-symbol {
        font-size: 2rem;
    }
    
    .bubble-cta-card {
        padding: 2rem 1.5rem;
    }
    
    .bubble-cta-card h2 {
        font-size: 1.5rem;
    }
    
    /* Улучшенная адаптивность таблицы Менделеева */
    .periodic-table {
        grid-template-columns: repeat(18, 42px);
        grid-template-rows: repeat(10, 42px);
        gap: 2px;
    }
    
    .element-symbol {
        font-size: 1.3em;
    }
    
    .element-name, .element-weight, .element-number {
        font-size: 0.55em;
    }
    
    /* Навигация на планшетах */
    .bubble-navbar .nav-link {
        padding: 8px 12px;
        font-size: 0.95em;
    }
    
    /* Карточки функций */
    .bubble-feature-card {
        padding: 1.5rem;
    }
    
    .bubble-feature-icon {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    /* Герой секция */
    .bubble-hero-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .bubble-hero-subtitle {
        font-size: 0.9rem;
    }
    
    /* Кнопки на мобильных */
    .bubble-btn-lg, .bubble-btn-secondary-lg {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .d-flex.gap-3 {
        flex-direction: column;
        gap: 0.5rem !important;
    }
    
    /* Карточки элементов */
    .bubble-feature-card {
        padding: 1.5rem 1rem;
    }
    
    .element-cards-container {
        gap: 0.75rem;
    }
    
    .element-card {
        width: 90px;
        height: 90px;
        padding: 0.5rem;
    }
    
    .element-symbol {
        font-size: 1.6rem;
    }
    
    .element-number {
        font-size: 0.7rem;
    }
    
    .element-name {
        font-size: 0.75rem;
    }
    
    .element-weight {
        font-size: 0.65rem;
    }
    
    /* CTA блок */
    .bubble-cta-card {
        padding: 1.5rem 1rem;
    }
    
    .bubble-cta-card h2 {
        font-size: 1.3rem;
    }
    
    .bubble-cta-card p {
        font-size: 0.95rem;
    }
    
    /* Плавающая кнопка */
    .bubble-btn-floating {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        bottom: 15px;
        right: 15px;
    }
    
    /* Таблица Менделеева на мобильных */
    .periodic-table-container {
        overflow-x: auto;
        padding: 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .periodic-table {
        grid-template-columns: repeat(18, 38px);
        grid-template-rows: repeat(10, 38px);
        gap: 2px;
        min-width: min-content;
    }
    
    .element-symbol {
        font-size: 1.1em;
    }
    
    .element-name {
        font-size: 0.5em;
    }
    
    .element-weight, .element-number {
        font-size: 0.48em;
    }
    
    /* Навигация */
    .bubble-navbar {
        padding: 5px 0;
    }
    
    .bubble-navbar .nav-link {
        padding: 6px 10px;
        font-size: 0.85em;
        margin: 0 2px;
    }
    
    .bubble-logo {
        width: 28px;
        height: 28px;
    }
    
    .bubble-title {
        font-size: 1.3rem;
    }
    
    /* Футер */
    .bubble-footer {
        padding: 1.5rem 0;
        font-size: 0.9rem;
    }
    
    .bubble-footer-title {
        font-size: 1.1rem;
    }
    
    /* Анимация молекул скрываем на мобильных */
    .hero-illustration {
        display: none;
    }
}

@media (max-width: 400px) {
    /* Экстра-малые экраны */
    .periodic-table {
        grid-template-columns: repeat(18, 32px);
        grid-template-rows: repeat(10, 32px);
        gap: 1px;
    }
    
    .bubble-hero-title {
        font-size: 1.3rem;
    }
    
    .element-card {
        width: 75px;
        height: 75px;
    }
}

/* Анимация молекул на главной странице */
.hero-illustration {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.molecule-animation {
    position: relative;
    width: 300px;
    height: 300px;
}

.atom {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    animation: atomFloat 4s ease-in-out infinite;
}

.atom span {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.atom-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    top: 20px;
    left: 50px;
    animation-delay: 0s;
}

.atom-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    top: 100px;
    right: 30px;
    animation-delay: 1s;
}

.atom-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    bottom: 80px;
    left: 30px;
    animation-delay: 2s;
}

.atom-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    bottom: 30px;
    right: 60px;
    animation-delay: 1.5s;
}

.connection {
    position: absolute;
    height: 3px;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.4), rgba(245, 87, 108, 0.4));
    transform-origin: left center;
    animation: connectionPulse 3s ease-in-out infinite;
}

.connection-1 {
    width: 120px;
    top: 60px;
    left: 100px;
    transform: rotate(45deg);
}

.connection-2 {
    width: 150px;
    bottom: 110px;
    left: 80px;
    transform: rotate(-30deg);
    animation-delay: 1.5s;
}

@keyframes atomFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* GPU ускорение для анимаций */
.atom,
.molecule-animation {
    will-change: transform;
    transform: translateZ(0);
}

@keyframes connectionPulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.8;
    }
}

/* Улучшенные градиенты для карточек */
.bubble-feature-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    position: relative;
    overflow: hidden;
}

.bubble-feature-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
    animation: shimmer 10s linear infinite;
}

@keyframes shimmer {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Улучшенный CTA блок */
.bubble-cta-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    position: relative;
    overflow: hidden;
}

.bubble-cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    animation: pulse 8s ease-in-out infinite;
    z-index: 0;
}

.bubble-cta-card h2,
.bubble-cta-card p,
.bubble-cta-card .btn,
.bubble-cta-card a {
    position: relative;
    z-index: 1;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Стили для таблицы Менделеева */
.periodic-table-container {
    overflow-x: auto;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.periodic-table-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.category-legend-item {
    padding: 5px 15px;
    border-radius: 20px;
    color: white;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.category-legend-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

.periodic-table {
    display: grid;
    grid-template-columns: repeat(18, 60px);
    grid-template-rows: repeat(10, 60px);
    gap: 4px;
    justify-content: center;
}

.element-card {
    position: relative;
    border-radius: 8px;
    padding: 5px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    opacity: 0;
    transform: scale(0.9);
}

.element-card.visible {
    opacity: 1;
    transform: scale(1);
}

.element-card:hover {
    transform: scale(1.1);
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.element-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 5px;
}

.element-number {
    font-size: 0.7em;
    text-align: left;
    opacity: 0.7;
}

.element-symbol {
    font-size: 1.5em;
    font-weight: bold;
    text-align: center;
    margin: 2px 0;
}

.element-name {
    font-size: 0.65em;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.element-weight {
    font-size: 0.6em;
    text-align: center;
    opacity: 0.7;
    margin-top: 2px;
}

/* Стили для профиля и личного кабинета */
.profile-sidebar {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.profile-avatar-placeholder {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    background-color: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #aaa;
}

.subscription-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    margin: 10px auto;
    display: inline-block;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.profile-nav {
    margin-top: 20px;
}

.profile-nav-item {
    display: block;
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 5px;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.profile-nav-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: translateX(5px);
}

.profile-nav-item.active {
    background-color: var(--bubble-primary);
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.profile-nav-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Стили карточек в профиле */
.bubble-card {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: white;
    margin-bottom: 20px;
}

.bubble-card-header {
    background: linear-gradient(135deg, var(--bubble-primary-light), var(--bubble-primary));
    color: white;
    padding: 15px 20px;
}

.bubble-card-body {
    padding: 20px;
}

.bubble-badge {
    background-color: rgba(255, 255, 255, 0.3);
    font-size: 0.9em;
    padding: 5px 10px;
    border-radius: 10px;
}

/* Стили для уровня и опыта */
.level-display {
    display: flex;
    align-items: center;
    gap: 20px;
}

.current-level {
    text-align: center;
    min-width: 80px;
}

.level-number {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--bubble-primary);
    line-height: 1;
}

.level-label {
    font-size: 0.9em;
    color: #666;
}

.level-progress-container {
    flex: 1;
}

.progress {
    height: 15px;
    border-radius: 10px;
    background-color: #f5f5f5;
    margin-bottom: 5px;
}

.progress-bar {
    border-radius: 10px;
    background: linear-gradient(90deg, var(--bubble-primary), var(--bubble-secondary));
}

/* Стили для статистики */
.elements-progress-stats {
    display: flex;
    justify-content: space-between;
    text-align: center;
}

.elements-progress-stat {
    padding: 10px;
    border-radius: 10px;
    background-color: #f9f9f9;
    flex: 1;
    margin: 0 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.stat-value {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--bubble-primary);
}

.stat-label {
    font-size: 0.8em;
    color: #666;
}

/* Стили для элементов в списке */
.element-card-small {
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.element-card-small:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.progress-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.7);
}

/* Стили для достижений */
.achievements-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.achievement-card {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 10px;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.achievement-icon {
    font-size: 2em;
    color: var(--bubble-primary);
    background-color: rgba(74, 134, 232, 0.1);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.achievement-content {
    flex: 1;
}

.achievement-title {
    font-size: 1.1em;
    margin-bottom: 5px;
}

.achievement-description {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.achievement-date {
    font-size: 0.8em;
    color: #999;
}

.achievement-badge {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 10px;
    background-color: #f9f9f9;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.achievement-badge:hover {
    transform: translateX(5px);
    background-color: #f5f5f5;
}

.achievement-badge .achievement-icon {
    width: 40px;
    height: 40px;
    font-size: 1.5em;
    margin-right: 15px;
}

/* Стили для избранных элементов */
.favorite-element-card {
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.favorite-element-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.favorite-element-link {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px;
}

.favorite-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.favorite-element-card:hover .favorite-actions {
    opacity: 1;
}

/* Стили для прогресса элементов */
.element-progress-card {
    display: flex;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.element-progress-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.element-info {
    flex: 0 0 80px;
    color: white;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.element-progress-info {
    flex: 1;
    padding: 15px;
}

.progress-legend {
    display: flex;
    gap: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 0.8em;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 3px;
    margin-right: 5px;
}

/* Стиль для кругового графика */
.total-progress-circle {
    width: 150px;
    height: 150px;
    margin: 0 auto;
}

.circular-chart {
    width: 100%;
    height: 100%;
}

.circle-bg {
    fill: none;
    stroke: #eee;
    stroke-width: 3.8;
}

.circle {
    fill: none;
    stroke: var(--bubble-primary);
    stroke-width: 3.8;
    stroke-linecap: round;
    animation: progress 1s ease-out forwards;
}

.percentage {
    fill: var(--bubble-primary);
    font-size: 0.5em;
    text-anchor: middle;
    font-weight: bold;
}

@keyframes progress {
    0% {
        stroke-dasharray: 0 100;
    }
}

/* Стили для пустых состояний */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}

.empty-state-icon {
    font-size: 3em;
    color: #ddd;
    margin-bottom: 20px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .bubble-navbar {
        padding: 5px 0;
    }
    
    .bubble-navbar .nav-link {
        padding: 8px 10px;
        margin: 2px;
        font-size: 0.9em;
    }
    
    .bubble-logo {
        width: 30px;
        height: 30px;
    }
    
    .bubble-title {
        font-size: 1.4rem;
    }
    
    .periodic-table {
        grid-template-columns: repeat(18, 40px);
        grid-template-rows: repeat(10, 40px);
    }
    
    .element-symbol {
        font-size: 1.2em;
    }
    
    .element-name, .element-weight, .element-number {
        font-size: 0.6em;
    }
    
    .profile-sidebar {
        margin-bottom: 20px;
    }
    
    .level-display {
        flex-direction: column;
        gap: 10px;
    }
    
    .elements-progress-stats {
        flex-wrap: wrap;
    }
    
    .elements-progress-stat {
        flex: 0 0 46%;
        margin-bottom: 10px;
    }
}

@media (max-width: 576px) {
    .achievement-card, .element-progress-card {
        flex-direction: column;
    }
    
    .achievement-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .element-info {
        flex: 0 0 auto;
        width: 100%;
        padding: 10px;
    }
    
    .total-progress-circle {
        width: 120px;
        height: 120px;
    }
} 