/* ============================================================
   MINDODA METKVA — Apple HIG–inspired visual system
   ============================================================ */

:root {
    --bg-color: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.78);
    --nav-border: rgba(0, 0, 0, 0.06);
    --text-color: #1c1c1e;
    --text-secondary: #6e6e73;
    --search-bg: rgba(118, 118, 128, 0.07);
    --modal-bg: rgba(255, 255, 255, 0.82);
    --accent-blue: #007aff;
    --accent-pink: #ff4d6d;
    --logo-text: #1c1c1e;
    --card-bg: rgba(255, 255, 255, 0.86);
    --card-bg-solid: #ffffff;
    --card-border: rgba(0, 0, 0, 0.06);
    --card-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 8px rgba(0,0,0,0.07);
    --card-shadow-hover: 0 1px 3px rgba(0,0,0,0.07), 0 6px 12px rgba(0,0,0,0.1);
    --divider: rgba(60, 60, 67, 0.1);
    --radius-lg: 26px;
    --radius-md: 18px;
    --radius-sm: 13px;
    --accent-green: #34c759;
    --bg-gradient: radial-gradient(ellipse 90% 60% at 50% -10%, rgba(0, 122, 255, 0.05), transparent 60%);
}

@font-face {
    font-family: 'HeroFont';
    src: url('fonts/hero.ttf') format('truetype');
    font-weight: normal;
    font-display: swap;
}

body, .navbar, .card, .tab-btn, #searchInput, .social-link {
    transition: background-color 0.4s ease, 
                background-image 0.4s ease, 
                color 0.4s ease, 
                border-color 0.4s ease, 
                box-shadow 0.4s ease;
}

[data-theme="dark"] {
    --bg-color: #000000;
    --nav-bg: rgba(20, 20, 22, 0.72);
    --nav-border: rgba(255,255,255,0.08);
    --text-color: #f5f5f7;
    --text-secondary: #98989d;
    --search-bg: rgba(255, 255, 255, 0.08);
    --modal-bg: rgba(10, 10, 12, 0.82);
    --logo-text: #ffffff;
    --card-bg: rgba(28, 28, 30, 0.7);
    --card-bg-solid: #1c1c1e;
    --card-border: rgba(255, 255, 255, 0.06);
    --card-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 4px 10px rgba(0,0,0,0.25);
    --card-shadow-hover: 0 1px 3px rgba(0,0,0,0.35), 0 6px 14px rgba(0,0,0,0.3);
    --divider: rgba(255, 255, 255, 0.09);
    --bg-gradient: radial-gradient(ellipse 90% 60% at 50% -10%, rgba(255, 255, 255, 0.03), transparent 60%);
}

@font-face {
    font-family: 'Fira GO Georgian';
    src: local('Fira GO');
    unicode-range: U+10A0-10FF, U+1C90-1CBF, U+2D00-2D2F;
}

* {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: 'Fira GO Georgian', -apple-system, BlinkMacSystemFont,
                 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body, .navbar, #search-wrapper i, #searchInput, #input-section, #input-section input,
#input-section textarea, .card, .user-avatar, .card-divider, .meta-label, .meta-date,
.card-name .card-recipient, .card-name .card-author, .action-count, .like-btn,
.modal-overlay, .modal-content, .modal-pr-header, .modal-pr-header .logo, .skeleton-card,
.social-link, .add-btn, #toast, .form-header .fa-xmark, .tab-btn {
    transition: background-color 0.35s ease, color 0.35s ease,
                border-color 0.35s ease, box-shadow 0.35s ease, transform 0.2s ease;
}

html { -webkit-font-smoothing: antialiased; }

body {
    background-color: var(--bg-color);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-color);
    overflow-x: hidden;
    letter-spacing: -0.01em;
}


.heart-bg-container {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none; overflow: hidden; z-index: -1;
}

/* ── Navbar ── */
.navbar {
    position: fixed; top: 0; width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-bottom: 1px solid var(--nav-border);
    z-index: 1000; 
    padding: 14px 0 18px;
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease;
}

.nav-container {
    max-width: 800px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center; padding: 0 20px;
}

