:root {
    --primary: #FF69B4;
    --bg-light: #fdfdfd;
    --bg-dark: #000000;
    --card-light: #ffffff;
    --card-dark: #1a1a1a;
    --text-light: #1a1a1a;
    --text-dark: #ffffff;
    
    /* Increased Sizes */
    --avatar-size: 58px; 
    --notif-gap: 15px;
}

/* Theme Logic */
body {
    background-color: var(--bg-light);
    color: var(--text-light);
}
@media (prefers-color-scheme: dark) {
    body { background-color: var(--bg-dark); color: var(--text-dark); }
    :root { --card-color: var(--card-dark); --text-color: var(--text-dark); }
}
@media (prefers-color-scheme: light) {
    :root { --card-color: var(--card-light); --text-color: var(--text-light); }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    min-width: 320px;
    line-height: 1.4;
}

.notifications-container {
    max-width: 650px; /* Slightly wider */
    margin: 0 auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px; /* Tight gap for a feed feel */
}

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

.notif-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
}

.mark-all-read-btn {
    font-size: 0.85rem;
    color: var(--primary);
    background: none;
    border: 1px solid var(--primary);
    border-radius: 20px;
    padding: 6px 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.mark-all-read-btn:hover {
    background: var(--primary);
    color: #fff;
}

/* ---------- The Card ---------- */
.notif-card {
    display: flex;
    align-items: center; /* Keeps everything vertically centered */
    gap: var(--notif-gap);
    padding: 16px; /* Bigger padding */
    background-color: var(--card-color);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
    border: 1px solid rgba(128, 128, 128, 0.1);
}

.notif-card:active {
    background-color: rgba(128, 128, 128, 0.1);
    transform: scale(0.98);
}

.notif-card.unread {
    background-color: rgba(255, 105, 180, 0.05);
    border-left: 5px solid var(--primary);
}

/* ---------- Elements ---------- */
.notif-left { flex-shrink: 0; }

.avatar {
    width: var(--avatar-size);
    height: var(--avatar-size);
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.svg-fallback {
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.svg-fallback svg { width: 35px; height: 35px; }

.notif-info {
    flex: 1;
    min-width: 0; /* Prevents text overflow */
}

.notif-text {
    font-size: 1.05rem; /* Bigger text */
    word-wrap: break-word;
}

.notif-text strong {
    color: var(--primary);
    font-weight: 700;
}

.notif-time {
    font-size: 0.85rem;
    color: #888;
    margin-top: 4px;
    display: block;
}

.notif-right {
    flex-shrink: 0;
}

.notif-media {
    width: 60px; /* Bigger preview */
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid rgba(128, 128, 128, 0.2);
}

/* ---------- Responsive (Mobile First) ---------- */

/* For ultra-small screens (320px - 375px) */
@media (max-width: 375px) {
    :root {
        --avatar-size: 48px;
        --notif-gap: 10px;
    }
    .notif-card {
        padding: 12px;
    }
    .notif-text {
        font-size: 0.95rem;
    }
    .notif-media {
        width: 50px;
        height: 50px;
    }
}

/* Desktop Hover */
@media (min-width: 768px) {
    .notif-card:hover {
        background-color: rgba(128, 128, 128, 0.05);
    }
}