/* style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #0a0a0a;
    color: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
}

button,
input,
textarea,
a {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

.header {
    display: flex;
    align-items: center;
    padding: 16px 0;
    min-height: 70px;
    width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10%;
}

.burger-btn {
    flex-shrink: 0;
}

.logo {
    display: block;
    line-height: 1;
}
.logo img {
    display: block;
    height: 32px;
    width: auto;
}

.header-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #1e1e1e;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    padding: 0;
    color: #ccc;
}
.icon-btn:hover {
    background: #2a2a2a;
}
.icon-btn svg {
    width: 24px;
    height: 24px;
    stroke: #ccc;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.content-wrapper {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

/* ===== Стили для главной страницы ===== */
body.home-page .content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 70vh;
    padding-top: 20px;
}

body.home-page .home-hero {
    text-align: center;
    padding: 60px 0 40px;
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
}

body.home-page .home-hero h1 {
    font-size: 50px;
    font-weight: 400;
    letter-spacing: -1px;
    line-height: 1.2;
    margin-bottom: 20px;
}

body.home-page .home-hero p {
    font-size: 18px;
    color: #aaa;
    line-height: 1.6;
    margin-bottom: 30px;
    font-weight: 400;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
}
.search-input-wrapper .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    stroke: #888;
    width: 20px;
    height: 20px;
    fill: none;
}
.search-input-wrapper input {
    width: 100%;
    padding: 14px 50px 14px 48px;
    border-radius: 25px;
    border: 1px solid #444;
    background: #141414;
    color: #fff;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    outline: none;
    transition: border 0.3s, box-shadow 0.3s;
    flex: 1;
}
.search-input-wrapper input:focus {
    border-color: #888;
    box-shadow: 0 0 0 3px rgba(136, 136, 136, 0.15);
}
.search-input-wrapper input::placeholder {
    color: #666;
}
.search-input-wrapper .search-submit {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    transition: color 0.2s;
    flex-shrink: 0;
}
.search-input-wrapper .search-submit:hover {
    color: #fff;
}
.search-input-wrapper .search-submit svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
@media (max-width: 640px) {
    .search-input-wrapper {
        max-width: 100%;
    }
    .search-input-wrapper input {
        padding: 18px 44px 18px 40px;
        border-radius: 25px;
        font-size: 15px;
    }
    .search-input-wrapper .search-submit svg {
        width: 20px;
        height: 20px;
    }
    .logo img {
        height: 24px !important;
    }
}

body.home-page .popular-accounts {
    text-align: center;
    width: 100%;
    max-width: 1200px;
    margin: 40px auto 60px;
}

body.home-page .popular-accounts h2 {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 20px;
}

body.home-page .popular-scroll-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #1e1e1e transparent;
    transition: scrollbar-color 0.3s ease;
}
body.home-page .popular-scroll-wrapper:hover {
    scrollbar-color: #555 transparent;
}
body.home-page .popular-scroll-wrapper::-webkit-scrollbar {
    height: 6px;
}
body.home-page .popular-scroll-wrapper::-webkit-scrollbar-track {
    background: transparent;
}
body.home-page .popular-scroll-wrapper::-webkit-scrollbar-thumb {
    background: #1e1e1e;
    border-radius: 6px;
    transition: background 0.3s ease;
}
body.home-page .popular-scroll-wrapper:hover::-webkit-scrollbar-thumb {
    background: #555;
}

body.home-page .popular-grid {
    display: flex;
    gap: 14px;
    padding: 0 4px;
    width: max-content;
    margin: 0 auto;
}

body.home-page .popular-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #f5f5f5;
    padding: 8px 12px;
    border-radius: 12px;
    transition: background 0.2s;
    flex-shrink: 0;
    width: 80px;
}
body.home-page .popular-item:hover {
    background: transparent;
}
body.home-page .popular-item .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1e1e1e;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    transition: border 0.3s ease;
    border: 1px solid transparent;
}
body.home-page .popular-item:hover .avatar {
    border-color: #555;
}
body.home-page .popular-item .avatar svg {
    width: 24px;
    height: 24px;
    stroke: #888;
}
body.home-page .popular-item .name {
    font-size: 12px;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}