.logo {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: var(--logo-text); flex-shrink: 0;
}
.logo img { height: 44px; border-radius: 10px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text .line1 { font-size: 1.05rem; font-weight: 700; letter-spacing: 0.01em; }
.logo-text .line2 { font-size: 1.05rem; font-weight: 700; color: var(--accent-blue); letter-spacing: 0.01em; }

.nav-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* 🌙 მინიმალისტური, სუფთა Dark Mode ღილაკი navbar-ში */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--search-bg);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.05rem;
    opacity: 0.85;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.theme-toggle:hover {
    opacity: 1;
    transform: scale(1.06) rotate(12deg);
    background: var(--divider);
}

.nav-socials { display: flex; align-items: center; gap: 6px; }

.social-link {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 10px;
    border: none; 
    background: transparent; 
    color: var(--text-color); 
    transition: transform 0.2s ease, background 0.2s ease;
    text-decoration: none; flex-shrink: 0;
}
.social-link svg { width: 17px; height: 17px; }
.social-link:hover { transform: translateY(-1px); background: rgba(0,0,0,0.05); }
[data-theme="dark"] .social-link { background: transparent; color: #ffffff; }
[data-theme="dark"] .social-link:hover { background: rgba(255,255,255,0.08); }

.nav-divider { width: 1px; height: 20px; background: var(--divider); border-radius: 1px; flex-shrink: 0; }

.add-btn {
    background: var(--accent-blue); color: #ffffff; border: none;
    padding: 10px 18px; border-radius: 980px; font-weight: 600;
    cursor: pointer; transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.2s ease;
    font-size: 0.95rem; white-space: nowrap; flex-shrink: 0;
    box-shadow: 0 3px 8px -1px rgba(0, 122, 255, 0.28);
}
.add-btn:hover { opacity: 0.92; transform: translateY(-1px); }
.add-btn:active { transform: translateY(0) scale(0.97); }

@media (max-width: 360px) {
    .nav-socials, .nav-divider { display: none; }
}

.container { max-width: 420px; margin: 95px auto 60px; padding: 0 16px; }

/* ── Search ── */
#search-wrapper {
    position: relative;
    max-width: 550px;
    margin: 40px auto 16px auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    width: 100%;
}

#search-wrapper i {
    position: absolute; 
    left: 35px; 
    top: 50%; 
    transform: translateY(-50%);
    color: var(--text-secondary); 
    font-size: 0.92rem; 
    pointer-events: none;
    z-index: 5; 
}

#search-wrapper:focus-within i { 
    color: var(--accent-blue); 
    transform: translateY(-50%) scale(1.05);
}

#searchInput {
    width: 100%;
    padding: 14px 20px 14px 52px; 
    font-family: 'Fira GO Georgian', sans-serif;
    font-size: 15px;
    font-weight: 500;
    border-radius: 50px; 
    outline: none;
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] #searchInput {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--text-color);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
}

[data-theme="dark"] #searchInput {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-color);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
}

#searchInput::placeholder { 
    color: var(--text-secondary); 
    opacity: 0.8;
}

#searchInput:focus { 
    border-color: var(--accent-blue); 
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15), 0 8px 32px 0 rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] #searchInput:focus {
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.2), 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* ============================================================
   ── 📊 Trending & Recent Tabs (გასწორებული ჰორიზონტალური დიზაინი) ──
   ============================================================ */
