/* 
   RBXSLOP Global Styles
   Здесь вы можете менять основные цвета и стили сайта.
*/

:root {
    /* Основные цвета (Металлический синий) */
    --primary-color: #3b82f6;
    --primary-hover: #60a5fa;
    --primary-light: rgba(59, 130, 246, 0.15);
    --primary-light-hover: rgba(59, 130, 246, 0.25);
    --primary-border: rgba(59, 130, 246, 0.3);
    --primary-border-hover: rgba(59, 130, 246, 0.5);
    --primary-glow: rgba(59, 130, 246, 0.2);
    
    /* Цвета текста */
    --text-main: #e0e0e8;
    --text-muted: #a0a0b0;
    --text-bright: #ffffff;
    --text-link: #93c5fd;
    
    /* Фон и карточки */
    --bg-body: #0a0a0f;
    --bg-card-grad: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(148, 163, 184, 0.05));
    --bg-modal: rgba(0, 0, 0, 0.9);
    --bg-modal-box: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(10, 15, 30, 0.98));
    
    /* Вспомогательные цвета */
    --color-success: #22c55e;
    --color-danger: #ef4444;
    --color-warn: #fbbf24;
    --color-like: #ff4d4d;
    --content-max-width: 1200px;
}

/* Сброс и база */
* { box-sizing: border-box; }
html {
    overflow-y: scroll; /* Всегда резервируем место под скроллбар, чтобы сайт не прыгал */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
}

.container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    width: 100%;
    padding: 0 20px 20px;
}

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

