/* И мне настроить, чтобы кнопки синие не включались на антигравити. css/style.css */
:root {
    --bg-color: #0e1621;
    --card-bg: #17212b;
    --hover-bg: #2b3a4a;
    --sidebar-bg: #17212b;
    --sidebar-width: 260px;
    --info-width: 320px;
    --text-color: #f5f5f5;
    --text-primary: #f5f5f5;
    --text-secondary: #8b9eb0;
    --border-color: #242f3d;
    --accent-color: #2b82d9;
    --nav-width: 260px;
    --panel-width: 320px;
    --font-primary: 'Inter', sans-serif;
    --standard-font-size: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-primary) !important;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #303e4d; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #4a5c6f; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    height: 100svh;
}

/* All fonts unified to Inter as requested */

#sidebar-overlay {
    display: none;
    position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 900;
    backdrop-filter: blur(3px);
}
#sidebar-overlay.active { display: block; }

.app-container { display: flex; height: 100svh; width: 100%; overflow: hidden; position: relative; }

/* SIDEBAR */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex; flex-direction: column; flex-shrink: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header { padding: 24px; border-bottom: 1px solid var(--border-color); flex-shrink: 0; cursor: pointer; }
.sidebar-header h1 { font-size: 24px; letter-spacing: 3px; color: var(--accent-color); font-weight: 700; transition: opacity 0.2s; }
.sidebar-header h1:hover { opacity: 0.8; }
.sidebar-header p { font-size: 10px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 2px; margin-top: 4px; }

.nav-list { flex-grow: 1; overflow-y: auto; padding: 16px 8px; }

.cat-header {
    cursor: pointer; font-size: var(--standard-font-size); color: var(--text-secondary); text-transform: uppercase;
    letter-spacing: 1.5px; margin: 16px 0 8px 12px; display: flex; justify-content: space-between;
    align-items: center; padding-right: 12px; transition: color 0.2s; font-weight: 600;
}
.cat-header:hover { color: var(--text-primary); }
.cat-arrow { font-size: 12px; transition: transform 0.25s; }
.cat-arrow.expanded { transform: rotate(0deg); }
.cat-arrow.collapsed { transform: rotate(-90deg); }

.cat-items { overflow: hidden; transition: max-height 0.3s ease, opacity 0.3s ease; max-height: 1500px; opacity: 1; }
.cat-items.collapsed { max-height: 0; opacity: 0; pointer-events: none; }

