/*
 * Font Import - Győződj meg róla, hogy az "Inter" font be van töltve (pl. Google Fonts-ról)
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===================================
   Global Styles - Az általad megadott alap stílusok
   (Ezek az értesítések kontextusában maradhatnak itt,
   de érdemes lehet egy fő CSS fájlba helyezni, ha globálisak.)
   =================================== */
body {
    background: var(--color-background-dark); /* Fő háttér szín változóval */
    color: var(--color-text-default); /* Alap szövegszín változóval */
    font-family: 'Inter', Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    box-sizing: border-box;
    /* Ezek a tulajdonságok valószínűleg a fő layout CSS-ben vannak/lesznek:
       display: flex;
       flex-direction: column; */
}

/* Scrollbar stílusok */
::-webkit-scrollbar {
    width: 8px;
    background: var(--color-container-background); /* Track is a bit lighter */
}
::-webkit-scrollbar-thumb {
    background: var(--color-item-background); /* Thumb is a bit darker */
    border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-dropdown-header-background); /* Darker on hover */
}

/* Színváltozók finomhangolása és újak hozzáadása */
:root {
    --color-primary: #a78bfa; /* Fő lilás szín */
    --color-primary-dark: #7a51e2; /* Sötétebb lila */
    --color-primary-light: #ede0ff; /* Világos lila hoverhez */
    --color-accent-purple: #6c5be8; /* ÚJ: Egy köztes árnyalat a gombokhoz, kiemelésekhez */
    --color-accent-blue: #00bcd4; /* ÚJ: Egy élénkebb kék kiemeléshez, pl. új jelzők */
    --color-accent-green: #8ce99a; /* ÚJ: Zöld, sikerhez */

    --color-background-dark: #121215; /* SÖTÉTEBB BODY HÁTTÉR - Mélység eléréséhez */
    --color-container-background: #18181b; /* Konténer háttér (most ez a body régi színe) */
    --color-card-background: #211e2e; /* Kártya háttér (most ez a konténer régi színe) */
    --color-item-background: #2f2c42; /* Elem háttér (pl. stat item, kör gomb, feed item alja) */
    --color-item-hover: #3c3857; /* ÚJ: Elem hover háttér */
    --color-dropdown-background: #231e30; /* Értesítési menü háttér (mélyebb lila) */
    --color-dropdown-header-background: #2f2c42; /* Értesítési menü fejléc háttér */
    --color-unread-item-background: #2e283f; /* Olvasatlan értesítés háttér (kicsit eltérő lila) */
    --color-read-item-background: #282436; /* Olvasott értesítés háttér */
    --color-toast-background: #312c46; /* Toast értesítés háttér */
    --color-toast-new-background: #3c3857; /* Új toast értesítés háttér */

    --color-text-default: #e7e4fb; /* Alap szövegszín */
    --color-text-light: #c7beff; /* Világosabb szövegszín */
    --color-text-darker: #a3a1be; /* Sötétebb szövegszín (pl. icon default) */
    --color-text-placeholder: #b6b6cc; /* Helyőrző szövegszín */
    --color-text-red: #ff7eab; /* Piros/rózsaszín */
    --color-text-green: #8ce99a; /* Zöld */
    --color-text-blue: #72b9ff; /* Kék */
    --color-text-yellow: #ffda79; /* Sárga */

    --color-border-light: #2f2c42; /* Világosabb elválasztó vonal */
    --color-border-dark: #1f1d2b; /* ÚJ: Mélyebb határvonal, pl. navbar alja */
    --color-badge-background: #e23c51; /* Badge háttér (piros) */

    --shadow-light: rgba(0,0,0,0.1);
    --shadow-medium: rgba(0,0,0,0.15);
    --shadow-strong: rgba(0,0,0,0.25);
    --shadow-purple-light: rgba(122,81,226,0.1);
    --shadow-purple-medium: rgba(122,81,226,0.2);
    --shadow-purple-strong: rgba(122,81,226,0.4);
    --shadow-glow-primary: rgba(167,139,250,0.5); /* ÚJ: Fő szín árnyék */
    --shadow-glow-accent: rgba(0,188,212,0.4); /* ÚJ: Kiemelő szín árnyék */
}

/* ===================================
   Notification Bell
   =================================== */
.notification-bell-wrapper {
    position: relative;
    display: inline-block;
    margin-right: 1rem;
}