/* Шапка (Topbar) */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    margin-bottom: 24px;
    padding: 20px;
    border-bottom: 1px solid var(--primary-glow);
}
.topbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; min-width: 0; }
.topbar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.logo-img {
    height: 28px;
    width: 28px;
    flex-shrink: 0;
    object-fit: contain;
    filter: drop-shadow(0 0 8px var(--primary-glow));
}
.logo-text {
    font-weight: 800;
    letter-spacing: 0.6px;
    font-size: 22px;
    color: var(--primary-color); /* Fallback color */
    background: linear-gradient(135deg, var(--primary-color), #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}
.topbar-sep { opacity: .4; color: var(--text-muted); margin-top: 2px; }
.topbar-section {
    color: var(--text-main);
    font-weight: 600;
    opacity: .9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.topbar-right { display: flex; gap: 10px; align-items: center; flex-wrap: nowrap; }
.topbar-link {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    color: var(--text-link);
    white-space: nowrap;
}
.topbar-link:hover { background: rgba(59, 130, 246, 0.22); border-color: rgba(59, 130, 246, 0.45); }

/* Зеленая кнопка "Добавить" */
.topbar-link.link-submit {
    background: linear-gradient(180deg, #388e3c 0%, #2e7d32 100%);
    border: 1.5px solid #1b5e20; /* Тонкая, очень темная зеленая окантовка */
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 700;
    padding: 4px 14px; /* Уменьшил отступы */
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}
.topbar-link.link-submit:hover {
    background: linear-gradient(180deg, #43a047 0%, #388e3c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.topbar-link.link-submit .link-icon {
    margin-right: 0;
    font-size: 18px; /* Уменьшил размер плюса на десктопе */
    font-weight: 800;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -1px;
}

/* Сетка карточек */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
}

@media (max-width: 600px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .container {
        padding: 0 6px 6px;
    }
}

@media (max-width: 400px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }
}

.card {
    background: var(--bg-card-grad);
    border: 1px solid var(--primary-glow);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    backdrop-filter: blur(10px);
    position: relative;
    will-change: transform; /* Подсказка браузеру для плавной отрисовки */
}

@media (max-width: 600px) {
    .card {
        border-radius: 12px;
    }
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-border-hover);
    box-shadow: 0 8px 24px var(--primary-glow);
}
.card a { color: inherit; display: block; padding: 0; }

.thumb-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

@media (max-width: 600px) {
    .thumb-wrapper {
        border-radius: 12px;
    }
}
.thumb {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(148, 163, 184, 0.1));
    display: block;
    object-fit: cover;
}
.thumb-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.4), transparent);
    padding: 25px 10px 8px;
    display: flex; gap: 12px; align-items: center;
}
.thumb-stat { display: flex; align-items: center; gap: 4px; color: #fff; font-size: 11px; font-weight: 500; }
.thumb-stat svg { width: 14px; height: 14px; fill: #fff; opacity: 0.9; }

/* Названия карточек */
.card-title { 
    position: absolute;
    top: 0; left: 0; right: 0;
    padding: 8px 10px 10px;
    font-size: 12px; 
    font-weight: 500; 
    color: #fff;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), rgba(0,0,0,0.4), transparent);
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    z-index: 2;
    
    /* Ограничение в 2 строки */
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    line-height: 1.4;
    word-wrap: break-word;
    max-height: 3.4em; /* 1.4 * 2 + небольшой запас */
}

@media (max-width: 600px) {
    .card-title {
        font-size: 10px;
        padding: 6px 8px 8px;
        max-height: 3.4em;
    }
    .thumb-overlay {
        padding: 15px 8px 5px;
        gap: 6px;
    }
}

/* Мета-информация и кнопки */
.meta { font-size: 11px; opacity: 0.7; margin-top: 8px; color: var(--text-muted); }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 32px 0; }
.pager a {
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    border-radius: 12px;
    padding: 8px 16px;
    color: var(--text-link);
}
.pager a:hover { background: var(--primary-light-hover); border-color: var(--primary-border-hover); transform: translateY(-2px); }

.pill {
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 12px;
    color: var(--text-link);
}
.pill a { color: #bfdbfe; }

/* Кнопка лайка */
.likeBtn { 
    all: unset; cursor: pointer; display: inline-flex; gap: 6px; 
    align-items: center; color: var(--text-main); transition: all 0.2s ease; 
}
.likeBtn[aria-pressed="true"] { color: var(--color-like) !important; opacity: 1 !important; }
.likeBtn[aria-pressed="true"] svg { 
    fill: var(--color-like) !important; 
    filter: drop-shadow(0 0 5px rgba(255, 77, 77, 0.4)); 
}

/* Модальное окно */
#clipModal { 
    display: none; position: fixed; inset: 0; 
    background: var(--bg-modal); backdrop-filter: blur(8px); z-index: 9999; 
}
#clipBox {
    position: absolute; inset: 20px; max-width: var(--content-max-width); margin: auto;
    background: var(--bg-modal-box);
    border: 1px solid var(--primary-border);
    border-radius: 20px; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    display: flex; flex-direction: column;
    gap: 0;
}
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 18px; border-bottom: 1px solid var(--primary-glow);
    background: rgba(59, 130, 246, 0.05); flex: 0 0 auto;
}
#clipTitle { font-size: 18px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70vw; }
#clipClose {
    border: 1px solid var(--primary-border); border-radius: 10px;
    padding: 8px 14px; background: var(--primary-light);
    color: var(--text-link); cursor: pointer; transition: all 0.2s; font-size: 16px;
}
#clipClose:hover { background: var(--primary-light-hover); border-color: var(--primary-border-hover); }
#clipBody { 
    padding: 0 12px 12px 12px; 
    flex: 1 1 auto; 
    min-height: 0; 
    box-sizing: border-box; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
}

/* Формы (Submit) */
label { display: block; margin: 18px 0 8px; font-weight: 500; color: #d1d5db; }
.form-input {
    width: 100%; padding: 12px 14px; border: 1px solid var(--primary-border);
    border-radius: 12px; background: rgba(59, 130, 246, 0.05);
    color: var(--text-main); font: inherit; transition: all 0.2s;
}
.form-input:focus { outline: none; border-color: var(--primary-border-hover); background: rgba(59, 130, 246, 0.1); box-shadow: 0 0 0 3px var(--primary-glow); }

/* Styling for select options */
select.form-input option {
    background-color: #0f172a; /* Dark background matching the theme */
    color: var(--text-main);
    padding: 10px;
}

.submit-btn {
    margin-top: 20px; width: 100%; padding: 14px;
    border: 1px solid var(--primary-border); border-radius: 12px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(148, 163, 184, 0.15));
    color: #fff; cursor: pointer; font-weight: 600; transition: all 0.2s;
}
.submit-btn:hover { background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(148, 163, 184, 0.25)); border-color: var(--primary-border-hover); transform: translateY(-2px); box-shadow: 0 4px 12px var(--primary-glow); }
.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    filter: grayscale(0.8);
}

