/* Chat Container - 2/3 высоты */
.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
}

.welcome-logo {
    max-width: 400px;
    height: auto;
}

/* Chat Navigation Buttons */
.chat-nav-buttons {
    position: fixed;
    right: 30px;
    bottom: 400px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.chat-nav-buttons.visible {
    opacity: 1;
    visibility: visible;
}

.chat-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 1px solid #444;
    color: #caa999;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, color 0.2s;
}

.chat-nav-btn:hover {
    border-color: #caa999;
    color: #fff;
}

.chat-nav-btn:disabled {
    border-color: #333;
    color: #444;
    cursor: not-allowed;
}

.chat-nav-btn .nav-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* News Container */
.news-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1000px;
    width: 100%;
    padding: 20px;
}

.news-container::-webkit-scrollbar {
    display: none;
}

.news-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.news-header {
    margin-bottom: 20px;
}

.news-header .news-title {
    font-size: 28px;
    font-weight: 600;
    color: #caa999;
    margin-bottom: 8px;
}

.news-subtitle {
    color: #888;
    font-size: 14px;
}

.news-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.news-filter {
    padding: 8px 16px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.news-filter:hover {
    background: #2a2a2a;
}

.news-filter.active {
    background-color: rgba(0, 200, 200, 0.15);
    border-color: rgba(124, 195, 228, 0.5);
    color: #7CC3E4;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    grid-auto-rows: min-content;
}

@media (min-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.news-card {
    background: #111111;
    border: 1px solid #222222;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
    cursor: pointer;
}

.news-card:hover {
    background: #1a1a1a;
    border-color: #333333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.news-card {
    transition: all 0.2s ease;
}

.news-card.featured {
    grid-column: span 2;
}

.news-card.wide {
    grid-column: span 2;
}

.news-card.large {
    grid-column: span 2;
}

@media (max-width: 1199px) {
    .news-card.featured,
    .news-card.wide,
    .news-card.large {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .news-card.featured,
    .news-card.wide,
    .news-card.large {
        grid-column: span 1;
    }
}

.news-card-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

.news-card.featured .news-card-image,
.news-card.wide .news-card-image,
.news-card.large .news-card-image {
    height: 240px;
}

.news-card-content {
    padding: 16px;
}

.news-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card.featured .news-card-title,
.news-card.large .news-card-title {
    font-size: 18px;
    -webkit-line-clamp: 2;
}

.news-card.wide .news-card-title {
    font-size: 17px;
    -webkit-line-clamp: 2;
}

.news-card-excerpt {
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #888;
}

.news-card-source {
    color: #3b82f6;
    font-weight: 500;
}

.news-card-time {
    color: #666;
}

.news-tag {
    background: #1e293b;
    color: #64748b;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}


/* Messages */
.message {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    width: 800px;
    max-width: 100%;
    align-self: center;
}

/* User messages - aligned to the right within the 800px dialog area */
.message.user-message {
    justify-content: flex-end;
}

.message.user-message .message-content {
    background: #2a2a3a;
    padding: 12px 16px;
    border-radius: 16px 16px 4px 16px;
    flex: none;
    max-width: 70%;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}


.ai-avatar {
    background: transparent;
    padding: 0;
    overflow: hidden;
}

.ai-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.message-content {
    flex: 1;
    line-height: 1.4;
    min-width: 0;
    overflow-x: auto;
}

.message-content p {
    margin-bottom: 2px;
}

/* Markdown стили */
.message-content strong {
    font-weight: 600;
    color: #fff;
}

.message-content em {
    font-style: italic;
    color: #79d3d3;
}

.message-content h1,
.message-content h2,
.message-content h3 {
    color: #ffffff;
    margin: 4px 0 2px 0;
    font-weight: 600;
}

.message-content h1 { font-size: 20px; }
.message-content h2 { font-size: 17px; }

/* AI Status Message */
.ai-status {
    display: inline-flex;
    align-items: center;
    width: 200px;
    padding: 8px 16px;
    border: 1px solid #444;
    border-radius: 8px;
    color: #888;
    font-size: 13px;
    background: transparent;
}

.ai-status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #888;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.export-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: opacity 0.2s;
}

.export-btn:hover {
    opacity: 1;
}
.message-content h3 { font-size: 15px; }

.message-content code {
    background: #1a1a1a;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #10b981;
}

.message-content li {
    margin-left: 15px;
    margin-bottom: 1px;
    list-style-type: disc;
}

.message-content ul,
.message-content ol {
    margin: 2px 0;
    padding-left: 0;
}

/* Suggestions внутри сообщения AI */
.message-suggestions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(124, 195, 228, 0.2);
    align-items: flex-start;
}