#notification-bell {
    all: unset; /* Eltávolítja az alapértelmezett gomb stílusokat */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 3rem; /* Enyhén nagyobb harang gomb, hogy passzoljon a circle-btn-hez (48px) */
    width: 3rem;
    border-radius: 50%;

    transition: background-color 0.2s ease-in-out, fill 0.2s ease-in-out, transform 0.2s ease-in-out;

    background-color: var(--color-item-background);
    box-shadow: 0 2px 10px var(--shadow-light);
    border: none;
    outline: none;
}

#notification-bell:hover,
#notification-bell:focus-visible {
    background-color: var(--color-item-hover); /* Új hover szín */
    transform: scale(1.05);
    box-shadow: 0 4px 15px var(--shadow-medium);
}

#notification-bell svg {
    width: 1.5rem; /* Az ikon mérete (24px) */
    height: 1.5rem;
    fill: var(--color-text-darker);
    transition: fill 0.2s ease-in-out;
}

#notification-bell:hover svg,
#notification-bell:focus-visible svg {
    fill: var(--color-primary);
}

#notification-badge {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    min-width: 1.1rem; /* Kicsit nagyobb badge, hogy elférjen benne a szám */
    height: 1.1rem;

    background-color: var(--color-badge-background);
    color: var(--color-text-light);
    border-radius: 0.6875rem;
    font-size: 0.75rem; /* Font méret a számhoz */
    text-align: center;
    line-height: 1.1rem; /* A szöveg vertikális középre igazítása */
    font-weight: 700;

    display: none; /* Alapértelmezetten rejtett, JS mutatja meg */

    border: 2px solid var(--color-background-dark);
    z-index: 11;
    box-shadow: 0 0 0 2px var(--color-background-dark);
    padding: 0 0.2rem;
    pointer-events: none;
}

#notification-badge.active {
    display: block;
    animation: notif-badge-pop 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes notif-badge-pop {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); }
}

---

/* ===================================
   Notification Dropdown
   =================================== */
#notification-dropdown {
    display: none; /* JS fogja a .show osztályt toggle-elni, felülírva ezt */
    position: absolute;
    right: 0;
    top: 3.6rem; /* A harang gomb méretéhez igazítva (48px + space) */

    background-color: var(--color-dropdown-background);
    color: var(--color-text-default);
    border-radius: 1.5rem;
    box-shadow: 0 0.8rem 2.5rem var(--shadow-strong);

    min-width: 23rem; /* Kicsit szélesebb */
    max-width: 450px; /* Asztali maximum szélesség (ezt javaslom fixálni asztali nézetben) */
    max-height: 70vh;
    overflow-y: auto;
    z-index: 9999;
	width: clamp(23rem, 50vw, 450px);

    animation: slideDown 0.25s ease-out forwards;

    width: auto; /* Asztali nézetben hagyjuk, hogy a min/max-width és a tartalom határozza meg */
}

/* JAVÍTÁS: A .hidden osztály kezelése JS által */
#notification-dropdown.hidden {
    display: none;
}
#notification-dropdown.show {
    display: block;
}


