/* ════ ENTRY CARDS ════ */
.swipe-container {
    position: relative;
    overflow: hidden;
    margin: 8px 16px;
    border-radius: 12px;
}

.delete-action {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 80px;
    background: #E53935;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    border-radius: 0 12px 12px 0;
    z-index: 1;
}

.entry-card {
    background: var(--card);
    padding: 16px;
    border-radius: 12px;
    display: flex;
    gap: 16px;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: transform 0.2s ease-out;
    width: 100%;
}

.card-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 44px;
}

.card-date .day {
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.card-date .month {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--dim);
}

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.card-location {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0.8;
}

.card-location i {
    font-size: 10px;
}

.card-content h3 {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-content p {
    font-size: 14px;
    color: var(--dim);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.card-image-thumb {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mood-emoji {
    font-size: 24px;
}

.star-icon {
    color: #FFD700;
    font-size: 16px;
}

.draft-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 6px;
    text-transform: uppercase;
    width: fit-content;
}

.draft-badge i {
    font-size: 10px;
}

/* ════ HABIT CHALLENGE ════ */
/* Base .habit-challenge-card styles are in views.css */

.challenge-info {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.challenge-icon {
    font-size: 20px;
    background: rgba(255, 255, 255, 0.2);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.challenge-text h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    opacity: 0.9;
}

.challenge-text h4 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 4px;
}

.challenge-text p {
    font-size: 13px;
    opacity: 0.8;
    line-height: 1.4;
}

.challenge-media {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.bear-emoji {
    font-size: 48px;
}

.btn-close-challenge {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 18px;
}

.year-divider {
    padding: 32px 16px 12px;
    font-size: 24px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: -0.5px;
}

/* ════ CALENDAR ════ */
.calendar-header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#calendarWidget {
    padding: 0 16px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    text-align: center;
    padding: 0 16px;
}

.cal-day-name {
    font-size: 12px;
    color: var(--dim);
    padding-bottom: 12px;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    max-width: 32px;
    margin: 0 auto;
    width: 100%;
}

.cal-day.today {
    border: 1px solid var(--primary);
}

.cal-day.selected {
    background: var(--primary);
    color: #fff;
}

.cal-day.has-entry::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    background: currentColor;
    border-radius: 50%;
}

/* ════ STATISTICS ════ */
.stats-scroll {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stats-card {
    background: var(--card);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid var(--border);
}

.diary-status-card {
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: #fff;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stats-card h3 {
    font-size: 16px;
    margin-bottom: 20px;
    color: var(--text);
}

#weeklyHeatmap {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
}

.heat-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.heat-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.heat-circle.active {
    background: rgba(var(--primary-rgb), 0.2);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 700;
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding-top: 10px;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.3;
}

.badge-item.unlocked {
    opacity: 1;
}

.badge-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.badge-item.unlocked .badge-icon {
    border: 2px solid #fbbf24;
}

.badge-name {
    font-size: 10px;
    color: var(--dim);
    text-align: center;
}

/* ════ PROFILE ════ */
.profile-header {
    padding: 60px 24px 40px;
    text-align: center;
    background: var(--card);
    border-bottom: 1px solid var(--border);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #fff;
}

.profile-header h2 {
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: 600;
}

.profile-menu {
    padding: 12px 0;
}

.profile-menu .menu-item i {
    color: var(--primary);
}

/* ════ CALENDAR NAV ════ */
.calendar-header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 16px 8px;
    font-size: 16px;
    font-weight: 700;
}

.calendar-entries-list {
    padding: 16px;
}

/* ════ STATS HEADER ════ */
.stats-header {
    padding: 20px 16px 0;
}

.stats-header h2 {
    font-size: 22px;
    font-weight: 800;
}

/* ════ PROMO TILES ════ */
.promo-tiles {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.promo-tile {
    background: var(--card);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: opacity 0.2s;
}

.promo-tile:active {
    opacity: 0.7;
}

.promo-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    flex-shrink: 0;
}

.promo-info {
    flex: 1;
}

.promo-info h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
}

.promo-info p {
    font-size: 12px;
    color: var(--dim);
}

/* ════ PROFILE STATS ROW ════ */
.profile-stats-row {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.profile-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.profile-stat strong {
    font-size: 24px;
    font-weight: 800;
}

.profile-stat span {
    font-size: 11px;
    color: var(--dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ════ MENU DIVIDER ════ */
.menu-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 16px;
}

/* ════ PRO TAG ════ */
.pro-tag {
    background: linear-gradient(135deg, var(--primary), rgba(var(--primary-rgb), 0.8));
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* ════ LANDING THEME CONTEXT MENU ════ */
.landing-theme-btn {
    position: relative;
}

.landing-theme-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 210px;
    background: rgba(20, 22, 32, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
    z-index: 9999;
    overflow: hidden;
    animation: themeMenuIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    transform-origin: top right;
}

@keyframes themeMenuIn {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(-8px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.landing-theme-menu-header {
    padding: 12px 16px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.landing-theme-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
}

.landing-theme-menu-item:hover {
    background: rgba(255, 255, 255, 0.07);
}

.landing-theme-menu-item:active {
    background: rgba(255, 255, 255, 0.12);
}

.landing-theme-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.landing-theme-label {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.landing-theme-check {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    opacity: 0;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.landing-theme-menu-item.active .landing-theme-check {
    opacity: 1;
}

.landing-theme-menu-item.active .landing-theme-label {
    color: #fff;
    font-weight: 700;
}

.landing-theme-menu-item.active .landing-theme-swatch {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 10px currentColor;
}

/* ════ GLOBAL MODAL ════ */
.global-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 30000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.global-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.global-modal-card {
    background: var(--card);
    width: 100%;
    max-width: 360px;
    border-radius: 24px;
    padding: 32px 24px 24px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.global-modal-overlay.active .global-modal-card {
    transform: translateY(0);
}

.modal-icon {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 20px;
}

.global-modal-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.global-modal-card p {
    font-size: 15px;
    color: var(--dim);
    line-height: 1.5;
    margin-bottom: 24px;
}

.modal-input-wrap {
    margin-bottom: 24px;
}

.modal-input-wrap input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text);
    font-family: inherit;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.modal-input-wrap input:focus {
    border-color: var(--primary);
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions button {
    flex: 1;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
}

.modal-choices-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    max-height: 320px;
    overflow-y: auto;
    padding: 4px;
    margin-right: -4px;
}

.modal-choice-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px 20px;
    text-align: left;
    font-size: 15px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.4;
    width: 100%;
}

.modal-choice-item i {
    font-size: 14px;
    color: var(--primary);
    opacity: 0.7;
    width: 20px;
    text-align: center;
}

.modal-choice-item:hover {
    background: rgba(187, 134, 252, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modal-choice-item.custom-choice {
    border-style: dashed;
    background: rgba(var(--primary-rgb, 187, 134, 252), 0.05);
    border-color: rgba(var(--primary-rgb, 187, 134, 252), 0.3);
    color: var(--primary);
}

.modal-choice-item.custom-choice i {
    color: var(--primary);
    opacity: 1;
}


.modal-choices-wrap::-webkit-scrollbar {
    width: 6px;
}

.modal-choices-wrap::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}