/* =========================================================================
   INTEGRATED FLAT HEADER WITH PREMIUM GLASS DROP-DOWN (2026 EDITION)
   Файл: assets/css/header.css
   ========================================================================= */

.app-header.flat-integrated {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    z-index: 100;
    box-sizing: border-box;
}

.app-header.flat-integrated .header-left,
.app-header.flat-integrated .header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 11; /* Чтобы кнопки были выше абсолютного центра */
}

.app-header.flat-integrated .logo.small {
    font-family: 'Unbounded', sans-serif;
    font-weight: 900;
    font-size: 15px;
    color: #ffffff;
    letter-spacing: 0.5px;
    margin: 0;
    cursor: pointer;
    text-transform: uppercase;
    transition: opacity 0.2s ease;
    text-decoration: none; /* Фикс для ссылки */
    display: block;
}

.app-header.flat-integrated .logo.small:hover {
    opacity: 0.8;
}

.app-header.flat-integrated button {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    outline: none;
    padding: 0;
    width: 28px;
    height: 28px;
    border-radius: 0;
}

.app-header.flat-integrated button:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.app-header.flat-integrated button:active {
    transform: scale(0.95);
}

.app-header.flat-integrated button svg {
    width: 18px;
    height: 18px;
}

/* КНОПКА УСТАНОВКИ ПРИЛОЖЕНИЯ (PWA) - ПРЕМИАЛЬНАЯ ПУЛЬСАЦИЯ */
.app-header.flat-integrated .mobile-app-btn {
    width: auto;
    height: 28px;
    padding: 0 12px;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    color: #fff;
    gap: 6px;
    animation: premium-pulse 2s infinite;
}

.app-header.flat-integrated .mobile-app-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.app-header.flat-integrated .mobile-app-btn svg {
    width: 14px;
    height: 14px;
}

@keyframes premium-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.25);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.app-header.flat-integrated .bell-btn,
.app-header.flat-integrated .add-post-btn {
    position: relative;
}

#stable-notif-zone {
    position: relative;
}

.notif-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: var(--p-accent, #4b628a);
    color: white;
    font-size: 9px;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    min-width: 15px;
    height: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--bg-main, #050505);
}

.notif-badge.hidden { display: none; }

/* ДРОПДАУН УВЕДОМЛЕНИЙ (Коробка) */
.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    background: rgba(15, 15, 16, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.25s ease, transform 0.25s ease;
    transform-origin: top right;
}

.notif-dropdown.hidden { 
    display: none;
    opacity: 0;
    transform: scale(0.96);
}

.notif-header {
    padding: 16px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.02);
    letter-spacing: 0.2px;
}

.notif-list {
    max-height: 360px;
    overflow-y: auto;
}

.notif-list::-webkit-scrollbar { width: 4px; }
.notif-list::-webkit-scrollbar-track { background: transparent; }
.notif-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 10px; }

/* ПРЕМИАЛЬНЫЕ СТИЛИ ДЛЯ СОДЕРЖИМОГО УВЕДОМЛЕНИЙ */
.notif-empty-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    gap: 16px;
}

.notif-empty-icon {
    color: rgba(255, 255, 255, 0.1);
    width: 54px;
    height: 54px;
    transition: transform 0.5s ease;
}

.notif-empty-box:hover .notif-empty-icon {
    transform: scale(1.05) rotate(-5deg);
    color: rgba(255, 255, 255, 0.15);
}

.notif-empty-text {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 500;
    text-align: center;
    margin: 0;
    line-height: 1.5;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.2s ease;
    cursor: pointer;
    position: relative;
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.notif-item.unread::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--p-accent, #4b628a);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--p-accent, #4b628a);
}

.notif-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.notif-text-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.notif-text {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    margin: 0;
}

.notif-user {
    font-weight: 700;
    color: #ffffff;
}

.notif-time {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 500;
    margin-top: 2px;
}

/* =========================================================================
   PREMIUM MINI PLAYER IN HEADER
   ========================================================================= */

.header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 10;
}

.header-mini-player {
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    padding: 0;
    gap: 10px;
    cursor: pointer;
    max-width: 220px;
}

.header-mini-player.hidden {
    display: none !important;
}

.hmp-cover {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2a2a35, #1e1e24);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    overflow: hidden;
}

.hmp-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 60px; 
}

.hmp-title {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    line-height: 1.2;
}

.hmp-artist {
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    line-height: 1.2;
}

.hmp-controls {
    display: flex;
    align-items: center;
    gap: 2px;
}

.hmp-btn {
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.hmp-btn:hover {
    color: #ff2b54 !important;
    transform: scale(1.1);
}

.hmp-btn i { font-size: 11px; }

/* Анимация вращения обложки */
@keyframes hmp-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.hmp-cover.playing {
    animation: hmp-spin 6s linear infinite;
}

/* Глобальная полоска прогресса под шапкой (Увеличена зона клика) */
.hmp-progress-track {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 14px; /* Невидимая сенсорная зона для пальцев */
    background: transparent;
    z-index: 101;
    cursor: pointer;
    display: flex;
    align-items: flex-end;
}

/* Полупрозрачная подложка всей линии для наглядности */
.hmp-progress-track::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px; /* Толщина подложки */
    background: rgba(255, 255, 255, 0.15);
}

.hmp-progress-fill {
    position: relative;
    height: 4px; /* Утолщенная активная линия */
    background: linear-gradient(90deg, #6b48ff, #ff2b54);
    width: 0%;
    transition: width 0.1s linear;
    border-radius: 0 4px 4px 0;
    box-shadow: 0 -2px 10px rgba(255, 43, 84, 0.6);
    pointer-events: none;
}

.hmp-progress-track.hidden {
    display: none !important;
}

@media (max-width: 360px) {
    .hmp-info { width: 45px; }
    .header-left .logo { font-size: 13px; }
}