@keyframes slideDown {
    from { opacity: 0; transform: translateY(-1.375rem); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-title {
    font-weight: 700;
    font-size: 1.2rem;
    padding: 1.2rem 1.25rem 0.8rem 1.25rem;
    border-bottom: 1px solid var(--color-border-light);
    letter-spacing: 0.05em;
    background-color: var(--color-dropdown-header-background);
    border-top-left-radius: 1.5rem;
    border-top-right-radius: 1.5rem;
    color: var(--color-primary);

    /* Új: Flexbox beállítások, hogy a cím és a gomb egymás mellett legyenek */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Stílusok a "Mark All As Read" gombhoz */
.mark-all-read-btn {
    all: unset; /* Eltávolítja az alapértelmezett gomb stílusokat */
    cursor: pointer;
    font-size: 0.85rem; /* Kisebb font méret */
    font-weight: 600;
    color: var(--color-text-light); /* Világosabb szöveg */
    padding: 0.5rem 0.8rem; /* Kisebb padding */
    border-radius: 0.8rem; /* Enyhén lekerekítve */
    transition: background-color 0.2s, color 0.2s;
    flex-shrink: 0; /* Ne zsugorodjon össze */
    margin-left: 10px; /* Egy kis hely a címtől */
    line-height: 1; /* Hogy a szöveg jól illeszkedjen a magassághoz */
}

.mark-all-read-btn:hover {
    background-color: var(--color-item-hover); /* Kicsit sötétebb háttér hoveren */
    color: var(--color-primary); /* Fő lila szín hoveren */
}

#dropdown-list {
    padding: 0.5rem 0;
}

.notification-item {
    display: flex;
    align-items: center;
    gap: 0.85rem; /* Nagyobb rés az avatar és a tartalom között */

    padding: 0.9rem 1.5rem; /* Több padding, mint a default */
    border-bottom: 1px solid var(--color-item-background); /* Elem háttér színe, mint elválasztó */
    background-color: transparent;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
    font-size: 1rem;
    border-radius: 0.75rem; /* Lekerekítettebb sarkok az item-en belül */
    position: relative;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {
    background-color: var(--color-unread-item-background);
    border-left: 4px solid var(--color-primary);
    font-weight: 600;
}

.notification-item.read {
    opacity: 0.7;
    background-color: var(--color-read-item-background);
}

.notification-item:hover {
    background-color: var(--color-item-hover); /* Új hover szín */
}

/* Avatar stílusok */
.notification-avatar {
    width: 2.5rem; /* Az avatar mérete (40px) */
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--color-primary); /* Hasonló border, mint a profile-avatar */
    box-shadow: 0 2px 8px var(--shadow-purple-light); /* Enyhe árnyék */
}

.notification-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0.1875rem; /* Enyhén nagyobb rés a szövegsorok között */
}

.notification-type {
    color: var(--color-primary); /* Fő szín */
    font-weight: 600;
    font-size: 0.95rem; /* Kicsit kisebb */
}

.admin-announcement-title {
    display: block;
    font-weight: 700;
    font-size: 0.98rem;
    color: #f97316;
    margin: 0.25rem 0 0.35rem;
    line-height: 1.35;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.notification-msg {
    word-break: break-word;
    color: var(--color-text-light); /* Világosabb szöveg */
    line-height: 1.4; /* Jobb olvashatóság */
    white-space: pre-wrap;
}

.notification-date {
    font-size: 0.78rem; /* Kicsit kisebb */
    color: var(--color-text-darker); /* Sötétebb, kevésbé hangsúlyos */
    margin-top: 0.3rem; /* Több hely a dátum fölött */
    text-align: right;
    letter-spacing: 0.01em;
}

.notifications-loading,
.notifications-empty,
.notifications-error {
    text-align: center;
    color: var(--color-text-placeholder);
    margin: 1.5rem 0; /* Több margó */
    font-size: 1.05rem; /* Kicsit nagyobb font */
}

---

/* ===================================
   Toast Notifications
   =================================== */
#notification-toast-container {
    position: fixed;
    right: 1.5rem; /* Nagyobb margó jobbra és alulra */
    bottom: 1.5rem;
    z-index: 11000;
    pointer-events: none;
}

.notification-toast {
    background-color: var(--color-toast-background);
    color: var(--color-text-default);
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 0.5rem 1.5rem var(--shadow-medium);
    margin-bottom: 0.8rem;
    font-size: 1.05rem;
    font-weight: 500;
    min-width: clamp(15rem, 40vw, 18rem);
    max-width: 350px;
    opacity: 0.98;
    pointer-events: auto;
    transition: opacity 0.29s ease-in-out, transform 0.2s ease-in-out;
    cursor: pointer;
    border-left: 5px solid var(--color-primary);
}

.notification-toast.new {
    background-color: var(--color-toast-new-background);
    border-color: var(--color-badge-background);
}

.notification-toast:hover {
    opacity: 1;
    transform: translateY(-3px);
}

---

/* ===================================
   Mobil optimalizáció (Csak a notification részeket érinti)
   =================================== */
@media (max-width: 45em) { /* 720px */
    #notification-dropdown {
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        top: 4.2rem;
        /* Kijavított szélesség a mobil túlfolyás elkerülésére */
        width: calc(100vw - 40px); /* 20px margó mindkét oldalról */
        border-radius: 1.25rem;
        padding-bottom: 8vw;
        box-shadow: 0 0.8rem 2.8rem var(--shadow-strong);
    }

    .dropdown-title {
        border-radius: 1.25rem 1.25rem 0 0;
        /* Fix pixel padding a vw helyett, a stabilitás érdekében */
        padding: 1.2rem 20px 0.8rem 20px;
        font-size: 1.25rem;
    }

    .notification-item {
        /* Fix pixel padding a vw helyett */
        padding: 1.1rem 20px;
        font-size: 1.05rem;
    }

    /* Módosítás a toast notification konténerre is, ha túlfolyik mobil nézetben */
    #notification-toast-container {
        right: 10px; /* Kisebb margó jobbra */
        bottom: 10px; /* Kisebb margó alulra */
        width: calc(100vw - 20px); /* Hogy ne folyjon túl, ha több toast van egymás alatt */
        display: flex;
        flex-direction: column;
        align-items: flex-end; /* Jobbra igazítja a toastokat */
    }

    .notification-toast {
        max-width: 100%; /* Engedi, hogy kitöltse a konténerét */
        min-width: unset; /* Ne legyen fix min-width, ha a konténer kisebb */
        width: 100%; /* Kitölti a #notification-toast-container szélességét */
    }

    /* Mobilra igazított badge méret */
    #notification-badge {
        width: 16px;
        height: 16px;
        font-size: 0.7rem;
        line-height: 16px; /* Fontos, hogy a szöveg vertikálisan középen legyen */
        top: 5px;
        right: 5px;
        border: 1.5px solid var(--color-background-dark);
    }
}

