:root {
    /* Mặc định: Pink Love */
    --pink-main: #ff4757;
    --pink-hover: #ff6b81;
    --pink-light: #ffafbd;
    --pink-soft-bg: #fff0f3;
    --pink-card-bg: rgba(255, 255, 255, 0.92);
    --text-dark: #2d3436;
    --text-muted: #636e72;
    --purple-accent: #6c5ce7;
    --blue-accent: #0984e3;
    --bg-gradient: linear-gradient(135deg, #ffafbd 0%, #ffc3a0 50%, #ffdde1 100%);
    --navbar-bg: rgba(255, 255, 255, 0.85);
    --card-shadow: 0 20px 50px rgba(255, 107, 129, 0.2);
}

/* 1. Chủ đề Tình yêu màu hồng (pink-love) */
[data-theme="pink-love"] {
    --pink-main: #ff4757;
    --pink-hover: #ff6b81;
    --pink-light: #ffafbd;
    --pink-soft-bg: #fff0f3;
    --pink-card-bg: rgba(255, 255, 255, 0.92);
    --text-dark: #2d3436;
    --text-muted: #636e72;
    --purple-accent: #6c5ce7;
    --blue-accent: #0984e3;
    --bg-gradient: linear-gradient(135deg, #ffafbd 0%, #ffc3a0 50%, #ffdde1 100%);
    --navbar-bg: rgba(255, 255, 255, 0.85);
    --card-shadow: 0 20px 50px rgba(255, 107, 129, 0.2);
}

/* 2. Chủ đề Tình yêu màu tối (dark-love) */
[data-theme="dark-love"] {
    --pink-main: #ff6584;
    --pink-hover: #ff8da1;
    --pink-light: #4a2e35;
    --pink-soft-bg: #1e1b24;
    --pink-card-bg: rgba(30, 27, 36, 0.92);
    --text-dark: #f1f2f6;
    --text-muted: #a4b0be;
    --purple-accent: #a29bfe;
    --blue-accent: #74b9ff;
    --bg-gradient: linear-gradient(135deg, #0f0c1b 0%, #1f1a3a 50%, #2a1b2e 100%);
    --navbar-bg: rgba(20, 18, 28, 0.85);
    --card-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* 3. Chủ đề Mùa xuân (spring) */
[data-theme="spring"] {
    --pink-main: #e84393;
    --pink-hover: #fd79a8;
    --pink-light: #fab1a0;
    --pink-soft-bg: #f1f8e9;
    --pink-card-bg: rgba(255, 255, 255, 0.92);
    --text-dark: #2d3436;
    --text-muted: #636e72;
    --purple-accent: #6c5ce7;
    --blue-accent: #00b894;
    --bg-gradient: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);
    --navbar-bg: rgba(255, 255, 255, 0.85);
    --card-shadow: 0 20px 50px rgba(0, 184, 148, 0.15);
}

/* 4. Chủ đề Mùa hè (summer) */
[data-theme="summer"] {
    --pink-main: #e17055;
    --pink-hover: #fab1a0;
    --pink-light: #ffeaa7;
    --pink-soft-bg: #fffde7;
    --pink-card-bg: rgba(255, 255, 255, 0.92);
    --text-dark: #2d3436;
    --text-muted: #636e72;
    --purple-accent: #fdcb6e;
    --blue-accent: #0984e3;
    --bg-gradient: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    --navbar-bg: rgba(255, 255, 255, 0.85);
    --card-shadow: 0 20px 50px rgba(225, 112, 85, 0.15);
}

/* 5. Chủ đề Mùa thu (autumn) */
[data-theme="autumn"] {
    --pink-main: #d35400;
    --pink-hover: #e67e22;
    --pink-light: #f5b041;
    --pink-soft-bg: #fbe9e7;
    --pink-card-bg: rgba(255, 255, 255, 0.92);
    --text-dark: #2d3436;
    --text-muted: #636e72;
    --purple-accent: #8e44ad;
    --blue-accent: #2980b9;
    --bg-gradient: linear-gradient(135deg, #ff9966 0%, #ff5e62 100%);
    --navbar-bg: rgba(255, 255, 255, 0.85);
    --card-shadow: 0 20px 50px rgba(211, 84, 0, 0.15);
}

/* 6. Chủ đề Mùa đông (winter) */
[data-theme="winter"] {
    --pink-main: #0984e3;
    --pink-hover: #74b9ff;
    --pink-light: #dfe6e9;
    --pink-soft-bg: #e0f7fa;
    --pink-card-bg: rgba(255, 255, 255, 0.92);
    --text-dark: #2d3436;
    --text-muted: #636e72;
    --purple-accent: #a29bfe;
    --blue-accent: #0984e3;
    --bg-gradient: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
    --navbar-bg: rgba(255, 255, 255, 0.85);
    --card-shadow: 0 20px 50px rgba(9, 132, 227, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Quicksand', sans-serif;
    min-height: 100vh;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
}

/* TOP NAVIGATION BAR */
.top-navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--navbar-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.08);
}

.brand-logo {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    color: var(--pink-main);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: bold;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn {
    padding: 8px 14px;
    border-radius: 20px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
    text-decoration: none;
}

.btn-love-space {
    background: linear-gradient(45deg, var(--pink-main), var(--pink-hover));
    color: #fff;
    box-shadow: 0 3px 10px rgba(255, 71, 87, 0.35);
}

.btn-add-diary {
    background: var(--pink-card-bg);
    color: var(--pink-main);
    border: 1.5px solid var(--pink-light);
}

.btn-profile-edit {
    background: var(--pink-card-bg);
    color: var(--text-dark);
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 8px 10px;
    border-radius: 50%;
    width: 36px; height: 36px;
    justify-content: center;
}

/* CONTAINER */
.container {
    max-width: 1050px;
    margin: 15px auto 0;
    padding: 0 12px;
    flex: 1;
    width: 100%;
}

@media (max-width: 768px) {
    .nav-text { display: none; }
}

/* NOTIFICATIONS */
.notification-wrapper {
    position: relative;
    display: inline-block;
}

.btn-notification {
    position: relative;
    background: var(--pink-card-bg);
    border: 1px solid var(--pink-light);
    color: var(--pink-main);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-notification:hover {
    background: var(--pink-main);
    color: #fff;
    transform: scale(1.05);
}

.notif-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #ff3838;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid #fff;
    display: none;
}

.notification-dropdown {
    position: absolute;
    top: 48px;
    right: 0;
    width: 330px;
    max-width: calc(100vw - 24px);
    max-height: 420px;
    background: var(--pink-card-bg);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 1px solid rgba(255, 107, 129, 0.2);
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    animation: fadeInNotif 0.2s ease-out;
}

@media (max-width: 480px) {
    .notification-dropdown {
        right: -50px;
        width: 300px;
    }
}

@keyframes fadeInNotif {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.notif-header {
    padding: 12px 16px;
    background: var(--pink-soft-bg);
    border-bottom: 1px solid var(--pink-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notif-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.btn-mark-all {
    font-size: 0.75rem;
    color: var(--pink-main);
    cursor: pointer;
    background: none;
    border: none;
    font-weight: 600;
}

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

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.notif-item:hover {
    background-color: var(--pink-soft-bg);
}

.notif-item.unread {
    background-color: var(--pink-soft-bg);
}

.notif-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--pink-main);
    flex-shrink: 0;
}

.notif-content {
    flex: 1;
}

.notif-item-title {
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 2px;
    color: var(--text-dark);
}

.notif-item-msg {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-item-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.notif-empty {
    text-align: center;
    padding: 30px 15px;
    color: var(--text-muted);
    font-size: 0.85rem;
}