body.home-page .popular-item .handle {
    font-size: 10px;
    color: #888;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
    font-weight: 400;
}

body.home-page .footer {
    text-align: center;
    width: 100%;
}

/* ===== Стили для страниц профиля ===== */

.profile-card {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 20px 0;
    margin: 0 0 25px 0;
    max-width: 700px;
}
.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #1e1e1e;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-avatar svg {
    width: 44px;
    height: 44px;
    stroke: #888;
}
.profile-info {
    flex: 1;
    min-width: 180px;
    text-align: left;
}
.profile-info h2 {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 2px;
}
.profile-info .username {
    color: #888;
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 6px;
}
.profile-info .bio {
    color: #aaa;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    max-width: 500px;
    margin-bottom: 8px;
}
.profile-info .stats {
    display: flex;
    gap: 28px;
    font-size: 14px;
    color: #999;
    font-weight: 400;
}
.profile-info .stats span {
    font-weight: 500;
    color: #fff;
}

.tabs {
    display: flex;
    gap: 24px;
    margin-bottom: 30px;
    padding: 0;
    border: none;
    justify-content: flex-start;
    border-bottom: 1px solid #2a2a2a;
}
.tab {
    padding: 8px 0;
    background: transparent;
    color: #888;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 400;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
    position: relative;
}
.tab:hover {
    color: #fff;
}
.tab.active {
    color: #fff;
    font-weight: 400;
}
.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #fff;
}

.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}
#tabContentPublications,
#tabContentStories {
    width: 100%;
    padding: 0;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 4px;
    margin-top: 0;
}

.card {
    position: relative;
    background: #121212;
    border-radius: 0;
    overflow: hidden;
    cursor: pointer;
    border: none;
    transition: none;
}
.card:hover {
    border: none;
}
.card-media {
    width: 100%;
    aspect-ratio: 9 / 16;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.card-media img.loaded {
    opacity: 1;
}
.card-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}
.card-loader .spinner {
    border: 3px solid #1e1e1e;
    border-top: 3px solid #888;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 1px 4px rgba(0,0,0,0.6));
}
.card-badge svg {
    width: 100%;
    height: 100%;
    display: block;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(2px);
    padding: 12px 14px;
    transform: translateY(100%);
    transition: transform 0.25s ease, opacity 0.25s ease;
    opacity: 0;
    pointer-events: none;
    overflow-y: auto;
    z-index: 2;
    scrollbar-width: thin;
    scrollbar-color: #1e1e1e transparent;
}
.card-overlay::-webkit-scrollbar {
    width: 4px;
}
.card-overlay::-webkit-scrollbar-track {
    background: transparent;
}
.card-overlay::-webkit-scrollbar-thumb {
    background: #1e1e1e;
    border-radius: 4px;
}
.card-overlay:hover::-webkit-scrollbar-thumb {
    background: #555;
}
.card:hover .card-overlay {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.3s;
    pointer-events: auto;
}
.card-overlay .caption {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: #eee;
    overflow: visible;
    display: block;
}
.card-overlay .date {
    font-size: 12px;
    font-weight: 400;
    color: #aaa;
    margin-top: 4px;
}

