:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #1a1b1e;
    --text-secondary: #6c757d;
    --border-color: #e9ecef;
    --accent-color: #0088CC;
    --error-color: #dc3545;
    --success-color: #28a745;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-primary: #1a1b1e;
    --bg-secondary: #2c2e33;
    --text-primary: #ffffff;
    --text-secondary: #ced4da;
    --border-color: #373a40;
    --accent-color: #3498db;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Стили для фонового контейнера */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: var(--bg-primary);
}

.background-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/static/img/bg1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.1;
    pointer-events: none;
}

/* Добавляем класс для плавного перехода при переключении темы */
body.theme-transitioning * {
    transition: background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.page-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

/* Posts styles */
.posts-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
    width: 100%;
    max-width: 100%;
}

.posts-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
    width: 100%;
}

.post-card {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 2px 8px var(--shadow-color);
    width: 100%;
    height: fit-content;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.post-date-container {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.post-date {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.close-button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
}

.post-card.expanded .close-button {
    display: flex;
    opacity: 1;
    transform: scale(1);
}

.close-button:hover {
    color: var(--text-primary);
    background: var(--border-color);
}

.channel-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.channel-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    position: relative;
}

.channel-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.channel-avatar .initial {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-color);
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.channel-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.post-content {
    margin-bottom: 1rem;
    word-break: break-word;
    color: var(--text-primary);
    line-height: 1.6;
    width: 100%;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.tag:hover {
    opacity: 1;
}

/* Цвета для разных тегов */
.tag[data-tag="новости"] {
    background-color: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.tag[data-tag="анализ"] {
    background-color: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.tag[data-tag="сигнал"] {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.tag[data-tag="кол"] {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.tag[data-tag="обновление"] {
    background-color: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
}

.tag[data-tag="раздача"] {
    background-color: rgba(231, 76, 182, 0.2);
    color: #e74cb4;
}

.tag[data-tag="скам"] {
    background-color: rgba(192, 57, 43, 0.2);
    color: #c0392b;
}

.tag[data-tag="другое"] {
    background-color: rgba(149, 165, 166, 0.2);
    color: #95a5a6;
}

.open-post-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.open-post-link:hover {
    color: var(--text-primary);
}

.open-post-link::before {
    content: "🔗";
    font-size: 1rem;
}

.post:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.post.expanded {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    height: 90vh;
    max-width: 800px;
    overflow-y: auto;
    z-index: 1000;
    padding: 2rem;
}

.post-content.truncated {
    max-height: 200px;
    overflow: hidden;
    position: relative;
}

.post-content.truncated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(transparent, var(--bg-secondary));
}

.read-more {
    color: var(--accent-color);
    cursor: pointer;
    margin-top: 0.5rem;
    display: inline-block;
    font-size: 0.875rem;
}

.post-image {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin: 0.5rem 0;
}

.post.expanded .post-image {
    max-height: 400px;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
}

.overlay.visible {
    opacity: 1;
    visibility: visible;
}

.post-card.expanded {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 65%;
    max-width: 800px;
    max-height: 80vh;
    z-index: 999;
    overflow-y: auto;
    animation: expandPost 0.3s ease-out;
}

@keyframes expandPost {
    from {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.post-card.expanded .post-content {
    font-size: 1.1em;
    line-height: 1.7;
}

.post-card.expanded .post-header {
    margin-bottom: 1.5rem;
}

.post-card.expanded .channel-avatar {
    width: 48px;
    height: 48px;
}

.post-card.expanded .channel-name {
    font-size: 1.1em;
}

.post-card.expanded .post-date {
    font-size: 0.9em;
}

.post-card.expanded .post-image {
    max-height: 300px;
}

.post-card.expanded .tag {
    font-size: 0.85em;
    padding: 0.3rem 0.9rem;
}

.post-card.expanded .close-button {
    display: flex;
    opacity: 1;
    transform: scale(1);
}

.post-card.expanded .close-button:hover {
    background: var(--bg-secondary);
    transform: scale(1.1);
}

/* Loading indicator */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

/* Main Content */
.site-content {
    flex: 1;
    padding: 0;
}

.content-container {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
    display: block;
}

.post-carousel {
    position: relative;
    width: 100%;
    margin: 10px 0;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--bg-secondary);
    aspect-ratio: 16/9;
}

.carousel-container {
    display: flex;
    transition: transform 0.3s ease;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 2;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.carousel-button:hover {
    background: rgba(0, 0, 0, 0.7);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-dots {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    bottom: 5px;
    gap: 8px;
    z-index: 2;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease;
}

.carousel-dot.active {
    background: white;
}

@media (max-width: 768px) {
    .posts-container {
        grid-template-columns: 1fr;
    }
    
    .page-wrapper {
        padding: 1rem;
    }
}

.filter-section {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px var(--shadow-color);
    transform: translateY(20px);
    opacity: 0;
    animation: slideIn 0.5s ease forwards;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    display: flex;
    padding-bottom: 2.5rem;
    flex-direction: column;
    align-items: center;
}

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

.search-container {
    position: relative;
    transition: transform 0.3s ease;
    width: 100%;
    max-width: 674px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-container:focus-within {
    transform: scale(1);
}

#search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    padding-right: 2.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    width: 100%;
}

#search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
    transform: translateY(-1px);
}

.search-button {
    position: absolute;
    right: 4rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.search-button:hover {
    background: transparent;
    color: var(--accent-color);
    transform: translateY(-50%) scale(1.05);
}

.filters-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.filters-toggle:hover {
    background: var(--border-color);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.filters-toggle svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.filters-toggle.active svg {
    transform: rotate(180deg);
}

.filters-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 674px;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.3s ease, margin 0.3s ease;
    margin-top: -1rem;
}

.filters-container.expanded {
    max-height: 1000px;
    opacity: 1;
    margin-top: 1rem;
}

.filters-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    width: 100%;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
    animation-delay: calc(var(--delay) * 0.1s);
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.filter-group.full-width {
    width: 100%;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
}

.filter-group:focus-within label {
    color: var(--accent-color);
}

.datetime-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.datetime-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.datetime-group label {
    font-size: 0.75rem;
    margin-bottom: 0;
    color: var(--text-secondary);
}

.datetime-input {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 0.75rem;
}

.date-input, .time-input {
    font-family: 'Montserrat', sans-serif;
    width: 100%;
    padding: 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.date-input:focus, .time-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.filter-select {
    font-family: 'Montserrat', sans-serif;
    width: 100%;
    padding: 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.reset-button {
    font-family: 'Montserrat', sans-serif;
    align-self: flex-end;
    padding: 0.5rem 1rem;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 150px;
}

.reset-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: var(--accent-color);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.1;
    border-radius: 50%;
    transition: transform 0.5s ease;
}

.reset-button:hover {
    background: var(--border-color);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.reset-button:hover::before {
    transform: translate(-50%, -50%) scale(2);
}

@media (max-width: 768px) {
    .filter-section {
        padding: 1rem;
    }

    .search-container,
    .filters-container {
        max-width: 100%;
    }

    .filters-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .datetime-inputs {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .reset-button {
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* Стили для информации об обновлении */
.update-info {
    display: none;
}

.update-time {
    display: none;
}

/* Стили для секции анализа ИИ */
.ai-insight-section {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.ai-insight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-insight-title {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.ai-insight-button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    background: var(--accent-color);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-insight-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.ai-insight-button:disabled {
    opacity: 0.7;
    cursor: wait;
}

.ai-insight-content {
    position: relative;
    display: none;
    opacity: 0;
}

.ai-insight-content.active {
    display: block;
    animation: fadeInUp 0.5s ease forwards;
}

/* Стили для обзора рынка */
.market-overview {
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* margin-bottom: 20px; */
    padding: 20px;
    /* padding-bottom: 0; */
}

.market-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.market-analysis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.market-sentiment {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 1.5rem;
}

.market-stats {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-value.positive {
    color: #4CAF50;
}

.stat-value.negative {
    color: #f44336;
}

.key-factors,
.main-topics {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 8px;
}

@media screen and (max-width: 768px) {
    .market-info,
    .market-analysis {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-item {
        padding: 0.5rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .stat-value {
        font-size: 1rem;
    }
}

/* Стили для секции токенов */
.tokens-section {
    background: var(--bg-secondary);
    padding: 20px;
    padding-bottom: 0;
    border-radius: 8px;
    /* margin-bottom: 20px; */
}

.tokens-section h3 {
    color: var(--text-primary);
    margin: 0 0 15px 0;
}

.tokens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.token-card {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px var(--shadow-color);
    transition: transform 0.3s ease;
    animation: fadeInUp 0.3s ease forwards;
    opacity: 0;
}

.token-card:hover {
    transform: translateY(-4px);
}

.token-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.token-status {
    font-size: 0.9rem;
    color: var(--accent-color);
    margin-bottom: 8px;
}

.token-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Стили для секции анализа */
.analysis-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    /* margin-bottom: 20px; */
}

.price-prediction,
.trading-recommendations {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 8px;
}

.price-prediction h3,
.trading-recommendations h3,
.detailed-analysis h3 {
    color: var(--text-primary);
    margin: 0 0 10px 0;
    font-weight: 600;
    font-size: 1.1rem;
}

.prediction-text,
.recommendations-text,
.analysis-text {
    position: relative;
    min-height: 50px;
    padding: 1rem;
    background: var(--bg-primary);
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow-color);
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

.prediction-text:hover,
.recommendations-text:hover,
.analysis-text:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color);
}

.prediction-text::before,
.recommendations-text::before,
.analysis-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    border-radius: 8px;
    opacity: 0.7;
    transform-origin: left;
    transform: scaleX(0);
}

.loading .prediction-text::before,
.loading .recommendations-text::before,
.loading .analysis-text::before {
    animation: loadingPulse 1.5s infinite;
}

/* Стили для подробного анализа */
.detailed-analysis {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 8px;
    /* margin-top: 20px; */
}

.analysis-text {
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Стили для рыночного настроения */
.sentiment-meter {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin: 1rem 0;
    position: relative;
    overflow: hidden;
}

.sentiment-value {
    height: 100%;
    background: linear-gradient(to right, #ff4d4d, #ffb84d, #4CAF50);
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
}

.sentiment-value::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0,0,0,0.2);
}

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

@keyframes loadingPulse {
    0% {
        transform: scaleX(0);
    }
    50% {
        transform: scaleX(1);
    }
    100% {
        transform: scaleX(0);
    }
}

/* Стили для списков */
.factors-list,
.topics-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.factors-list li,
.topics-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    animation: fadeIn 0.3s ease forwards;
    opacity: 0;
}

.factors-list li:last-child,
.topics-list li:last-child {
    border-bottom: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Стили для сетки токенов */
.tokens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.token-card {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px var(--shadow-color);
    transition: transform 0.3s ease;
    animation: fadeInUp 0.3s ease forwards;
    opacity: 0;
}

.token-card:hover {
    transform: translateY(-4px);
}

/* Медиа-запросы для мобильной адаптации */
@media screen and (max-width: 1024px) {
    .page-wrapper {
        padding: 1.5rem;
    }

    .posts-container {
        gap: 0.75rem;
    }

    .post-card {
        padding: 1.25rem;
    }

    .channel-avatar {
        width: 35px;
        height: 35px;
    }

    .channel-name {
        font-size: 0.9rem;
    }

    .post-text {
        font-size: 0.95rem;
    }

    .filter-section {
        padding: 1.25rem;
    }

    .search-input {
        font-size: 0.9rem;
    }

    .filter-group {
        gap: 0.75rem;
    }
}

@media screen and (max-width: 768px) {
    .page-wrapper {
        padding: 1rem;
    }

    .posts-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .post-card {
        padding: 1rem;
    }

    .post-header {
        margin-bottom: 0.75rem;
        padding-bottom: 0.5rem;
    }

    .channel-avatar {
        width: 32px;
        height: 32px;
    }

    .channel-name {
        font-size: 0.85rem;
    }

    .post-date {
        font-size: 0.75rem;
    }

    .post-text {
        font-size: 0.9rem;
    }

    .filter-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .filters-container {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-group {
        width: 100%;
    }

    .search-container {
        width: 100%;
    }

    .search-input {
        width: 100%;
        font-size: 0.85rem;
    }

    .date-filter-container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .date-input {
        width: 100%;
    }

    .time-filter-container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .time-input {
        width: 100%;
    }

    .ai-insight-section {
        padding: 1rem;
    }

    .ai-insight-title {
        font-size: 1.1rem;
    }

    .ai-insight-button {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }

    .market-info,
    .market-analysis {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-item {
        padding: 0.5rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .stat-value {
        font-size: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .page-wrapper {
        padding: 0.75rem;
    }

    .post-card {
        padding: 0.875rem;
    }

    .post-header {
        margin-bottom: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .channel-avatar {
        width: 28px;
        height: 28px;
    }

    .channel-name {
        font-size: 0.8rem;
    }

    .post-date {
        font-size: 0.7rem;
    }

    .post-text {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .post-media {
        margin: 0.5rem 0;
    }

    .filter-section {
        padding: 0.875rem;
        margin-bottom: 0.75rem;
    }

    .filter-title {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }

    .search-input {
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    .filter-button {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    .date-input,
    .time-input {
        padding: 0.4rem;
        font-size: 0.8rem;
    }

    /* Адаптация для раскрытого поста */
    .post-card.expanded {
        position: fixed;
        top: 5%;
        left: 5%;
        width: 90%;
        height: 90%;
        z-index: 1000;
    }

    .post-overlay {
        background-color: rgba(0, 0, 0, 0.7);
    }

    .close-button {
        width: 1.25rem;
        height: 1.25rem;
        font-size: 1rem;
    }

    .ai-insight-section {
        padding: 0.875rem;
    }

    .ai-insight-title {
        font-size: 1rem;
    }

    .ai-insight-button {
        padding: 0.35rem 0.875rem;
        font-size: 0.8rem;
    }
}

@media screen and (max-width: 360px) {
    .page-wrapper {
        padding: 0.5rem;
    }

    .post-card {
        padding: 0.75rem;
    }

    .channel-avatar {
        width: 24px;
        height: 24px;
    }

    .channel-name {
        font-size: 0.75rem;
    }

    .post-date {
        font-size: 0.65rem;
    }

    .post-text {
        font-size: 0.8rem;
    }

    .filter-section {
        padding: 0.75rem;
    }

    .filter-title {
        font-size: 0.85rem;
    }

    .search-input,
    .date-input,
    .time-input,
    .filter-button {
        padding: 0.35rem;
        font-size: 0.75rem;
    }

    .ai-insight-section {
        padding: 0.75rem;
    }

    .ai-insight-title {
        font-size: 0.95rem;
    }

    .ai-insight-button {
        padding: 0.3rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* Информационное окно */
.info-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 1000;
}

.info-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.info-modal.active {
    display: flex;
    opacity: 1;
}

.info-modal-content {
    background: var(--bg-primary);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

.info-modal.active .info-modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.info-modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.info-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.info-modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.info-modal-close:hover {
    color: var(--accent-color);
}

.info-modal-body {
    padding: 20px;
}

.info-section {
    margin-bottom: 20px;
}

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

.info-section h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-color);
}

.info-section p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.info-section a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.info-section a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Спидометр для рыночного настроения */
.sentiment-gauge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 1rem 0 0.5rem 0;
    position: relative;
    min-height: 120px;
}

#sentiment-gauge-canvas {
    display: block;
    margin: 0 auto;
    background: transparent;
}

.sentiment-value-label {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-top: -10px;
    margin-bottom: 2px;
    text-align: center;
}

.sentiment-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 0;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

@media screen and (max-width: 480px) {
    .sentiment-gauge {
        min-height: 90px;
    }
    #sentiment-gauge-canvas {
        width: 120px;
        height: 70px;
    }
    .sentiment-value-label {
        font-size: 1.1rem;
    }
    .sentiment-description {
        font-size: 0.8rem;
    }
}

/* Стили для выделения контрактов токенов */
.token-contract {
    display: inline-block;
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    padding: 2px 4px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.2s ease;
    user-select: text;
}

.token-contract:hover {
    background-color: rgba(231, 76, 60, 0.3);
    box-shadow: 0 0 0 1px rgba(231, 76, 60, 0.4);
}

.token-contract.copied {
    background-color: rgba(76, 175, 80, 0.2);
    color: var(--success-color);
}

[data-theme="dark"] .token-contract {
    background-color: rgba(231, 77, 60, 0.122);
    color: #c44436;
    margin-top: 10px;
    margin-bottom: 10px;
}

[data-theme="dark"] .token-contract:hover {
    background-color: rgba(231, 76, 60, 0.35);
    box-shadow: 0 0 0 1px rgba(231, 76, 60, 0.5);
}

[data-theme="dark"] .token-contract.copied {
    background-color: rgba(76, 175, 80, 0.25);
    color: var(--success-color);
}