/* Админка (Admin) */
table { border-collapse: collapse; width: 100%; margin-top: 20px; background: rgba(59, 130, 246, 0.02); border-radius: 12px; overflow: hidden; }
th, td { border-bottom: 1px solid rgba(59, 130, 246, 0.15); padding: 14px; vertical-align: top; }
th { font-size: 12px; opacity: .8; text-align: left; background: rgba(59, 130, 246, 0.05); color: var(--text-link); font-weight: 600; }
tr:hover td { background: rgba(59, 130, 246, 0.05); }

.btn {
    padding: 8px 12px; border-radius: 10px; border: 1px solid;
    background: var(--primary-light); color: var(--text-link);
    cursor: pointer; transition: all 0.2s; font-size: 12px;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 8px var(--primary-glow); }
.btn-ok { border-color: rgba(34, 197, 94, 0.4); background: rgba(34, 197, 94, 0.15); color: #86efac; }
.btn-bad { border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
.btn-warn { border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.15); color: #fde047; }
.btn-del { border-color: rgba(239, 68, 68, 0.5); background: rgba(239, 68, 68, 0.2); color: #f87171; }

.badge { display: inline-block; padding: 4px 10px; border: 1px solid; border-radius: 999px; font-size: 11px; font-weight: 500; }
.badge-ok { border-color: rgba(34, 197, 94, 0.4); background: rgba(34, 197, 94, 0.15); color: #86efac; }
.badge-bad { border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.15); color: #fca5a5; }

.hint { font-size: 12px; opacity: .7; color: var(--text-muted); margin-top: 4px; }
.tabs { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.tab {
    padding: 8px 14px; border: 1px solid var(--primary-border);
    border-radius: 999px; text-decoration: none;
    background: rgba(59, 130, 246, 0.05); color: var(--text-link);
    transition: all 0.2s; font-size: 13px;
}
.tab:hover { background: var(--primary-light); border-color: var(--primary-border-hover); }
.tab.on { background: var(--primary-light-hover); border-color: var(--primary-border-hover); color: #bfdbfe; }

/* Layout (Standalone Pages) */
.page { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.top {
    flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 16px 24px; border-bottom: 1px solid var(--primary-glow);
    background: rgba(59, 130, 246, 0.05); backdrop-filter: blur(10px);
}
.content { flex: 1 1 auto; min-height: 0; padding: 0; overflow: hidden; background: var(--bg-body); }

/* --- Topbar & Modals (from topbar.php) --- */
.lang-switchers { display: flex; gap: 15px; align-items: center; margin-right: 15px; flex-wrap: nowrap; flex-shrink: 0; }
.lang-switcher { display: flex; flex-direction: column; gap: 2px; }
.lang-switcher label { display: block; margin: 0; font-size: 10px; opacity: 0.6; color: var(--text-muted); font-weight: 400; }
.lang-switcher select { 
    background: rgba(59, 130, 246, 0.1); 
    border: 1px solid var(--primary-border); 
    border-radius: 6px; 
    color: var(--text-link); 
    font-size: 12px; 
    padding: 2px 4px; 
    cursor: pointer;
    outline: none;
}
.lang-switcher select:hover { background: rgba(59, 130, 246, 0.2); }

/* Custom Select with Flags Support */
.custom-select {
    position: relative;
    background: rgba(59, 130, 246, 0.1); 
    border: 1px solid var(--primary-border); 
    border-radius: 6px; 
    color: var(--text-link); 
    font-size: 12px; 
    cursor: pointer;
    user-select: none;
}
.custom-select-trigger {
    padding: 3px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 80px;
    justify-content: space-between;
}
.custom-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1b1e;
    border: 1px solid var(--primary-border);
    border-radius: 6px;
    margin-top: 4px;
    display: none;
    z-index: 2000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    min-width: 140px;
}
.custom-select.open .custom-options {
    display: block;
}
.custom-option {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}
.custom-option:hover {
    background: rgba(59, 130, 246, 0.15);
}
.custom-select .chevron {
    font-size: 10px;
    opacity: 0.5;
}
.mobile-native-select {
    display: none;
}
@media (max-width: 768px) {
    .mobile-native-select {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        z-index: 10;
        cursor: pointer;
        -webkit-appearance: menulist-button; /* Helps with some mobile browsers */
    }
}
.topbar-right { display: flex; gap: 10px; align-items: center; flex-wrap: nowrap; min-width: 0; }
.topbar-right-scrollable { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; flex-shrink: 0; }
.topbar-nav { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; flex-shrink: 0; }
.link-icon { display: none; }
.link-submit .link-icon { display: flex; }

/* Filter Bar Styles */
.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: nowrap; /* Force one line */
    background: rgba(59, 130, 246, 0.03);
    padding: 10px;
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    overflow: hidden; /* Prevent overflow if we scale */
}
.filter-btn {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    color: var(--text-link);
    white-space: nowrap;
    transition: all 0.2s;
}
.filter-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}
.filter-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-glow);
}
.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px 12px 4px 4px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.filter-label {
    font-size: 12px;
    color: var(--text-muted);
    padding-left: 8px;
}
.filter-group-btns {
    display: flex;
    gap: 6px;
}

/* User Area Styles */
.user-area {
    margin-left: 15px;
    flex-shrink: 0;
}
.login-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px var(--primary-glow);
}
.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--primary-glow);
    filter: brightness(1.1);
}

