.is-hidden {
    display: none !important;
}

.is-visible {
    display: block !important;
}

.friend-request-quick-view.is-visible,
.accepted-request-notification.is-visible,
.new-follower-notification.is-visible { display: flex !important; }

.notification-bell-container {
    position: relative;
    display: inline-block;
}

.notification-bell-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.5rem;
    text-decoration: none;
    transition: transform 0.2s;
}

.notification-bell-btn:hover {
    transform: scale(1.1);
}

.notification-bell-btn--guest {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    text-decoration: none;
}

.notification-total-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #e74c3c;
    color: white;
    border-radius: 999px;
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 800;
    min-width: 18px;
    white-space: nowrap;
    text-align: center;
    border: 2px solid #1a1a2e;
}

.friend-request-quick-view {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-top: 1px solid #2a2a3e;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.friend-request-quick-view:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
}

.accepted-request-notification {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(46, 204, 113, 0.1);
    border-left: 3px solid #2ecc71;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.new-follower-notification {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(102, 126, 234, 0.1);
    border-left: 3px solid #667eea;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.notification-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    max-height: 500px;
    background: #1a1a2e;
    border: 1px solid #2a2a3e;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    overflow: hidden;
    margin-top: 0.5rem;
}

.notification-dropdown.is-open,
.notification-dropdown.is-visible {
    display: block;
}

.notification-dropdown-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #2a2a3e;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-dropdown-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
}

.notification-dropdown-actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.notification-list-section-header { padding: .75rem 1rem; border-top: 1px solid #2a2a3e; background: rgba(0,212,255,.05); }
.notification-list-section-title { color: #00d4ff; font-size: .9rem; font-weight: 600; }
.standard-notification-item { position: relative; display: flex; align-items: center; gap: 1rem; padding: 1rem; cursor: pointer; transition: opacity .2s, background-color .2s; border-left: 3px solid #00d4ff; background: rgba(0,212,255,.05); }
.standard-notification-item.roulette-notification-item { border-left-color: #a855f7; background: rgba(147,51,234,.14); }
.standard-notification-icon { flex-shrink: 0; font-size: 2rem; }
.standard-notification-content { flex: 1; min-width: 0; }
.standard-notification-title { overflow: hidden; margin-bottom: .25rem; color: #fff; font-size: .95rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.standard-notification-message { margin-top: 4px; color: #a0a0b0; font-size: .85rem; line-height: 1.4; white-space: normal; }
.standard-notification-time { margin-top: 4px; color: #666; font-size: .75rem; }
.standard-notification-mark { position: absolute; top: 8px; right: 8px; padding: 0 4px; border: 0; background: transparent; color: #666; font-size: 1.2rem; cursor: pointer; }
.notification-is-read { opacity: .7; }
.notification-fade-out { opacity: 0; transition: opacity .3s; }
.lobby-toast { position: fixed; top: 2rem; right: 2rem; z-index: 9999; max-width: 360px; padding: 1rem 1.25rem; border-radius: 12px; background: linear-gradient(135deg,rgba(102,126,234,.95),rgba(118,75,162,.95)); box-shadow: 0 10px 40px rgba(102,126,234,.4); color: #fff; font-weight: 600; cursor: pointer; animation: lobbySlideIn .3s ease, lobbyFadeOut .5s ease 5s forwards; }
.lobby-toast.is-dismissing { animation: lobbyFadeOut .3s ease-out; }
@keyframes lobbySlideIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes lobbyFadeOut { to { opacity: 0; transform: translateX(24px); } }

.btn-dismiss-all {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-view-all {
    background: #667eea;
    color: white;
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
}

.dismiss-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: #a0a0b0;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 4px;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 1rem;
    border-bottom: 1px solid #2a2a3e;
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: rgba(102, 126, 234, 0.05);
}

.notification-item.unread {
    background: rgba(102, 126, 234, 0.05);
    border-left: 3px solid #667eea;
}

.standard-notification-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 212, 255, 0.05);
    border-left: 3px solid #00d4ff;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.standard-notification-item:hover {
    background: rgba(0, 212, 255, 0.1);
}

.standard-notification-item.roulette-notification-item:hover {
    background: rgba(147, 51, 234, 0.22) !important;
}

.notification-empty {
    padding: 2rem;
    text-align: center;
    color: #a0a0b0;
}

.fr-title {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.fr-title,
.accepted-title,
.follower-title {
    color: #ffffff;
}

.accepted-title {
    color: #2ecc71;
}

.new-follower-notification .follower-title {
    color: #667eea;
}

.friend-request-quick-view .fr-title {
    color: #00d4ff;
}

.accepted-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.follower-title {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.85rem;
    color: #a0a0b0;
}

.bell-icon {
    font-size: 1.62rem;
}

@keyframes slideIn { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-20px); } }

@media (max-width: 768px) {
    .notification-dropdown {
        right: -55px;
        width: min(260px, calc(100vw - 16px));
        max-width: calc(100vw - 16px);
        max-height: calc(100vh - 80px);
    }

    .notification-dropdown-header {
        gap: 0.6rem;
    }

    .notification-dropdown-title {
        min-width: 0;
    }

    .notification-dropdown-actions {
        flex-shrink: 0;
    }

    .notification-bell-btn:hover {
        transform: none;
    }

    .btn-dismiss-all,
    .btn-view-all {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 68px;
        min-width: 68px;
        height: 36px;
        min-height: 36px;
        box-sizing: border-box;
        padding: 0 0.6rem;
        line-height: 1;
        white-space: nowrap;
    }

    .bell-icon {
        font-size: 1.3rem;
        line-height: 1;
    }
    .notification-dropdown > :first-child {
        padding: 0.5rem 0.8rem !important;
    }
    .friend-request-quick-view,
    .accepted-request-notification,
    .new-follower-notification,
    .standard-notification-item,
    .notification-item {
        padding: 0.5rem 0.8rem !important;
        gap: 8px !important;
    }
    #notificationList .notification-empty {
        padding: 1.2rem 0.8rem !important;
    }
    .notification-total-badge {
        font-size: 0.6rem !important;
        padding: 0.12rem 0.3rem !important;
    }
}