.tabs-container {
    display: flex !important;      /* გარანტია, რომ ყოველთვის flex-ია */
    flex-direction: row !important; /* გარანტია, რომ ყოველთვის ჰორიზონტალურია */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 0 auto 28px auto;
    max-width: 550px;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

.tab-btn {
    flex: 1; /* ღილაკები თანაბრად ნაწილდება გვერდიგვერდ */
    font-family: 'Fira GO Georgian', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 14px 22px;
    border-radius: 22px; 
    border: 1px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ☀️ Light Theme ტაბების სტილი */
[data-theme="light"] .tab-btn {
    background: rgba(118, 118, 128, 0.08);
    color: var(--text-secondary);
    border-color: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .tab-btn:hover {
    background: rgba(118, 118, 128, 0.12);
    transform: translateY(-1px);
}

[data-theme="light"] .tab-btn.active {
    background: var(--accent-blue); 
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.25);
}

/* 🌙 Dark Theme ტაბების სტილი */
[data-theme="dark"] .tab-btn {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border-color: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

[data-theme="dark"] .tab-btn.active {
    background: var(--accent-blue);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.35);
}

.tab-btn:active {
    transform: translateY(0) scale(0.97);
}

/* ── Form ── */
#input-section {
    background: var(--card-bg);
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 26px 26px 24px;
    box-shadow: var(--card-shadow);
    display: flex; flex-direction: column; gap: 14px; margin-bottom: 36px;
}
.form-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; width: 100%;}
.form-header h3 { font-size: 1.08rem; font-weight: 700; letter-spacing: -0.01em; }
.form-header .fa-xmark {
    cursor: pointer; font-size: 1rem; color: var(--text-secondary);
    width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: rgba(0,0,0,0.05);
}
.form-header .fa-xmark:hover { background: rgba(0,0,0,0.09); color: var(--text-color); }
[data-theme="dark"] .form-header .fa-xmark { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .form-header .fa-xmark:hover { background: rgba(255,255,255,0.14); }

.form-field { position: relative; /* დაამატეთ ეს ხაზი */ display: flex; flex-direction: column; gap: 7px; width: 100%;}
.form-field label {
    font-size: 0.72rem; font-weight: 600; color: var(--text-secondary);
    letter-spacing: 0.04em; text-transform: uppercase; padding-left: 4px;
}
#input-section input, #input-section textarea{
    background: rgba(118, 118, 128, 0.08);
    border: 1px solid transparent;
    border-radius: var(--radius-sm); padding: 13px 16px; color: var(--text-color);
    outline: none; font-size: 16px; width: 100%;
}
#input-section input:focus, #input-section textarea:focus, textarea:focus {
    border-color: var(--accent-blue); box-shadow: 0 0 0 4px rgba(0,122,255,0.12);
    background: rgba(118, 118, 128, 0.05);
}
[data-theme="dark"] #input-section input,
[data-theme="dark"] #input-section textarea,
[data-theme="dark"]  textarea { background: rgba(118, 118, 128, 0.16); }
#input-section textarea { resize: none; line-height: 1.6; }
#charCounter { font-size: 0.72rem; color: var(--text-secondary); text-align: right; padding-right: 4px; }
#charCounter.warn { color: #f0a500; }
#charCounter.danger { color: var(--accent-pink); }

#submitBtn {
    padding: 15px; border-radius: var(--radius-sm); border: none;
    background: var(--accent-blue);
    color: white; font-weight: 600; cursor: pointer; font-size: 1rem; margin-top: 4px; width: 100%;
    box-shadow: 0 4px 10px -1px rgba(0, 122, 255, 0.26);
    transition: transform 0.15s ease, opacity 0.15s ease;
}
#submitBtn:hover  { opacity: 0.92; transform: translateY(-1px); }
#submitBtn:active { transform: scale(0.98); }
#submitBtn:disabled{ opacity: 0.5; cursor: not-allowed; transform: none; }
#submitBtn.sent { background: var(--accent-green); box-shadow: 0 4px 10px -1px rgba(52, 199, 89, 0.26); }

body, .navbar, .card, .tab-btn, .search-input {
    transition: background-color 0.4s ease, 
                background-image 0.4s ease, 
                color 0.4s ease, 
                border-color 0.4s ease;
}

/* ── Feed ── */
#feed { display: flex; flex-direction: column; gap: 20px; }

/* ── Card ── */
.card {
    position: relative;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    display: flex; flex-direction: column;
    min-height: 440px;
    height: auto;
    max-width: 340px; min-width: 340px;
    margin: 0 auto;
    overflow: hidden; cursor: pointer;
    transition: transform 0.25s cubic-bezier(.2,.8,.2,1), box-shadow 0.25s ease;
    animation: cardFadeIn 0.5s cubic-bezier(.2,.8,.2,1) backwards;
}

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(14px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.card:active { transform: scale(0.985); }
@media (hover: hover) {
    .card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow-hover); }
}