.user-menu-container {
    position: relative;
}
.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.user-profile:hover {
    background: rgba(255, 255, 255, 0.1);
}
.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-link);
}
.user-chevron {
    font-size: 10px;
    opacity: 0.5;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #1a1b1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    min-width: 160px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
    overflow: hidden;
}
.user-dropdown.show {
    display: block;
    animation: dropdownFade 0.2s ease-out;
}
@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-link);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}
.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}
.dropdown-item.logout {
    color: #ff4d4d;
}
.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 4px 0;
}
.dropdown-item .icon {
    font-size: 16px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.modal-overlay.show {
    display: flex;
}
.modal-content {
    background: #1a1b1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    width: 100%;
    max-width: 400px;
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}
.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}
.google-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #fff;
    color: #000;
    text-decoration: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
}
.google-login-btn:hover {
    background: #f1f1f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}
.google-login-btn img {
    width: 20px;
    height: 20px;
}

.telegram-login-container {
    margin-top: 15px;
    display: flex;
    justify-content: center;
}

.telegram-bot-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #1d86ba; /* Темнее, чем стандартный ТГ цвет */
    color: #fff;
    text-decoration: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
    width: 100%;
    border: none;
    cursor: pointer;
}

.telegram-bot-login-btn:hover {
    background: #176a94;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(29, 134, 186, 0.3);
}

/* Telegram Auth Modal Specific Styles */
.tg-auth-modal {
    max-width: 440px !important;
    text-align: center;
}

.tg-modal-desc {
    font-size: 16px;
    margin-bottom: 20px;
    color: #fff;
}

#qrcode-container {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 20px;
}

#qrcode img {
    display: block;
    margin: 0 auto;
}

.tg-timer {
    font-size: 18px;
    margin-bottom: 25px;
    color: #fff;
}

.tg-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tg-btn-primary {
    background: #a855f7; /* Фиолетовый как на скрине */
    color: #fff;
    text-decoration: none;
    padding: 14px;
    border-radius: 999px;
    font-weight: 600;
    transition: all 0.2s;
}