/* Оверлеи */
.menu-overlay,
.modal-overlay,
.modal-overlay-search,
.modal-overlay-lang {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.menu-overlay.open,
.modal-overlay.active,
.modal-overlay-search.active,
.modal-overlay-lang.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-overlay,
.modal-overlay-search,
.modal-overlay-lang {
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay-search,
.modal-overlay-lang {
    z-index: 1001;
}

.side-menu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100%;
    background: #0c0c0ca1;
    z-index: 9999;
    padding: 20px;
    transition: left 0.3s ease, opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    opacity: 0;
    box-shadow: none;
    border: none;
}
.side-menu.open {
    left: 0;
    opacity: 1;
}

.lang-panel {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100%;
    background: #0c0c0ca1;
    z-index: 9999;
    padding: 20px;
    transition: right 0.3s ease, opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    opacity: 0;
    box-shadow: none;
    border: none;
    overflow: hidden;
}
.lang-panel.open {
    right: 0;
    opacity: 1;
}
.lang-panel .lang-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    margin-right: -4px;
}
.lang-panel .lang-list::-webkit-scrollbar {
    width: 6px;
}
.lang-panel .lang-list::-webkit-scrollbar-track {
    background: transparent;
}
.lang-panel .lang-list::-webkit-scrollbar-thumb {
    background: #1e1e1e;
    border-radius: 6px;
}
.lang-panel .lang-list:hover::-webkit-scrollbar-thumb {
    background: #555;
}
.lang-panel .lang-list {
    scrollbar-color: #1e1e1e transparent;
    transition: scrollbar-color 0.3s ease;
}
.lang-panel .lang-list:hover {
    scrollbar-color: #555 transparent;
}
.lang-panel .lang-item {
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: #eee;
    font-size: 16px;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s;
    font-family: 'Inter', sans-serif;
    width: 100%;
}
.lang-panel .lang-item:hover {
    background: rgba(255,255,255,0.06);
}
.lang-panel .lang-item.active {
    color: #fff;
    font-weight: 500;
}

.modal-box {
    background: #0c0c0ca1;
    padding: 30px 32px;
    max-width: 480px;
    width: 100%;
    position: relative;
    box-shadow: none;
    border: none;
    border-radius: 0;
}

.modal-content {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: #000000;
    border-radius: 0;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal-content.visible {
    opacity: 1;
}

.modal-preloader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: none;
    pointer-events: none;
}
.modal-preloader.active {
    display: block;
}
.modal-preloader .spinner {
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 0.8s linear infinite;
}

.side-menu-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}
.side-menu-close {
    background: transparent;
    border: none;
    color: #ccc;
    cursor: pointer;
    padding: 8px;
}
.side-menu-close svg {
    width: 28px;
    height: 28px;
    stroke: #ccc;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.side-menu-close:hover svg {
    stroke: #fff;
}
.side-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.side-link {
    color: #ccc;
    text-decoration: none;
    font-size: 18px;
    font-weight: 400;
    padding: 12px 16px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}
.side-link:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}
.side-link.active {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.modal-box .modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}
.modal-box .modal-close svg {
    width: 24px;
    height: 24px;
    stroke: #fff;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.modal-box .modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
}

.modal-box .search-input-wrapper {
    max-width: 100%;
    width: 100%;
}
.modal-box .search-input-wrapper input {
    padding: 12px 44px 12px 40px;
    border-radius: 25px;
}

.modal-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 20;
    display: flex;
    gap: 8px;
}
.modal-actions .icon-btn {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    color: #fff;
}
.modal-actions .icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}
.modal-actions .icon-btn svg {
    width: 24px;
    height: 24px;
    stroke: #fff;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#modalMediaContainer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
    width: auto;
    height: auto;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}
#modalMediaContainer img,
#modalMediaContainer video {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
    position: relative;
    background: transparent;
}
#modalMediaContainer.loaded img,
#modalMediaContainer.loaded video {
    opacity: 1;
}

