/* CSS Variables and Base Styles */
:root {
    --primary-color: #6366f1;
    --primary-hover: #5145e3;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --text-primary: #ffffff;
    --text-secondary: #d1d5db;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #334155;
    --border-color: #475569;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: var(--transition);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

/* Lists */
ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* Code */
code {
    font-family: 'Courier New', Courier, monospace;
    background-color: var(--bg-secondary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.875em;
    color: var(--text-primary);
}

pre {
    background-color: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

pre code {
    background: none;
    padding: 0;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

td {
    color: var(--text-secondary);
}

/* Form Elements */
input, textarea, select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: inherit;
    transition: var(--transition);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Blockquotes */
blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 1rem 1rem 1rem 2rem;
    border-radius: 0 8px 8px 0;
}

/* Horizontal Rule */
hr {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin: 2rem 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.bg-primary { background: var(--bg-primary); }
.bg-secondary { background: var(--bg-secondary); }
.bg-card { background: var(--bg-card); }
.border-radius { border-radius: var(--border-radius); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* Dark mode transition */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Header and Navigation */
header {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-mobile {
    display: flex;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
}

.logo img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0;
}

.nav-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

/* Language Switcher */
.lang-switcher {
    position: relative;
}

.lang-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 6px 12px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
}

.lang-toggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    z-index: 1000;
    overflow: hidden;
}

.lang-dropdown.active {
    display: block;
}

.lang-option {
    display: block;
    padding: 10px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.lang-option:hover {
    background: var(--bg-secondary);
}

.lang-option.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.burger-btn {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    gap: 4px;
}

.burger-btn span {
    width: 24px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.burger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger-btn.active span:nth-child(2) {
    opacity: 0;
}

.burger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Footer */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    margin-top: auto;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    text-align: center;
    justify-content: center;
}

.btn-primary, .website-link {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover, .website-link:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    color: white;
}

.btn-secondary, .github-link {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover, .github-link:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.btn-telegram, .telegram-link {
    background: #0088cc;
    color: white;
}

.btn-telegram:hover, .telegram-link:hover {
    background: #006ba3;
    color: white;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Project Cards */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    box-shadow: var(--shadow-md);
    animation: fadeInUp 0.6s ease-out forwards;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.project-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-title, .project-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.project-info {
    padding: 1.5rem;
    display: block;
    position: relative;
    background-color: var(--bg-card);
}

.project-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.project-info p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-advantages, .project-info ul {
    list-style: none;
    margin-bottom: 1.5rem;
    padding: 0;
}

.project-advantages li, .project-info ul li {
    padding: 0.25rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.project-advantages li:before, .project-info ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

/* Chat Cards */
.chat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.chat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.chat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.chat-card img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 1rem;
    object-fit: cover;
}

.chat-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.chat-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

/* Sections and Layout */
main {
    flex: 1;
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero, .intro {
    text-align: center;
    margin-bottom: 4rem;
    padding: 2rem 0;
}

.hero h2, .intro h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p, .intro p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.chat-section, .resources-section {
    margin: 4rem 0;
}

.resources-section, .outro {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin: 4rem 0;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.resource-link, .resource-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    display: block;
    box-shadow: var(--shadow-sm);
}

.resource-link:hover, .resource-card:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.resource-card h3 {
    margin-bottom: 1rem;
    color: inherit;
}

.resource-card p {
    color: inherit;
    opacity: 0.9;
    line-height: 1.6;
}

/* Tags */
.tags {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.tags span {
    font-weight: bold;
    margin-right: 0.5rem;
    color: var(--text-primary);
}

.tags a, .tags-list a {
    display: inline-block;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.2rem 0.5rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
    border-radius: 4px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.tags a:hover, .tags-list a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.tags-list {
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.pagination-numbers {
    display: flex;
    gap: 0.5rem;
}

.pagination-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
}

.pagination-btn:hover {
    background: var(--primary-hover);
    color: white;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 0.75rem 1rem;
    margin: 0 0.25rem;
    text-decoration: none;
    color: var(--text-primary);
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
}

.pagination a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .current-page {
    font-weight: bold;
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    margin: 2rem 0;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Telegram Link */
.telegram-link-container {
    text-align: center;
    margin-bottom: 2rem;
}

.telegram-link {
    display: inline-block;
    background-color: #0088cc;
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.telegram-link:hover {
    background-color: #0077b5;
    color: #fff;
}

/* Blog Page Styles */
.blog-container {
    max-width: 900px;
    margin: 0 auto;
}

.post-list {
    list-style: none;
    padding: 0;
    max-width: 800px;
    margin: 2rem auto 0;
}

.post-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.post-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.post-image-container {
    position: relative;
    height: 250px;
    overflow: hidden;
    width: 100%;
}

.post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.post-item:hover .post-image {
    transform: scale(1.05);
}

.post-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: white;
    padding: 2rem 1.5rem 1.5rem;
    z-index: 2;
}

.post-title-preview {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    line-height: 1.3;
    color: white;
    margin: 0;
}

.post-meta-overlay {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.post-image-placeholder {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, var(--bg-secondary), var(--border-color));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.placeholder-content {
    text-align: center;
    color: var(--text-primary);
    padding: 2rem;
    max-width: 100%;
}

.placeholder-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.placeholder-content .post-title-preview {
    color: var(--text-primary);
    text-shadow: none;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.placeholder-content .post-meta-overlay {
    color: var(--text-secondary);
    text-shadow: none;
    justify-content: center;
    margin-top: 0.5rem;
}

.post-details {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 1rem;
    flex: 1;
}

.reading-time {
    font-style: italic;
    opacity: 0.8;
}

.read-more-btn {
    align-self: flex-start;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

.post {
    max-width: 800px;
    margin: 2rem auto 0;
    padding: 0 1rem;
}

.post img {
    max-width: 100%;
    height: auto;
    margin: 2rem auto;
    display: block;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.post-content {
    margin-top: 2rem;
    color: var(--text-primary);
}

.post-content h1, .post-content h2, .post-content h3,
.post-content h4, .post-content h5, .post-content h6 {
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.post-content ul, .post-content ol {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
}

/* FAQ Page Styles */
.faq-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    overflow-x: hidden;
}

.faq-section {
    margin-bottom: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    position: relative;
}

.faq-section summary {
    padding: 1.5rem;
    cursor: pointer;
    list-style: none;
    background: var(--bg-secondary);
    transition: var(--transition);
    box-sizing: border-box;
    width: 100%;
}

.faq-section summary:hover {
    background: var(--primary-color);
    color: white;
}

.faq-section summary::-webkit-details-marker {
    display: none;
}

.faq-section summary h2 {
    margin: 0;
    padding-right: 2rem;
    position: relative;
}

.faq-section summary h2::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    transition: var(--transition);
}

.faq-section[open] summary h2::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-section-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.question-count {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
}

.faq-links {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-sizing: border-box;
    width: 100%;
}

.faq-link {
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.75rem;
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.faq-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(8px);
    border-color: var(--primary-color);
}

.faq-link-title {
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.faq-link-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: block;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin: 2rem 0;
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* FAQ Article */
.faq-article {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.faq-breadcrumbs {
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.faq-breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
}

.faq-breadcrumbs a:hover {
    text-decoration: underline;
}

.faq-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.prev-faq, .next-faq {
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.prev-faq:hover, .next-faq:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.faq-content {
    margin-bottom: 2rem;
}

/* Bot Sources Page Styles */
.sources-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

.sources-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--text-secondary);
    font-weight: 500;
}

.sources-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.source-card {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.source-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.source-card-header {
    position: relative;
    height: 180px;
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.source-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
}

.source-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.source-info {
    padding: 1.5rem;
    flex: 1;
}

.source-info h2 {
    margin: 0 0 1rem;
    color: var(--text-primary);
}

.source-description {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.source-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.feature-tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    border: 1px solid var(--border-color);
}

.source-link {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition);
}

.source-link:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    color: white;
}

.additional-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.info-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.info-card ul {
    color: var(--text-secondary);
    line-height: 1.6;
}

.info-card li {
    margin-bottom: 0.5rem;
}

/* Download Page Styles */
.download-content {
    max-width: 1000px;
    margin: 0 auto;
}

.intro-section, .advantages-section, .platforms-section, 
.guide-section, .faq-section, .resources-section {
    margin: 4rem 0;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.advantage-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.advantage-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.advantage-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.advantage-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.advantage-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.platforms-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.platform-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.platform-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.platform-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.platform-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.platform-advantages {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.advantage-tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    border: 1px solid var(--border-color);
}

.platform-links {
    display: flex;
    gap: 1rem;
}

.steps-container {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.step-card:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.step-number {
    background: var(--primary-color);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.step-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.step-tips {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.step-tips strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
}

.step-tips ul {
    margin: 0;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.step-tips li {
    margin-bottom: 0.25rem;
}

.code-example {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.code-example code {
    font-family: 'Courier New', Courier, monospace;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.faq-item summary {
    padding: 1.5rem;
    cursor: pointer;
    list-style: none;
    background: var(--bg-secondary);
    transition: var(--transition);
    font-weight: 600;
    color: var(--text-primary);
}

.faq-item summary:hover {
    background: var(--primary-color);
    color: white;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item[open] summary {
    border-bottom: 1px solid var(--border-color);
}

.faq-item p, .faq-item ul {
    padding: 1.5rem;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-item ul {
    padding-left: 3rem;
}

.faq-item li {
    margin-bottom: 0.5rem;
}

.faq-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.faq-item a:hover {
    text-decoration: underline;
}



/* Mobile Responsive Styles */

/* Tablet Breakpoint */
@media (max-width: 1024px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .platforms-comparison {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Breakpoint */
@media (max-width: 768px) {
    /* Header Mobile */
    .header-content {
        padding: 1rem;
    }

    .logo {
        margin-left: 0;
        padding-left: 10px;
        font-size: 14px;
    }

    .logo h1 {
        font-size: 14px;
        margin: 0;
        text-align: left;
    }

    .logo img {
        width: 30px;
        height: 30px;
    }

    .burger-btn {
        display: flex;
        margin-left: 10px;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        border-top: 1px solid var(--border-color);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu a {
        padding: 1rem;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
        border-radius: 0;
    }

    .nav-menu a:last-child {
        border-bottom: none;
    }

    /* Main Content Mobile */
    main {
        padding: 2rem 1rem;
    }

    .hero h2, .intro h2 {
        font-size: 2rem;
    }

    .hero p, .intro p {
        font-size: 1rem;
    }

    /* Project Grid Mobile */
    .project-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        order: 2;
    }
    
    .project-card:has(img[src*="stocksharp"]) {
        order: 1;
    }

    .project-card img {
        height: 200px;
    }

    .project-title, .project-title-overlay {
        display: none;
    }

    .project-info {
        display: block;
        position: static;
        background-color: transparent;
    }

    .project-links {
        flex-direction: column;
        position: static;
    }

    .btn, .website-link, .github-link, .telegram-link {
        text-align: center;
        justify-content: center;
        margin-bottom: 0.5rem;
    }

    /* Chat Grid Mobile */
    .chat-grid {
        grid-template-columns: 1fr;
    }

    /* Resources Grid Mobile */
    .resources-grid {
        grid-template-columns: 1fr;
    }

    /* Blog Mobile */
    .blog-container {
        padding: 0 1rem;
    }

.post-item {
    margin-bottom: 20px;
}

.post-image-container {
    height: 200px;
}

.post-image-overlay {
    padding: 1.5rem 1rem 1rem;
}

.post-title-preview {
    font-size: 1.1rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.post-meta-overlay {
    font-size: 0.8rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.post-image-placeholder {
    height: 200px;
}

.placeholder-content {
    padding: 1rem;
}

.placeholder-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.placeholder-content .post-title-preview {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.placeholder-content .post-meta-overlay {
    font-size: 0.8rem;
    flex-direction: column;
    gap: 0.25rem;
}

.post-details {
    padding: 1rem;
}

.post-excerpt {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.read-more-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

    .post-content pre {
        font-size: 12px;
        padding: 0.5rem;
    }
    
    .post-content code {
        word-break: break-word;
    }

    .post-content img {
        width: 100%;
        object-fit: contain;
    }

    /* Pagination Mobile */
    .pagination {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .pagination-numbers {
        order: 2;
        justify-content: center;
        flex-wrap: wrap;
    }

    .pagination a, .pagination span {
        margin: 0.25rem;
        padding: 0.5rem 0.75rem;
    }

    /* FAQ Mobile */
    .faq-container {
        padding: 1rem;
    }

    .faq-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .faq-item summary {
        padding: 1rem;
    }
    
    .faq-item p, .faq-item ul {
        padding: 1rem;
    }
    
    .faq-item ul {
        padding-left: 2rem;
    }

    /* Bot Sources Mobile */
    .sources-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .stat-card h3 {
        font-size: 2rem;
    }
    
    .source-card {
        flex-direction: column;
    }
    
    .source-image {
        width: 100%;
        height: 160px;
    }
    
    .source-info {
        padding: 1rem;
    }
    
    .additional-info {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .info-card {
        padding: 1.5rem;
    }

    /* Download Page Mobile */
    .advantages-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .advantage-card {
        padding: 1.5rem;
    }
    
    .platforms-comparison {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .step-card {
        flex-direction: column;
        gap: 1rem;
    }
    
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        align-self: flex-start;
    }
    
    .step-tips {
        padding: 0.75rem;
    }

    .resource-card {
        padding: 1.5rem;
    }

    /* Video Container Mobile */
    .video-container {
        margin: 1rem 0;
    }

    /* Tags Mobile */
    .tags-list {
        gap: 0.25rem;
    }

    .tags a, .tags-list a {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    /* General Mobile Adjustments */
    .section-title {
        font-size: 1.5rem;
    }

    .outro h3, .outro h4 {
        font-size: 1.25rem;
    }

    .outro ol {
        padding-left: 1rem;
    }

}

/* Small Mobile Breakpoint */
@media (max-width: 480px) {
    .header-content {
        padding: 0.75rem;
    }

    .logo h1 {
        font-size: 12px;
    }

    .logo-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    main {
        padding: 1.5rem 0.75rem;
    }

    .hero h2, .intro h2 {
        font-size: 1.5rem;
    }

    .hero p, .intro p {
        font-size: 0.9rem;
    }

    .project-card, .chat-card, .card, .stat-card {
        padding: 1rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .post-item {
        padding: 0.75rem;
    }

    .faq-section summary {
        padding: 1rem;
    }

    .faq-links {
        padding: 1rem;
    }

    .faq-link {
        padding: 0.5rem;
    }

    .step-card {
        padding: 1rem;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .advantage-card, .platform-card, .info-card {
        padding: 1rem;
    }

    .source-info {
        padding: 1rem;
    }

    .pagination {
        padding: 1rem;
    }

    .pagination a, .pagination span {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

/* Extra Small Breakpoint */
@media (max-width: 320px) {
    .logo h1 {
        display: none;
    }

    .hero h2, .intro h2 {
        font-size: 1.25rem;
    }

    .section-title {
        font-size: 1.125rem;
    }

    .project-card, .chat-card, .card {
        padding: 0.75rem;
    }

    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero h2, .intro h2 {
        font-size: 1.75rem;
    }

    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .chat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-icon {
        background-size: contain;
    }
    
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

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

    .project-card:hover,
    .chat-card:hover,
    .card:hover,
    .btn:hover {
        transform: none;
    }
}

/* Dark Mode Preference */
@media (prefers-color-scheme: dark) {
    body:not([data-theme]) {
        --text-primary: #ffffff;
        --text-secondary: #d1d5db;
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --bg-card: #334155;
        --border-color: #475569;
        --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
        --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    }
}

/* Language Picker Page */
.lang-picker {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.lang-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    justify-items: center;
}

.lang-picker-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    width: 100%;
    max-width: 240px;
}

.lang-picker-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.lang-picker-flag {
    font-size: 3rem;
}

.lang-picker-name {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Print Styles */
@media print {
    header, footer, .theme-toggle, .burger-btn, .nav-menu, .lang-switcher {
        display: none;
    }

    body {
        background: white;
        color: black;
        font-size: 12pt;
        line-height: 1.4;
    }

    .project-card, .chat-card, .card {
        break-inside: avoid;
        border: 1px solid #ddd;
        margin-bottom: 1rem;
    }

    .hero h2, .intro h2 {
        color: black;
        background: none;
        -webkit-text-fill-color: initial;
    }

    .btn {
        border: 1px solid #333;
        background: white;
        color: black;
    }

    a {
        color: black;
        text-decoration: underline;
    }

    .project-links::after {
        content: " (см. веб-версию для ссылок)";
        font-style: italic;
    }
}

/* Post Header and Meta */
.post-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    position: static;
}

.post-header h1 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 2.5rem;
    line-height: 1.2;
}

.post-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.post-author {
    font-weight: 500;
}

.reading-time {
    font-style: italic;
}

.post-featured-image {
    margin-bottom: 2rem;
    text-align: center;
}

.post-featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

/* Post Tags */
.post-tags {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.tags-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 1rem;
}

.tag-link {
    display: inline-block;
    background: var(--bg-card);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    margin: 0.25rem 0.25rem 0.25rem 0;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.tag-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Social Sharing */
.post-sharing {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    text-align: center;
}

.post-sharing h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.sharing-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    min-width: 120px;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.share-btn.telegram {
    background: #0088cc;
    color: white;
}

.share-btn.telegram:hover {
    background: #006ba3;
    color: white;
}

.share-btn.twitter {
    background: #1da1f2;
    color: white;
}

.share-btn.twitter:hover {
    background: #0d8bd9;
    color: white;
}

.share-btn.facebook {
    background: #1877f2;
    color: white;
}

.share-btn.facebook:hover {
    background: #166fe5;
    color: white;
}

.share-btn.vkontakte {
    background: #4c75a3;
    color: white;
}

.share-btn.vkontakte:hover {
    background: #45688e;
    color: white;
}

.share-btn.linkedin {
    background: #0077b5;
    color: white;
}

.share-btn.linkedin:hover {
    background: #005885;
    color: white;
}

.share-btn.copy-link {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.share-btn.copy-link:hover {
    background: var(--text-primary);
    color: var(--bg-card);
    border-color: var(--text-primary);
}

/* Related Posts */
.related-posts {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.related-posts h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: center;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.related-post-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.related-post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.related-post-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.related-post-placeholder {
    width: 100%;
    height: 120px;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.related-post-content {
    padding: 1rem;
}

.related-post-content h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.3;
}

.related-post-content h4 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.related-post-content h4 a:hover {
    color: var(--primary-color);
}

.related-post-content time {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 3rem 0;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    gap: 1rem;
}

.nav-previous, .nav-next {
    flex: 1;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    font-weight: 500;
}

.nav-previous {
    text-align: left;
}

.nav-next {
    text-align: right;
}

.nav-previous:hover, .nav-next:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Comments Section */
.post-comments {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.post-comments h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.post-comments p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.post-comments a {
    color: var(--primary-color);
    font-weight: 500;
}

.post-comments a:hover {
    text-decoration: underline;
}

/* Download page */
.download-container {
  max-width: 900px;
  margin: 2rem auto;
}

.download-card {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  background: var(--bg-card);
  transition: border-color 0.2s;
}

.download-card:hover {
  border-color: var(--primary-color);
}

.download-card-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.download-logo {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.download-card-header h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
}

.download-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.download-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0;
}

.download-tags .tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  background: var(--bg-secondary);
  border-radius: 4px;
  color: var(--text-secondary);
}

.download-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.download-links a {
  font-size: 0.85rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.download-links a:hover {
  text-decoration: underline;
}

#comments {
    margin-top: 2rem;
    min-height: 100px;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

/* Copy Message Animation */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .post-header h1 {
        font-size: 1.75rem;
    }

    .post-meta {
        flex-direction: column;
        gap: 0.25rem;
    }

    .sharing-buttons {
        flex-direction: column;
        align-items: center;
    }

    .share-btn {
        width: 100%;
        max-width: 280px;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .post-navigation {
        flex-direction: column;
    }

    .nav-previous, .nav-next {
        width: 100%;
        text-align: center;
    }

    .post-sharing, .related-posts, .post-navigation, .post-comments {
        padding: 1.5rem;
        margin: 2rem 0;
    }

    .post-tags {
        padding: 1rem;
    }

    .tags-label {
        display: block;
        margin-bottom: 0.5rem;
        margin-right: 0;
    }

}

@media (max-width: 480px) {
    .post-header {
        padding-bottom: 1.5rem;
    }

    .post-header h1 {
        font-size: 1.5rem;
    }

    .share-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .related-post-content {
        padding: 0.75rem;
    }

    .post-navigation {
        padding: 1rem;
    }

    .nav-previous, .nav-next {
        padding: 0.75rem;
        font-size: 0.875rem;
    }

}