.tg-btn-primary:hover {
    background: #9333ea;
    transform: translateY(-1px);
}

.tg-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    text-decoration: none;
    padding: 12px;
    border-radius: 999px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s;
}

.tg-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.telegram-bot-login-btn img {
    width: 24px;
    height: 24px;
}

/* ========== SWIPE NAVIGATION ========== */

/* Навигационные стрелки в модальном окне */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.2);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 100;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.nav-arrow svg {
    width: 28px;
    height: 28px;
}

.nav-arrow:hover {
    background: rgba(59, 130, 246, 0.4);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

.nav-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.nav-prev {
    left: -60px;
}

.nav-next {
    right: -60px;
}


/* Адаптив для навигационных стрелок */
@media (max-width: 1400px) {
    .nav-prev {
        left: 10px;
    }
    .nav-next {
        right: 10px;
    }
    .nav-arrow {
        background: rgba(0, 0, 0, 0.6);
        width: 40px;
        height: 40px;
    }
    .nav-arrow svg {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 768px) {
    /* На мобильных скрываем стрелки - используем свайпы */
    .nav-arrow {
        display: none;
    }
    
    .swipe-hint {
        font-size: 48px;
    }
}

/* ========== END SWIPE NAVIGATION ========== */

@media (max-width: 768px) {
  .topbar { 
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    gap: 15px;
  }
  
  .topbar-left {
    width: 100%;
    justify-content: center;
    flex-wrap: nowrap;
  }

  .topbar-right { 
    width: 100%; 
    flex-direction: row; 
    flex-wrap: nowrap; 
    justify-content: center; 
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 5px 0;
  }
  
  .topbar-right-scrollable {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 0 1 auto;
    min-width: 0;
  }
  
  .topbar-right-scrollable::-webkit-scrollbar {
    display: none;
  }

  .topbar {
    zoom: 0.95;
  }

  .lang-switchers { 
    width: auto; 
    margin: 0;
    gap: 8px;
    flex-shrink: 0;
  }

  .lang-switcher select {
    max-width: none; /* Reset to allow natural width by default */
    font-size: 11px;
    padding: 2px;
  }

  /* Only shrink language selects if the screen is very narrow */
  @media (max-width: 400px) {
    .lang-switcher select {
      max-width: 65px;
    }
  }

  .lang-switcher label {
    font-size: 9px;
  }

  .link-submit .link-text { display: none; }
  .link-submit .link-icon { 
    display: flex; 
    font-size: 32px; /* Уменьшил плюс до адекватного размера */
    font-weight: 800; 
    margin-right: 0;
    width: auto;
    height: auto;
    line-height: 1;
  }
  .link-submit { 
    background: linear-gradient(180deg, #388e3c 0%, #2e7d32 100%) !important; 
    border: 2px solid #1b5e20 !important; /* Тёмная рамка */
    color: #ffffff !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
    padding: 6px 10px !important; /* Уменьшил отступы на мобилке */
    border-radius: 12px !important;
  }
  .topbar-link { padding: 5px 10px; }

  .topbar-nav { 
    margin: 0;
    gap: 5px;
    flex-shrink: 0;
  }

  .user-area {
    margin: 0;
    flex-shrink: 0;
  }

  .user-name { display: none; }
  .user-profile { padding: 4px 8px; }
  .user-chevron { display: none; }
  
  .filter-bar {
      justify-content: center;
      padding: 8px;
      flex-wrap: nowrap;
      width: fit-content;
      margin-left: auto;
      margin-right: auto;
      max-width: 100%;
  }
  
  /* Scale down the whole filter bar if it's too wide for the screen */
  @media (max-width: 500px) {
    .filter-bar {
      zoom: 0.85;
    }
  }
  @media (max-width: 400px) {
    .filter-bar {
      zoom: 0.75;
    }
  }

  .filter-group {
      width: auto;
      justify-content: center;
      padding: 4px 12px 4px 4px;
  }
}