/* ── Card Top ── */
.card-top {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 18px 12px 18px; gap: 12px;
}

.card-avatar-center { 
    display: flex; 
    flex-direction: row; 
    align-items: center; 
    gap: 11px; 
    min-width: 0; 
}

.user-avatar {
    width: 40px; height: 40px; border-radius: 50%; background: #ddeeff;
    display: flex; justify-content: center; align-items: center; color: #4d9bff; font-size: 1.3rem; flex-shrink: 0;
}
[data-theme="dark"] .user-avatar { background: rgba(77, 155, 255, 0.2); color: #4d9bff; }

.card-name { 
    display: flex; 
    flex-direction: column; 
    gap: 2px; 
    min-width: 0; 
}

.card-name .card-recipient {
    font-size: 0.95rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-color);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
    width: 100%;
}
.card-name .card-author {
    font-size: 0.8rem; font-weight: 400; color: var(--text-secondary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
    width: 100%;
}

.card-actions { 
    display: flex; 
    flex-direction: row; 
    align-items: center; 
    gap: 12px; 
    flex-shrink: 0; 
}

.action-item { display: flex; flex-direction: column; align-items: center; gap: 3px; }

.like-btn, .share-btn, .reply-trigger-btn {
    position: relative;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    color: var(--accent-blue);
    background: transparent; 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.like-btn::before, .share-btn::before, .reply-trigger-btn::before { 
    content: ''; 
    position: absolute; 
    inset: -10px; 
}

.like-btn:active, .share-btn:active, .reply-trigger-btn:active, .download-btn:active { 
    transform: scale(0.88); 
}

.reply-trigger-btn:hover { background: rgba(0, 122, 255, 0.08); }
.reply-trigger-btn:disabled {
    color: var(--text-secondary);
    cursor: not-allowed;
    opacity: 0.5;
}
.reply-trigger-btn:disabled:hover { background: transparent; }



.like-btn svg { 
    transition: fill 0.2s, stroke 0.2s; 
    position: relative;
    top: 8px; 
    fill: none; 
    stroke: var(--accent-blue); 
    stroke-width: 2px; 
}

.like-btn.liked svg { 
    fill: #ff3b30; 
    stroke: #ff3b30; 
}

@keyframes heartPop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.3); }
    70%  { transform: scale(0.92); }
    100% { transform: scale(1); }
}
.like-btn.liked { animation: heartPop 0.35s ease forwards; }

.action-count { 
    font-size: 0.78rem; 
    font-weight: 500; 
    color: var(--text-secondary); 
    line-height: 1; 
    text-align: center; 
    position: relative;
    top: 0; 
    margin-top: 2px;
}

/* ── Divider ── */
.card-divider { height: 1px; background: var(--divider); margin: 0 18px; flex-shrink: 0; }

/* ── Meta ── */
.card-meta { display: flex; flex-direction: column; align-items: center; padding: 12px 18px 4px; gap: 2px; flex-shrink: 0; }
.meta-label { font-size: 0.78rem; font-weight: 500; color: var(--text-secondary); }
.meta-date  { font-size: 0.68rem; color: var(--text-secondary); opacity: 0.7; }

/* ── Bubble ── */
.card-body { flex: 1; padding: 4px 18px 16px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; min-height: 0; }
.blue-bubble {
    background: #4d9bff; 
    color: white; 
    padding: 12px 16px; 
    border-radius: 20px;
    line-height: 1.45; 
    font-size: 0.92rem; 
    letter-spacing: -0.005em; 
    word-wrap: break-word; 
    white-space: pre-wrap;
    overflow: hidden; 
    display: -webkit-box; 
    -webkit-box-orient: vertical; 
    flex-shrink: 0;
    box-shadow: 0 4px 10px -2px rgba(77, 155, 255, 0.28);
    align-self: flex-end; 
    max-width: 85%; 
    margin-left: auto; 
}
.status-row {
    display: flex; justify-content: space-between; align-items: center;
    gap: 10px; margin-top: auto; flex-shrink: 0;
}
.sender-text {
    font-size: 0.7rem; color: var(--text-secondary); font-weight: 600;
    padding-left: 2px; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.status-text {
    font-size: 0.7rem; color: var(--text-secondary); font-weight: 600;
    padding-right: 2px; flex-shrink: 0; white-space: nowrap;
}

/* ── Reply block (ადმინის პასუხი წერილში) ── */
.reply-block {
    background: rgba(118, 118, 128, 0.08);
    border-radius: 16px;
    padding: 10px 14px;
    align-self: flex-start;
    max-width: 85%;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-color);
}
[data-theme="dark"] .reply-block { background: rgba(255, 255, 255, 0.06); }
.reply-block-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 3px;
}