.nav-item {
    padding: 10px 16px; border-radius: 8px; cursor: pointer; transition: background 0.2s, color 0.2s;
    margin-bottom: 4px; font-size: var(--standard-font-size); font-weight: 500; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nav-item:hover { background-color: var(--hover-bg); }
.nav-item.active { background-color: var(--accent-color); color: white; }

/* MAIN CONTENT */
.main-content {
    flex: 1; min-width: 0; display: flex; flex-direction: column;
    background: radial-gradient(circle at top right, #1b2633 0%, #0e1621 100%); overflow: hidden;
}

.top-bar {
    height: 64px; display: flex; align-items: center; padding: 0 24px;
    background-color: rgba(23, 33, 43, 0.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color); z-index: 100; flex-shrink: 0; gap: 16px;
}

.menu-toggle, .filter-toggle, .info-panel-close {
    background: none; border: none; color: var(--text-primary); font-size: 24px; cursor: pointer;
    transition: color 0.2s; display: none; /* Show on mobile naturally */
}
.menu-toggle:hover, .filter-toggle:hover, .info-panel-close:hover { color: var(--accent-color); }


.breadcrumb { font-size: 14px; color: var(--text-secondary); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500;}

.stage { flex: 1; padding: 32px; overflow-y: auto; overflow-x: hidden; }

/* HOME WELCOME */
.home-welcome { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; text-align: center; animation: fadeIn 0.6s ease; }
.home-welcome .welcome-icon { font-size: 72px; margin-bottom: 24px; opacity: 0.6; }
.home-welcome h2 { font-size: 32px; color: var(--text-primary); margin-bottom: 16px; letter-spacing: 2px; }
.home-welcome p { font-size: 16px; color: var(--text-secondary); max-width: 400px; line-height: 1.6; }

/* IDEAS GRID */
.ideas-category-block { margin-bottom: 32px; }
.ideas-category-header {
    background: var(--card-bg); border-radius: 8px; padding: 12px 20px; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px;
    border: 1px solid transparent; transition: border-color 0.2s, background 0.2s;
}
.ideas-category-header:hover { border-color: var(--border-color); background: var(--hover-bg); }
.ideas-category-header span.title { font-weight: 600; font-size: 15px; color: #fff; letter-spacing: 0.5px; text-transform: uppercase;}

.ideas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.idea-card {
    background-color: var(--card-bg); border-radius: 12px; overflow: hidden; cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s; border: 1px solid transparent;
}
.idea-card:hover { transform: translateY(-6px); border-color: var(--accent-color); box-shadow: 0 12px 32px rgba(0,0,0,0.5); }
.idea-card-img { width: 100%; aspect-ratio: 1/1; background-color: #121922; overflow: hidden; }
.idea-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.idea-card:hover .idea-card-img img { transform: scale(1.05); }
.idea-card-content { padding: 16px 20px; }
.idea-card-content h4 { font-size: 15px; color: var(--text-primary); line-height: 1.4; font-weight: 600; transition: color 0.2s;}
.idea-card:hover .idea-card-content h4 { color: var(--accent-color); }

/* IDEA DETAIL */
.idea-detail { width: 100%; max-width: 860px; margin: 0 auto; animation: fadeIn 0.4s ease; padding-bottom: 40px;}
.idea-tabs-container { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border-color); }
.idea-tab {
    background: transparent; color: var(--text-secondary); border: 1px solid transparent;
    padding: 6px 16px; border-radius: 20px; font-size: var(--standard-font-size); font-weight: 600; cursor: pointer;
    text-transform: uppercase; letter-spacing: 0.5px; transition: all 0.2s;
}
.idea-tab:hover { color: #fff; border-color: var(--border-color); }
.idea-tab.active { background: var(--accent-color); color: #fff; border-color: var(--accent-color); box-shadow: 0 4px 12px rgba(36,129,204,0.3); }

.idea-nav-wrapper { display: flex; align-items: flex-start; gap: 24px; width: 100%; margin-bottom: 32px; }
.idea-main-view { flex: 1; min-width: 0; }
.idea-title { font-size: clamp(24px, 4vw, 36px); margin-bottom: 24px; line-height: 1.3; color: #fff; font-weight: 700; }
.idea-content-area { width: 100%; animation: fadeIn 0.3s ease; }

.idea-nav-btn {
    width: 48px; height: 48px; border-radius: 50%; background-color: var(--card-bg); border: 1px solid var(--border-color);
    color: var(--text-primary); font-size: 24px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s; flex-shrink: 0; margin-top: 60px;
}
.idea-nav-btn:hover { background-color: var(--accent-color); border-color: var(--accent-color); transform: scale(1.1); }
.idea-nav-placeholder { width: 48px; flex-shrink: 0; }

.description-section { margin-bottom: 24px; }
.description-section h5 { color: var(--accent-color); text-transform: uppercase; font-size: var(--standard-font-size); margin-bottom: 10px; letter-spacing: 1.5px; }
.description-content { background: var(--card-bg); padding: 20px 24px; border-radius: 12px; font-size: var(--standard-font-size); line-height: 1.8; color: #eee; word-break: break-word; border: 1px solid var(--border-color); }

/* GALLERY */
.gallery-container { position: relative; width: 100%; border-radius: 12px; overflow: hidden; background: #121922; display: flex; justify-content: center; align-items: center; aspect-ratio: 1/1;}
.gallery-container img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; }
.gallery-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); width: 64px; height: 64px; border-radius: 50%;
    background: rgba(0,0,0,0.6); border: 2px solid rgba(255,255,255,0.4); color: white; font-size: 32px;
    display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; z-index: 10; backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.gallery-arrow:hover { background: var(--accent-color); border-color: #fff; transform: translateY(-50%) scale(1.15); box-shadow: 0 8px 24px rgba(0,0,0,0.8); }
.gallery-arrow-left { left: 24px; }
.gallery-arrow-right { right: 24px; }
.gallery-counter { position: absolute; bottom: 16px; right: 16px; background: rgba(0,0,0,0.6); color: white; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; backdrop-filter: blur(4px); }
.gallery-dots { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
.gallery-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-color); cursor: pointer; transition: all 0.2s; }
.gallery-dot.active { background: var(--accent-color); transform: scale(1.3); }
.gallery-dot:hover { background: var(--text-secondary); }

/* FULLSCREEN IMAGE VIEWER */
.image-viewer-modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.95); backdrop-filter: blur(8px);
    z-index: 10000; display: flex; align-items: center; justify-content: center;
}
.image-viewer-modal.hidden { display: none; }
.image-viewer-modal img { max-width: 90vw; max-height: 90vh; object-fit: contain; box-shadow: 0 10px 40px rgba(0,0,0,0.8); border-radius: 8px;}
.image-viewer-close { position: absolute; top: 24px; right: 24px; background: none; border: none; color: white; font-size: 32px; cursor: pointer; transition: color 0.2s; z-index: 10001; }
.image-viewer-close:hover { color: var(--accent-color); transform: scale(1.1); }
.image-viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.4); border: 2px solid rgba(255,255,255,0.3); color: white; border-radius: 50%; width: 64px; height: 64px; font-size: 36px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; z-index: 10001; }
.image-viewer-nav:hover { background: var(--accent-color); border-color: #fff; transform: translateY(-50%) scale(1.15); box-shadow: 0 8px 24px rgba(0,0,0,0.8); }
.image-viewer-nav.prev { left: 40px; }
.image-viewer-nav.next { right: 40px; }
.image-viewer-counter { position: absolute; bottom: 32px; color: white; padding: 8px 20px; background: rgba(0,0,0,0.6); border-radius: 20px; font-size: 15px; font-weight: 600; border: 1px solid rgba(255,255,255,0.1); }


/* RIGHT PANEL */
.info-panel {
    width: var(--info-width); background-color: var(--sidebar-bg); border-left: 1px solid var(--border-color);
    display: flex; flex-direction: column; flex-shrink: 0; overflow: hidden; z-index: 999;
    transition: transform 0.3s ease;
}
.author-info { padding: 32px 24px 24px; text-align: center; border-bottom: 1px solid var(--border-color); flex-shrink: 0; position: relative;}
.info-panel-close { position: absolute; top: 16px; right: 16px;}
.author-avatar { width: 120px; height: 150px; border-radius: 12px; background-color: var(--card-bg); margin: 0 auto 16px; background-size: cover; background-position: center top; border: 2px solid var(--border-color); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.author-info h3 { font-size: 20px; color: var(--text-primary); margin-bottom: 6px; line-height: 1.3; }
.author-info p { font-size: 12px; color: var(--accent-color); text-transform: uppercase; letter-spacing: 1px; font-weight: 500;}
.author-nav-list { padding: 16px; overflow-y: auto; flex-grow: 1; }
.author-group-title { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1.5px; margin: 20px 0 8px 12px; font-weight: 600;}

/* BUTTONS */
.btn { padding: 10px 20px; border-radius: 8px; border: none; cursor: pointer; font-weight: 600; transition: var(--transition); font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: 'Inter', sans-serif;}
.btn-secondary { background-color: var(--hover-bg); color: var(--text-primary); border: 1px solid var(--border-color);}
.btn-secondary:hover { background-color: var(--border-color); }

/* RESPONSIVE */
.hidden { display: none !important; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1024px) {
    .sidebar { position: absolute; left: 0; top: 0; bottom: 0; transform: translateX(-100%); width: 85vw; max-width: 320px; }
    .sidebar.open { transform: translateX(0); }
    .info-panel { position: absolute; right: 0; top: 0; bottom: 0; transform: translateX(100%); width: 100vw; max-width: 100%; z-index: 1001;}
    .info-panel.panel-open { transform: translateX(0); }
    .menu-toggle, .filter-toggle, .info-panel-close { display: block; }
    .idea-nav-wrapper { align-items: center; gap: 12px; }
    .idea-nav-btn { width: 44px; height: 44px; font-size: 24px; margin-top: 0; }
    .idea-nav-placeholder { width: 44px; }
    .idea-title { font-size: 24px; margin-bottom: 16px; text-align: center; }
    .stage { padding: 16px; }
    .ideas-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
    .gallery-arrow { width: 44px; height: 44px; font-size: 24px; }
    .gallery-arrow-left { left: 12px; }
    .gallery-arrow-right { right: 12px; }
    .author-avatar { width: 100px; height: 125px; }
}
/* ADMIN BUTTONS & OVL */
.auth-ov {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-ov.hidden {
    display: none;
}
.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    text-align: center;
}
.auth-card input {
    width: 100%;
    padding: 12px;
    margin: 20px 0;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 8px;
    outline: none;
}
.auth-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.admin-controls {
    display: flex;
    gap: 12px;
    margin-left: 20px;
}
.admin-controls.hidden { display: none; }
.btn-primary { background: var(--accent-color); color: #fff; }
.btn-primary:hover { opacity: 0.9; }
.btn-danger { background: #e74c3c; color: #fff; border: 1px solid #c0392b; }
.btn-danger:hover { background: #c0392b; }
.admin-idea-controls {
    display: flex; 
    gap: 10px; 
    margin: 15px 0;
    flex-wrap: wrap;
}

/* ==================================================== */
/* GLOBAL FONT SIZE OVERRIDE AS REQUESTED BY USER FOR ALL TEXT */
/* ==================================================== */
h1, h2, h3, h4, h5, h6, p, a, span, div, button:not(.btn-icon):not(.gallery-arrow):not(.image-viewer-nav):not(.image-viewer-close), input, textarea, li, .logo, .sidebar-header h1, .ideas-category-header span.title, .idea-title {
    font-size: var(--standard-font-size) !important;
}
.welcome-icon, .image-viewer-close, .image-viewer-nav {
    font-size: 32px !important;
}
.cat-arrow {
    font-size: 10px !important;
}

/* OVERRIDE FOR NEW SVG ARROWS */
.idea-nav-btn {
    width: 64px !important; height: 64px !important; border-radius: 50% !important; background: rgba(0,0,0,0.4) !important; border: 2px solid rgba(255,255,255,0.2) !important;
    color: white !important; display: flex !important; align-items: center !important; justify-content: center !important;
    cursor: pointer !important; transition: all 0.2s !important; flex-shrink: 0 !important; margin-top: 60px !important; box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important; z-index: 10 !important;
}
.idea-nav-btn:hover { background: var(--accent-color) !important; border-color: #fff !important; transform: scale(1.15) !important; box-shadow: 0 8px 24px rgba(0,0,0,0.6) !important; color: #fff !important; }
.idea-nav-placeholder { width: 64px !important; flex-shrink: 0 !important; }

/* RESPONSIVE: On mobile, show one image per row */
@media (max-width: 768px) {
    .gallery-grid-item {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        aspect-ratio: 1/1;
    }
}