.info-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 30px 24px;
    display: none;
    flex-direction: column;
    justify-content: flex-end;
    z-index: 30;
    color: #fff;
    box-sizing: border-box;
    overflow-y: auto;
}
.info-panel.active {
    display: flex;
}
.info-panel .profile-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}
.info-panel .profile-row .avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.info-panel .profile-row .avatar-placeholder svg {
    width: 28px;
    height: 28px;
    stroke: #888;
}
.info-panel .profile-row .name {
    font-weight: 400;
    font-size: 18px;
}
.info-panel .profile-row .username {
    color: #aaa;
    font-size: 14px;
    font-weight: 400;
}
.info-panel .date {
    color: #aaa;
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 10px;
}
.info-panel .description {
    color: #eee;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 20px;
    word-break: break-word;
}
.info-panel .actions {
    display: flex;
    gap: 20px;
    justify-content: flex-start;
}
.info-panel .actions button {
    background: transparent;
    border: none;
    color: #ccc;
    font-size: 13px;
    font-weight: 400;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.2s;
}
.info-panel .actions button:hover {
    background: rgba(255,255,255,0.06);
}
.info-panel .actions button svg {
    width: 20px;
    height: 20px;
    stroke: #ccc;
    fill: none;
    stroke-width: 2;
}

.info-panel .close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    border: none;
    color: #fff;
    padding: 0;
    transition: background 0.2s;
}
.info-panel .close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}
.info-panel .close-btn svg {
    width: 24px;
    height: 24px;
    stroke: #fff;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.error-message {
    display: none;
    align-items: center;
    gap: 12px;
    background: transparent;
    color: #fff;
    padding: 18px 24px;
    border: 1px solid #666;
    border-radius: 12px;
    margin: 20px 0;
    font-size: 14px;
    font-weight: 400;
}
.error-message.show {
    display: flex;
}
.error-message svg {
    width: 24px;
    height: 24px;
    stroke: #fff;
    stroke-width: 2;
    fill: none;
    flex-shrink: 0;
}
.empty-message {
    color: #555;
    text-align: center;
    padding: 40px 0;
    font-size: 15px;
    font-weight: 400;
}

#globalErrorOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9998;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
}
#globalErrorOverlay.active {
    display: flex;
}
#globalErrorOverlay .modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}
#globalErrorOverlay .modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
}
#globalErrorOverlay .modal-close svg {
    width: 24px;
    height: 24px;
    stroke: #fff;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
#globalErrorOverlay .error-icon {
    width: 64px;
    height: 64px;
    stroke: #fff;
    stroke-width: 2;
    fill: none;
    margin-bottom: 24px;
}
#globalErrorOverlay .error-text {
    color: #fff;
    font-size: 24px;
    font-weight: 400;
    text-align: center;
    max-width: 600px;
    line-height: 1.4;
}

.footer {
    margin-top: 40px;
    padding: 20px 0;
    text-align: left;
    color: #666;
    font-size: 14px;
    font-weight: 400;
}
.footer a {
    color: #888;
    text-decoration: none;
}
.footer a:hover {
    color: #fff;
}

.seo-text {
    max-width: 700px;
    margin: 40px auto 20px;
    font-size: 15px;
    color: #aaa;
    line-height: 1.6;
    text-align: center;
}
.seo-text p {
    margin-bottom: 8px;
}

/* ===== FAQ ===== */
.faq-section,
.faq-page {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.faq-section h2,
.faq-page h1 {
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 40px;
    text-align: center;
    color: #f5f5f5;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.faq-accordion .faq-item {
    border: none;
    transition: border-color 0.2s ease;
    background: transparent;
}
.faq-accordion .faq-item:last-child {
    border-bottom: none;
}
.faq-accordion .faq-question {
    width: 100%;
    padding: 18px 0;
    background: transparent;
    border: none;
    color: #eee;
    font-size: 16px;
    font-weight: 400;
    font-family: 'Inter', sans-serif;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: background 0.2s ease;
    user-select: none;
    text-decoration: none;
}
.faq-accordion .faq-question:hover {
    background: transparent;
}
.faq-accordion .faq-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 31px;
    font-weight: 300;
    color: #888;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease;
    margin-top: -5px;
}
.faq-accordion .faq-question:hover .faq-icon {
    color: #fff;
}
.faq-accordion .faq-item.open .faq-icon {
    transform: rotate(0deg);
    color: #aaa;
}
.faq-accordion .faq-item.open .faq-icon::before {
    content: '−';
}
.faq-accordion .faq-icon::before {
    content: '+';
}
.faq-accordion .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
}
.faq-accordion .faq-item.open .faq-answer {
    max-height: 500px;
}
.faq-accordion .faq-answer-content {
    padding: 0 0 20px 40px;
}
.faq-accordion .faq-answer p {
    color: #aaa;
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
}