/* ფიდის ანიმაციისთვის */
#feed {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    opacity: 1;
    transform: translateY(0);
}

/* როცა ფიდი იცვლება */
#feed.feed-fade-out {
    opacity: 0;
    transform: translateY(10px);
}

/* ── Modal ── */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--modal-bg); backdrop-filter: blur(18px) saturate(130%); -webkit-backdrop-filter: blur(18px) saturate(130%);
    display: flex; justify-content: center; align-items: center; z-index: 2000; opacity: 0; visibility: hidden;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
    width: 92%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 18px;
    z-index: 10; position: relative; transform: scale(0.94);
}

.modal-overlay.active .modal-content { transform: scale(1); }

.modal-content .card {
    width: 340px; min-width: 340px; max-width: 340px; height: auto; min-height: 420px;
    overflow: visible !important; cursor: default; margin: 0 auto; background: var(--card-bg-solid);
    box-shadow: 0 2px 4px rgba(0,0,0,0.04), 0 24px 48px -12px rgba(0,0,0,0.16);
}
.modal-content .card .blue-bubble { overflow: visible !important; display: block !important; white-space: pre-wrap; }
.modal-content .card .card-body { overflow: visible; min-height: unset; }

@media (max-width: 360px) {
    .modal-content .card, .card { width: 300px; min-width: 300px; max-width: 300px; }
}

#modalHearts { position: absolute; top: 0; left: 0; width: 100%; height: 100%; min-height: 100vh; z-index: 0; pointer-events: none; overflow: hidden; }

.floating-heart {
    position: absolute;
    bottom: -10%;
    will-change: transform, opacity;
    animation: heartSway linear;
    pointer-events: none;
    z-index: 0;
    transform: translateZ(0); /* GPU layer */
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

@keyframes heartSway {
    0%   { transform: translateY(0) translateX(0) scale(0.4); opacity: 0; }
    8%   { opacity: 1; }
    50%  { transform: translateY(-55vh) translateX(calc(var(--sway) * 0.5)) scale(1); }
    100% { transform: translateY(-115vh) translateX(var(--sway)) scale(0.8); opacity: 0; }
}

.modal-pr-header {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    padding: 11px 26px; background: var(--card-bg); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-radius: 980px; width: fit-content; margin: 0 auto; box-shadow: var(--card-shadow); border: 1px solid var(--card-border);
}
.modal-pr-header img { height: 34px; border-radius: 8px; }
.modal-pr-header .logo { color: var(--text-color); font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.modal-pr-header .logo span { color: var(--accent-blue); }

/* ── Skeleton ── */
.skeleton-card {
    width: 100%; height: 300px; border-radius: var(--radius-lg);
    background: linear-gradient(100deg, rgba(118,118,128,0.06) 25%, rgba(118,118,128,0.13) 50%, rgba(118,118,128,0.06) 75%);
    background-size: 200% 100%; animation: skeleton-loading 1.5s infinite linear; border: 1px solid var(--card-border);
}
@keyframes skeleton-loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Toast ── */
#toast {
    position: fixed; bottom: 34px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: rgba(28,28,30,0.86); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
    color: #ffffff; padding: 13px 26px; border-radius: 980px; font-size: 0.85rem; font-weight: 600; letter-spacing: -0.005em;
    box-shadow: 0 8px 20px -4px rgba(0,0,0,0.18); z-index: 3000; opacity: 0; visibility: hidden; pointer-events: none; white-space: nowrap;
}
#toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

.hidden { display: none !important; }
.empty-state { width: 100%; text-align: center; padding: 64px 20px; color: var(--text-secondary); }
.empty-state i { font-size: 2.2rem; margin-bottom: 14px; display: block; color: var(--accent-pink); opacity: 0.85; }
.empty-state p { font-size: 0.95rem; }

@media (max-width: 400px) {
    .nav-socials { gap: 4px; } .social-link { width: 28px; height: 28px; } .nav-divider { display: none; }
}

/* ── Desktop Grid და კორექტული მედია ქუერი ── */
@media (min-width: 992px) {
    .container { max-width: 1200px; width: 95%; margin-top: 124px; display: block; }
    #search-wrapper { max-width: 500px; margin: 0 auto 16px; }
    .tabs-container { max-width: 500px; margin: 0 auto 32px auto; }
    #input-section { max-width: 600px; margin-left: auto; margin-right: auto; }
    #feed { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }

}


#submitBtn.cooldown {
    background: var(--text-secondary);
    box-shadow: none;
    cursor: not-allowed;
    transform: none !important;
    opacity: 0.75;
    font-variant-numeric: tabular-nums;
}

