/* =================================
   EPIC CSS для FAQ/Wiki страницы
   /assets/css/pages/info-faq.css
   ================================= */

/* CSS Variables для темной темы */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --border-color: #e9ecef;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-primary: #1a1d23;
    --bg-secondary: #252a31;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --border-color: #374151;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Hero Section */
.faq-hero {
    background: var(--primary-gradient);
    position: relative;
    overflow: hidden;
    padding: 120px 0 80px;
    min-height: 80vh;
}

.faq-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="faq" width="30" height="30" patternUnits="userSpaceOnUse"><circle cx="15" cy="15" r="8" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/><text x="15" y="19" font-family="Arial" font-size="10" fill="rgba(255,255,255,0.05)" text-anchor="middle">?</text></pattern></defs><rect width="100" height="100" fill="url(%23faq)"/></svg>');
    opacity: 0.6;
    animation: backgroundFloat 20s ease-in-out infinite;
}

.faq-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 12px 28px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.faq-badge i {
    margin-right: 10px;
    font-size: 18px;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Search Container */
.search-container {
    margin-top: 40px;
    position: relative;
}

.search-box {
    position: relative;
    flex: 1;
}

.search-container {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-box input {
    width: 100%;
    padding: 18px 20px 18px 55px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-box input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
}

.search-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 18px 24px;
    color: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.search-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    margin-top: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
}

.suggestion-item {
    padding: 12px 20px;
    color: #2c3e50;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.suggestion-item:hover {
    background: rgba(102, 126, 234, 0.1);
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* Popular Searches */
.popular-searches {
    margin-top: 25px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.popular-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    margin-right: 10px;
}

.popular-tag {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 6px 16px;
    color: white;
    font-size: 13px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.popular-tag:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Knowledge Stats */
.hero-visual {
    position: relative;
    z-index: 2;
}

.knowledge-stats {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 30px;
    animation: float 4s ease-in-out infinite 1s;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-header h6 {
    color: white;
    margin: 0;
    font-weight: 600;
    font-size: 16px;
}

.update-indicator {
    display: flex;
    align-items: center;
    color: #4ade80;
    font-size: 12px;
    font-weight: 500;
}

.update-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4ade80, #22c55e);
}

.stat-number {
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

.stat-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 20px;
}

/* Quick Help */
.quick-help {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.help-title {
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.help-buttons {
    display: grid;
    gap: 10px;
}

.help-btn {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.help-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(5px);
}

.help-btn i {
    margin-right: 10px;
    font-size: 16px;
}

.help-btn span {
    font-size: 13px;
    font-weight: 500;
}

/* Popular Questions Section */
.popular-questions {
    padding: 80px 0;
    background: var(--bg-primary);
}

.questions-grid {
    display: grid;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.question-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.question-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.question-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.question-card:hover::before {
    transform: scaleX(1);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.question-title {
    color: var(--text-primary);
    margin: 0;
    font-weight: 600;
    line-height: 1.4;
    flex: 1;
    margin-right: 20px;
}

.question-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.views-count {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 13px;
}

.views-count i {
    margin-right: 5px;
}

.expand-btn {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.expand-btn:hover {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

.expand-btn.expanded {
    transform: rotate(180deg);
    background: #667eea;
    color: white;
}

.question-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    opacity: 0;
}

.question-answer.expanded {
    max-height: 500px;
    opacity: 1;
    padding-top: 15px;
}

.question-answer p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.answer-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 16px;
    color: var(--text-secondary);
    font-size: 13px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.action-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.action-btn i {
    margin-right: 6px;
}

.action-btn.helpful:hover {
    background: #22c55e;
    border-color: #22c55e;
}

.action-btn.helpful.active {
    background: #22c55e;
    color: white;
    border-color: #22c55e;
}

/* Categories Section */
.categories-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.category-card {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 30px;
    border: 2px solid transparent;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover {
    border-color: #667eea;
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.15);
}

.category-card:hover::before {
    opacity: 0.03;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
}

.article-count {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.category-content {
    position: relative;
    z-index: 2;
}

.category-title {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 600;
}

.category-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.popular-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.tag.more {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.category-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.category-stats {
    display: flex;
    gap: 15px;
}

.stat {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 12px;
}

.stat i {
    margin-right: 5px;
}

.category-arrow {
    color: #667eea;
    font-size: 18px;
    transition: transform 0.3s ease;
}

.category-card:hover .category-arrow {
    transform: translateX(5px);
}

/* Featured Articles Section */
.featured-articles {
    padding: 80px 0;
    background: var(--bg-primary);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.section-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.view-toggle {
    display: flex;
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 4px;
}

.toggle-btn {
    background: transparent;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.toggle-btn.active,
.toggle-btn:hover {
    background: #667eea;
    color: white;
}

.sort-dropdown select {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 16px;
    color: var(--text-primary);
}

/* Articles Container */
.articles-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.articles-container.list-view {
    grid-template-columns: 1fr;
}

.articles-container.list-view .article-card {
    display: flex;
    align-items: center;
    padding: 20px;
}

.articles-container.list-view .article-content {
    margin-left: 20px;
    flex: 1;
}

.article-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.article-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.article-card:hover::before {
    transform: scaleX(1);
}

.article-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.category-badge {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    color: white;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-badge i {
    margin-right: 5px;
}

.difficulty {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.difficulty-beginner {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.difficulty-intermediate {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.difficulty-advanced {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.article-actions {
    display: flex;
    gap: 8px;
}

.bookmark {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.bookmark:hover,
.bookmark.active {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

.article-title {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.4;
}

.article-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.article-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 13px;
}

.stat-item i {
    margin-right: 5px;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Help Center Section */
.help-center {
    padding: 60px 0;
}

.help-options {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.help-option {
    display: flex;
    align-items: center;
    gap: 15px;
}

.help-option i {
    font-size: 24px;
}

.help-option div strong {
    display: block;
    margin-bottom: 2px;
}

.help-option div small {
    opacity: 0.8;
}

/* Article Modal */
.modal-xl .modal-content {
    height: 90vh;
}

.article-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.modal-breadcrumb {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.modal-breadcrumb .active {
    color: var(--text-primary);
    font-weight: 600;
}

.modal-tools {
    display: flex;
    gap: 10px;
}

.tool-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.tool-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.article-content-container {
    display: flex;
    height: 70vh;
    gap: 30px;
}

.article-sidebar {
    width: 250px;
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 25px;
    height: fit-content;
}

.table-of-contents h6 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-weight: 600;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    margin-bottom: 8px;
}

.table-of-contents a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.table-of-contents a:hover,
.table-of-contents a.active {
    color: #667eea;
}

.article-info {
    margin-top: 25px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 13px;
}

.info-label {
    color: var(--text-secondary);
}

.info-value {
    color: var(--text-primary);
    font-weight: 500;
}

.article-main {
    flex: 1;
    overflow-y: auto;
}

.article-body {
    background: var(--bg-primary);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    line-height: 1.7;
}

.article-body h1, .article-body h2, .article-body h3 {
    color: var(--text-primary);
    margin-top: 30px;
    margin-bottom: 15px;
}

.article-body p {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.article-body code {
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
}

.article-body pre {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
}

.article-feedback {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.article-feedback h6 {
    color: var(--text-primary);
    margin-bottom: 15px;
}

.feedback-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.feedback-btn {
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 20px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    cursor: pointer;
}

.feedback-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.feedback-btn.positive:hover,
.feedback-btn.positive.active {
    border-color: #22c55e;
    color: #22c55e;
    background: rgba(34, 197, 94, 0.05);
}

.feedback-btn.negative:hover,
.feedback-btn.negative.active {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.feedback-btn i {
    margin-right: 8px;
}

.related-articles {
    background: var(--bg-secondary);
    border-radius: 15px;
    padding: 25px;
}

.related-articles h6 {
    color: var(--text-primary);
    margin-bottom: 15px;
}

.related-list {
    display: grid;
    gap: 15px;
}

.related-item {
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.related-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Live Chat Widget */
.live-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    background: var(--bg-primary);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow: hidden;
    transition: all 0.3s ease;
}

.chat-header {
    background: var(--primary-gradient);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.chat-title {
    display: flex;
    align-items: center;
}

.chat-title i {
    margin-right: 10px;
    font-size: 18px;
}

.chat-status {
    display: flex;
    align-items: center;
    font-size: 12px;
}

.chat-status .status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    margin-right: 6px;
    animation: pulse 2s infinite;
}

.chat-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.chat-body {
    height: 400px;
    display: flex;
    flex-direction: column;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.chat-body.expanded {
    transform: translateY(0);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.message {
    display: flex;
    margin-bottom: 15px;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    margin-right: 10px;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
}

.message-content p {
    background: var(--bg-secondary);
    padding: 10px 15px;
    border-radius: 15px;
    margin: 0 0 10px 0;
    color: var(--text-primary);
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-avatar {
    background: #22c55e;
    margin-left: 10px;
    margin-right: 0;
}

.user-message .message-content p {
    background: #667eea;
    color: white;
}

.quick-replies {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.quick-reply {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 8px 12px;
    color: var(--text-secondary);
    font-size: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: left;
}

.quick-reply:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.chat-input {
    display: flex;
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    gap: 10px;
}

.chat-input input {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 10px 15px;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.chat-input input:focus {
    outline: none;
    border-color: #667eea;
}

.chat-send {
    background: #667eea;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.chat-send:hover {
    background: #5a67d8;
    transform: scale(1.1);
}

/* Floating Actions */
.floating-actions {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999;
}

.fab-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.fab-menu.active {
    opacity: 1;
    transform: translateY(0);
}

.fab-item {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.fab-item:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: scale(1.1);
}

.fab-main {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-gradient);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.3);
}

.fab-main:hover {
    transform: scale(1.1);
}

.fab-main.active {
    transform: rotate(45deg);
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes backgroundFloat {
    0%, 100% {
        transform: translateX(0px);
    }
    50% {
        transform: translateX(20px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* Dark Theme Specific Styles */
[data-theme="dark"] {
    color-scheme: dark;
}

[data-theme="dark"] .search-box input {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .search-suggestions {
    background: rgba(30, 41, 59, 0.95);
}

[data-theme="dark"] .suggestion-item {
    color: #e2e8f0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .faq-hero {
        padding: 80px 0 60px;
        min-height: 70vh;
    }
    
    .search-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .popular-searches {
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .articles-container {
        grid-template-columns: 1fr;
    }
    
    .help-options {
        flex-direction: column;
        gap: 20px;
    }
    
    .article-content-container {
        flex-direction: column;
        height: auto;
    }
    
    .article-sidebar {
        width: 100%;
        order: 2;
    }
    
    .live-chat-widget {
        width: calc(100vw - 40px);
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
}

@media (max-width: 576px) {
    .faq-hero,
    .popular-questions,
    .categories-section,
    .featured-articles {
        padding: 60px 0;
    }
    
    .knowledge-stats,
    .question-card,
    .category-card,
    .article-card {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .floating-actions {
        bottom: 100px;
    }
    
    .question-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .question-meta {
        align-self: flex-end;
    }
}

/* Print Styles */
@media print {
    .faq-hero,
    .floating-actions,
    .live-chat-widget,
    .section-actions,
    .article-actions,
    .help-center {
        display: none !important;
    }
    
    .article-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .category-card,
    .article-card,
    .question-card {
        border-width: 3px;
    }
}