.faq-static-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.faq-static-item {
    padding: 18px 0;
    border-bottom: 1px solid #2a2a2a;
}
.faq-static-item:last-child {
    border-bottom: none;
}
.faq-static-question {
    font-size: 18px;
    font-weight: 500;
    color: #f5f5f5;
    margin: 0 0 8px 0;
}
.faq-static-answer p {
    color: #aaa;
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
}

body.faq-page-body .content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 70vh;
    padding-top: 20px;
}
body.faq-page-body .header {
    justify-content: center;
}
body.faq-page-body .home-hero,
body.faq-page-body .faq-page {
    width: 100%;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
#preloader.hidden {
    display: none;
}
#preloader .spinner {
    width: 72px;
    height: 72px;
    border: 5px solid #1e1e1e;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===== Медиа-запросы ===== */
@media (max-width: 768px) {
    .content-wrapper {
        padding-left: 0;
        padding-right: 0;
    }
    .profile-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .profile-info {
        text-align: center;
    }
    .profile-info .stats {
        justify-content: center;
    }
    .tabs {
        justify-content: center;
    }
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 4px;
    }
    .header-left {
        gap: 5%;
    }
    .logo img {
        height: 26px;
    }
    .icon-btn {
        width: 36px;
        height: 36px;
    }
    .icon-btn svg {
        width: 20px;
        height: 20px;
    }
    body.home-page .home-hero {
        padding: 40px 0 30px;
    }
    body.home-page .home-hero h1 {
        font-size: 36px;
    }
    body.home-page .home-hero p {
        font-size: 16px;
    }
    .popular-item {
        width: 70px;
    }
    .popular-item .avatar {
        width: 40px;
        height: 40px;
    }
    .popular-item .name {
        font-size: 11px;
    }
    .popular-item .handle {
        font-size: 9px;
    }
    .side-menu, .lang-panel {
        width: 280px;
    }
    .side-menu {
        left: -300px;
    }
    .lang-panel {
        right: -300px;
    }
    .side-menu.open {
        left: 0;
    }
    .lang-panel.open {
        right: 0;
    }
    .side-link {
        font-size: 16px;
        padding: 10px 14px;
    }
    .modal-box {
        padding: 24px 20px;
        max-width: 100%;
        margin: 0 10px;
    }
    .tabs {
        gap: 16px;
        flex-wrap: wrap;
    }
    .tab {
        font-size: 14px;
        padding: 6px 0;
    }
    .info-panel {
        padding: 20px 16px;
    }
    .info-panel .profile-row .avatar-placeholder {
        width: 40px;
        height: 40px;
    }
    .info-panel .actions {
        gap: 12px;
        flex-wrap: wrap;
    }
    .card-overlay .caption {
        font-size: 13px;
    }
}

@media (max-width: 640px) {
    body {
        padding: 12px;
    }
    .header {
        flex-wrap: wrap;
        gap: 8px;
    }
    .popular-grid {
        gap: 12px;
    }
    .popular-item {
        width: 60px;
    }
    .popular-item .avatar {
        width: 36px;
        height: 36px;
    }
    .popular-item .name {
        font-size: 10px;
    }
    .popular-item .handle {
        font-size: 8px;
    }
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 4px;
    }
    .card-overlay .caption {
        font-size: 12px;
    }
    .logo img {
        height: 24px !important;
    }
}

@media (max-width: 500px) {
    .grid {
        grid-template-columns: 1fr !important;
        gap: 4px;
    }
}