@media (max-width: 28.125em) { /* 450px */
    #notification-dropdown {
        /* Még szűkebb biztonsági margó a nagyon kis képernyőkön */
        width: calc(100vw - 20px); /* 10px margó mindkét oldalról */
        border-radius: 0; /* Teljesen egyenes sarkok a teljes szélességhez */
        left: 50%; /* Középen tartás */
        transform: translateX(-50%);
        top: 3.5rem;
        max-height: 85vh;
    }

    .dropdown-title,
    .notification-item {
        /* Fix pixel padding itt is */
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Toast notification mobil optimalizálás */
    #notification-toast-container {
        right: 5px;
        bottom: 5px;
        width: calc(100vw - 10px);
    }

    /* Még kisebb mobilra igazított badge méret */
    #notification-badge {
        width: 14px;
        height: 14px;
        font-size: 0.65rem;
        line-height: 14px;
        top: 3px;
        right: 3px;
    }
}

/* ===================================
   Battle Notification Styles
   =================================== */
.battle-notification {
    background: linear-gradient(135deg, #2a1f4a 0%, #1e1535 100%);
    border: 2px solid #7a51e2;
    border-radius: 15px;
    padding: 20px;
    margin: 10px 0;
}

.battle-notification .icon {
    font-size: 1.5rem;
    margin-right: 10px;
}

.battle-notification .battle-title {
    color: #ffd700;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.battle-notification .dj-name {
    color: #a783f7;
    font-weight: 600;
}

.battle-notification .dates {
    color: #a783f7;
    font-size: 0.9rem;
    margin: 8px 0;
}

.battle-notification .actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.action-btn {
    background: linear-gradient(135deg, #7a51e2 0%, #a783f7 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
}

.action-btn:hover {
    background: linear-gradient(135deg, #a783f7 0%, #7a51e2 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(122, 81, 226, 0.3);
}

.action-btn:active {
    transform: translateY(0);
}

.action-btn.accept {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
}

.action-btn.accept:hover {
    background: linear-gradient(135deg, #22c55e 0%, #4ade80 100%);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.action-btn.decline {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
}

.action-btn.decline:hover {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.battle-notification-inactive {
    border-color: rgba(120, 120, 150, 0.55);
}

.battle-invite-expired-note {
    color: #c4b5fd;
    font-size: 0.85rem;
    margin-top: 10px;
    line-height: 1.45;
}

.action-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

.action-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.accepted-msg {
    color: #22c55e;
    font-weight: 600;
    text-align: center;
    padding: 10px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.declined-msg {
    color: #ef4444;
    font-weight: 600;
    text-align: center;
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Battle Status Styles */
.battle-status {
    background: linear-gradient(135deg, #2a1f4a 0%, #1e1535 100%);
    border: 2px solid #7a51e2;
    border-radius: 15px;
    padding: 20px;
    margin: 15px 0;
    text-align: center;
}

.status-text {
    color: #a783f7;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.progress-bar {
    background: rgba(122, 81, 226, 0.2);
    border-radius: 10px;
    height: 8px;
    margin: 10px 0;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    background: linear-gradient(90deg, #7a51e2, #a783f7);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    color: #ffd700;
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 8px;
}