.song-results {
    position: absolute; top: 100%; left: 0; right: 0; margin-top: 4px;
    background: var(--card-bg-solid); border: 1px solid var(--card-border);
    border-radius: var(--radius-sm); box-shadow: var(--card-shadow-hover);
    max-height: 240px; overflow-y: auto; z-index: 50;
}
.song-result-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px;
    cursor: pointer;
}
.song-result-item:hover { background: var(--search-bg); }
.song-result-item img { width: 36px; height: 36px; border-radius: 6px; flex-shrink: 0; }
.song-result-title { font-size: 0.85rem; font-weight: 600; }
.song-result-artist { font-size: 0.75rem; color: var(--text-secondary); }
.song-result-empty { padding: 12px; font-size: 0.85rem; color: var(--text-secondary); text-align: center; }

.selected-song-chip {
    display: flex; align-items: center; gap: 8px;
    background: var(--search-bg); border-radius: 980px; padding: 6px 10px 6px 6px;
    width: fit-content; font-size: 0.82rem; margin-top: 6px;
}
.selected-song-chip img { width: 26px; height: 26px; border-radius: 50%; }
.selected-song-chip button {
    border: none; background: none; color: var(--text-secondary); cursor: pointer; font-size: 0.9rem;
}

.music-mini-row {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin-top: 3px; cursor: pointer;
}
.music-mini-row img {
    width: 16px; height: 16px; border-radius: 3px; flex-shrink: 0; object-fit: cover;
}
.music-mini-row .song-label {
    font-size: 0.72rem; color: var(--accent-blue); font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px;
}
.music-mini-row .toggle-icon {
    color: var(--accent-blue); font-size: 0.68rem; flex-shrink: 0;
}

#input-section {
    position: fixed;
    top: 84px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 420px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 20;
}

@media (min-width: 992px) {
    #input-section {
        max-width: 600px;
        top: 110px;
    }
}

.song-results {
    z-index: 100;
}

body:has(#input-section:not(.hidden))::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 10;
    pointer-events: none;
}




.music-modal-overlay.active .music-sheet {
    transform: translateY(0);
}

.music-sheet-handle {
    width: 36px; height: 5px;
    background: var(--divider);
    border-radius: 980px;
    margin: 0 auto 14px;
    flex-shrink: 0;
}

#musicSearchWrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 14px;
    flex-shrink: 0;
}
#musicSearchWrapper i {
    position: absolute; left: 16px; color: var(--text-secondary); font-size: 0.9rem; pointer-events: none;
}
#modalSongSearch {
    width: 100%;
    padding: 13px 16px 13px 42px;
    border-radius: 980px;
    border: 1px solid transparent;
    background: var(--search-bg);
    color: var(--text-color);
    font-size: 16px;
    outline: none;
    transition: box-shadow 0.25s ease, background 0.25s ease;
}
#modalSongSearch:focus {
    box-shadow: 0 0 0 4px rgba(0,122,255,0.15);
    background: rgba(118, 118, 128, 0.05);
}

.modal-song-results {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: env(safe-area-inset-bottom, 8px);
}

.modal-song-results .song-result-item {
    display: flex; align-items: center; gap: 13px;
    padding: 10px 8px;
    border-radius: 16px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}
.modal-song-results .song-result-item:hover { background: var(--search-bg); }
.modal-song-results .song-result-item:active { transform: scale(0.98); }
.modal-song-results .song-result-item img {
    width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0; object-fit: cover;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.modal-song-results .song-result-title { font-size: 0.93rem; font-weight: 600; }
.modal-song-results .song-result-artist { font-size: 0.8rem; color: var(--text-secondary); margin-top: 1px; }
.modal-song-results .song-result-empty { padding: 30px 12px; text-align: center; color: var(--text-secondary); font-size: 0.9rem; }

/* selected song chip-ს ცოტა Apple-style მრგვალობა */
.selected-song-chip {
    border-radius: 980px;
}
.selected-song-chip img { border-radius: 50%; }



/* ── Music Picker Modal (Instagram-style, synced fade + slide) ── */
.music-modal-overlay {
    align-items: flex-end;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: opacity 0.35s cubic-bezier(0.32, 0.72, 0, 1),
                visibility 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.music-sheet {
    width: 100%;
    max-width: 460px;
    max-height: 78vh;
    background: var(--card-bg-solid);
    border-radius: 28px 28px 0 0;
    padding: 10px 22px 22px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.music-modal-overlay.active .music-sheet {
    transform: translateY(0);
}

.music-sheet-handle {
    width: 36px; height: 5px;
    background: var(--divider);
    border-radius: 980px;
    margin: 0 auto 14px;
    flex-shrink: 0;
}

#musicSearchWrapper { position: relative; display: flex; align-items: center; margin-bottom: 14px; flex-shrink: 0; }
#musicSearchWrapper i { position: absolute; left: 16px; color: var(--text-secondary); font-size: 0.9rem; pointer-events: none; }
#modalSongSearch {
    width: 100%; padding: 13px 16px 13px 42px; border-radius: 980px;
    border: 1px solid transparent; background: var(--search-bg); color: var(--text-color);
    font-size: 16px; outline: none; transition: box-shadow 0.25s ease, background 0.25s ease;
}
#modalSongSearch:focus { box-shadow: 0 0 0 4px rgba(0,122,255,0.15); background: rgba(118, 118, 128, 0.05); }

.modal-song-results {
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    display: flex; flex-direction: column; gap: 2px;
    padding-bottom: env(safe-area-inset-bottom, 8px);
}
.modal-song-results .song-result-item {
    display: flex; align-items: center; gap: 13px; padding: 10px 8px;
    border-radius: 16px; cursor: pointer; transition: background 0.15s ease, transform 0.1s ease;
}
.modal-song-results .song-result-item:hover { background: var(--search-bg); }
.modal-song-results .song-result-item:active { transform: scale(0.98); }
.modal-song-results .song-result-item img {
    width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0; object-fit: cover;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.modal-song-results .song-result-title { font-size: 0.93rem; font-weight: 600; }
.modal-song-results .song-result-artist { font-size: 0.8rem; color: var(--text-secondary); margin-top: 1px; }
.modal-song-results .song-result-empty { padding: 30px 12px; text-align: center; color: var(--text-secondary); font-size: 0.9rem; }

#songSearch { cursor: pointer; caret-color: transparent; }

/* ── Reply Modal (იგივე bottom-sheet სტილი, რაც music modal-ს აქვს) ── */
/* ── Reply Modal (იგივე bottom-sheet სტილი, რაც music modal-ს აქვს) ── */
.reply-modal-overlay {
    align-items: flex-end;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: opacity 0.4s cubic-bezier(0.25, 0.1, 0.25, 1),
                visibility 0.4s cubic-bezier(0.25, 0.1, 0.25, 1),
                backdrop-filter 0.4s ease;
}

.reply-sheet {
    width: 100%;
    max-width: 460px;
    background: var(--card-bg-solid);
    border-radius: 28px 28px 0 0;
    padding: 10px 22px calc(22px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.18);
    transform: translateY(100%) scale(0.98);
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1),
                opacity 0.35s ease;
}

.reply-modal-overlay.active .reply-sheet {
    transform: translateY(0) scale(1);
    opacity: 1;
}

#replyMessage {
    background: rgba(118, 118, 128, 0.08);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 13px 16px;
    color: var(--text-color);
    outline: none;
    font-size: 16px;
    width: 100%;
    resize: none;
    line-height: 1.6;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
#replyMessage:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(0,122,255,0.12);
    background: rgba(118, 118, 128, 0.05);
}
[data-theme="dark"] #replyMessage {
    background: rgba(118, 118, 128, 0.16);
}
#replyCharCounter { font-size: 0.72rem; color: var(--text-secondary); text-align: right; padding-right: 4px; }
#replyCharCounter.warn { color: #f0a500; }
#replyCharCounter.danger { color: var(--accent-pink); }

#submitReplyBtn {
    padding: 15px; border-radius: var(--radius-sm); border: none;
    background: var(--accent-blue);
    color: white; font-weight: 600; cursor: pointer; font-size: 1rem; width: 100%;
    box-shadow: 0 4px 10px -1px rgba(0, 122, 255, 0.26);
    transition: transform 0.15s ease, opacity 0.15s ease;
}
#submitReplyBtn:hover { opacity: 0.92; transform: translateY(-1px); }
#submitReplyBtn:active { transform: scale(0.98); }
#submitReplyBtn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

#searchBtn {
    position: absolute; right: 30px; top: 50%; transform: translateY(-50%);
    background: var(--accent-blue); color: #fff; border: none;
    border-radius: 50px; padding: 8px 16px;
    font-weight: 600; font-size: 0.85rem; cursor: pointer;
}
#searchBtn:active { opacity: 0.85; }
#searchInput { padding-right: 90px; }

.hero { text-align: center; margin: 36px auto 28px; padding: 0 20px; }

.hero-title {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0 0.3em;
    font-family: 'HeroFont', 'Noto Sans Georgian', sans-serif;
    font-weight: normal;
    font-size: min(9vw, 5.2rem);
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--text-color);
}
.hero-title span {
    display: block;
    font-family: inherit;
    padding-bottom: 0.12em; /* ასოების "კუდები" რომ აღარ მოიჭრას */
}
.hero-title .accent {
    background: linear-gradient(135deg, #007aff 0%, #5ac8fa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
[data-theme="dark"] .hero-title .accent {
    background: linear-gradient(135deg, #4d9bff 0%, #7dd3fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-sub {
    max-width: 340px;           /* ტელეფონზე ბარათის სიგანე */
    margin: 0 auto 20px;
    text-align: left;
    min-height: 1.7em;
    font-family: 'HeroFont', 'Noto Sans Georgian', sans-serif;
    font-size: clamp(1.3rem, 4vw, 1.9rem);
    color: var(--text-color);
}
.hero-sub span { font-family: inherit; }

@media (max-width: 360px) {
    .hero-sub { max-width: 300px; }
}

@media (min-width: 992px) {
    /* კომპიუტერზე იწყება პირველი ბარათის მარცხენა კიდიდან */
    .hero-sub { max-width: calc(min(95vw, 1200px) - 44px); }
    #search-wrapper { max-width: 820px; }
    .tabs-container { max-width: 820px; }
}
.hero-sub span { font-family: inherit; }

@media (max-width: 991px) {
    .hero { margin: 18px 0 6px; }
    .hero-title {
        font-size: min(9vw, 2.4rem);
        line-height: 1.1;
    }
    #search-wrapper { margin-top: 0; }
}

.type-cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    margin-left: 3px;
    vertical-align: text-bottom;
    background: var(--accent-blue);
    animation: cursorBlink 1s steps(1) infinite;
}

.sub-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: -12px auto 22px;
}
.sub-tab-btn {
    font-family: 'Fira GO Georgian', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 980px;
    border: none;
    cursor: pointer;
    background: var(--search-bg);
    color: var(--text-secondary);
    transition: background-color 0.25s ease, color 0.25s ease;
}
.sub-tab-btn.active {
    background: var(--text-color);
    color: var(--bg-color);
}


html, body, button, a, input, textarea, .card {
    touch-action: manipulation;
}

@keyframes cursorBlink { 50% { opacity: 0; } }


@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 2px; }