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

:root {
    /* Futuristic Red and Black Theme */
    --neon-red: #FF0040;
    --deep-red: #CC0033;
    --dark-red: #990000;
    --black: #000000;
    --dark-bg: #0a0a0a;
    --charcoal: #1a1a1a;
    --dark-grey: #2a2a2a;
    --grey: #666666;
    --light-grey: #999999;
    --white: #FFFFFF;
    --off-white: #F0F0F0;
    --neon-glow: 0 0 10px rgba(255, 0, 64, 0.8), 0 0 20px rgba(255, 0, 64, 0.4);
    --red-glow: 0 0 15px rgba(204, 0, 51, 0.6);
    
    /* Status Colors */
    --green: #00FF41;
    --yellow: #FFD700;
    --orange: #FF6B35;
    
    /* Shadows */
    --shadow-dark: 0 10px 30px rgba(0, 0, 0, 0.8);
    --shadow-medium: 0 5px 15px rgba(0, 0, 0, 0.6);
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-neon: 0 0 20px rgba(255, 0, 64, 0.5);
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
    background: linear-gradient(135deg, var(--black) 0%, var(--charcoal) 50%, var(--dark-red) 100%);
    background-attachment: fixed;
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--charcoal) 0%, var(--deep-red) 100%);
    z-index: 1000;
}

.login-container {
    background: var(--paper-cream);
    padding: 50px;
    border-radius: 10px;
    box-shadow: var(--shadow-book);
    max-width: 400px;
    width: 90%;
    border: 3px solid var(--leather-brown);
}

.login-title {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    font-weight: 900;
    text-align: center;
    color: var(--deep-red);
    margin-bottom: 40px;
    text-shadow: var(--shadow-text);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--charcoal);
}

.form-group input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-family: 'Crimson Text', serif;
    border: 2px solid var(--grey);
    border-radius: 5px;
    background: white;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--deep-red);
    box-shadow: 0 0 5px rgba(139, 0, 0, 0.3);
}

/* Main Application */
.main-app {
    padding: 20px;
    min-height: 100vh;
}

.desk-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, transparent 1px, transparent 99px),
        linear-gradient(transparent 1px, transparent 99px),
        linear-gradient(135deg, var(--charcoal) 0%, var(--black) 50%, var(--dark-red) 100%);
    background-size: 100px 100px, 100px 100px, 100% 100%;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

/* Top Navigation Bar */
/* Top Navigation Bar */
.top-nav-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: linear-gradient(180deg, var(--charcoal) 0%, var(--black) 100%);
    border-bottom: 2px solid var(--neon-red);
    box-shadow: var(--shadow-dark), var(--neon-glow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 12px 20px;
    background: linear-gradient(145deg, var(--dark-grey) 0%, var(--charcoal) 100%);
    border: 1px solid var(--grey);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex: 1;
    max-width: 150px;
}

.nav-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 0, 64, 0.3), transparent);
    transition: left 0.5s ease;
}

.nav-icon:hover::before {
    left: 100%;
}

.nav-icon:hover {
    transform: translateY(-2px);
    border-color: var(--neon-red);
    box-shadow: var(--shadow-neon);
    background: linear-gradient(145deg, var(--dark-grey) 0%, var(--dark-red) 100%);
}

.nav-icon.active {
    background: linear-gradient(145deg, var(--deep-red) 0%, var(--neon-red) 100%);
    border-color: var(--neon-red);
    box-shadow: var(--neon-glow);
}

.nav-icon-img {
    width: 40px;
    height: 40px;
    filter: brightness(0) invert(1);
    transition: all 0.3s ease;
}

.nav-icon:hover .nav-icon-img,
.nav-icon.active .nav-icon-img {
    filter: brightness(1) drop-shadow(0 0 10px var(--neon-red));
}

.nav-icon-svg {
    width: 40px;
    height: 40px;
    color: var(--white);
    transition: all 0.3s ease;
}

.nav-icon:hover .nav-icon-svg,
.nav-icon.active .nav-icon-svg {
    color: var(--neon-red);
    filter: drop-shadow(0 0 8px var(--neon-red));
}

.nav-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--light-grey);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.nav-icon:hover .nav-label,
.nav-icon.active .nav-label {
    color: var(--white);
    text-shadow: 0 0 10px var(--neon-red);
}

/* Calendar View Page Styles */
.calendar-view-container {
    padding: 20px;
}

.calendar-header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(145deg, var(--dark-grey) 0%, var(--charcoal) 100%);
    border: 2px solid var(--neon-red);
    border-radius: 10px;
    box-shadow: var(--shadow-dark), var(--red-glow);
}

.calendar-header-controls h3 {
    font-family: 'Segoe UI', sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--white);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 15px var(--neon-red);
    flex: 1;
    text-align: center;
}

.mini-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--neon-red);
}

.mini-calendar-header h3 {
    font-family: 'Segoe UI', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--white);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--neon-red);
}

.calendar-nav-btn {
    background: linear-gradient(145deg, var(--deep-red) 0%, var(--neon-red) 100%);
    color: white;
    border: 1px solid var(--neon-red);
    width: 35px;
    height: 35px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 22px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 0, 64, 0.3);
}

.calendar-nav-btn:hover {
    background: linear-gradient(145deg, var(--neon-red) 0%, var(--deep-red) 100%);
    transform: scale(1.1);
    box-shadow: var(--neon-glow);
}

.mini-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.mini-day-name {
    text-align: center;
    font-weight: bold;
    font-size: 13px;
    color: var(--neon-red);
    padding: 8px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mini-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.mini-calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border-radius: 8px;
    background: var(--dark-grey);
    border: 1px solid var(--grey);

    border-radius: 8px;
    background: var(--dark-grey);
    border: 1px solid var(--grey);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    transition: all 0.2s ease;
    position: relative;
}

.mini-calendar-day:hover {
    background: var(--charcoal);
    border-color: var(--neon-red);
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 0, 64, 0.4);
}

.mini-calendar-day.today {
    background: linear-gradient(145deg, var(--deep-red) 0%, var(--neon-red) 100%);
    color: white;
    font-weight: bold;
    border-color: var(--neon-red);
    box-shadow: var(--neon-glow);
}

.mini-calendar-day.other-month {
    color: var(--grey);
    opacity: 0.4;
}

.mini-calendar-day.has-items {
    font-weight: bold;
    border: 2px solid var(--neon-red);
    box-shadow: 0 0 8px rgba(255, 0, 64, 0.3);
}

.mini-day-indicators {
    display: flex;
    gap: 1px;
    margin-top: 2px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
}

.mini-indicator {
    font-size: 8px;
    font-weight: bold;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-shadow: 0 0 2px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.mini-indicator.urgency-red {
    background: #FF0040;
    box-shadow: 0 0 5px rgba(255, 0, 64, 0.6);
}

.mini-indicator.urgency-yellow {
    background: #FFD700;
    color: #000;
    text-shadow: none;
}

.mini-indicator.urgency-green {
    background: #00FF41;
    box-shadow: 0 0 5px rgba(0, 255, 65, 0.4);
}


/* Book Shelf */
.book-shelf {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 50px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.book {
    width: 80px;
    height: 300px;
    position: relative;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.book:hover {
    transform: translateY(-20px) scale(1.05);
}

.book-spine {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, 
        var(--leather-dark) 0%,
        var(--leather-brown) 10%,
        var(--leather-brown) 90%,
        var(--leather-dark) 100%);
    border-radius: 8px;
    border: 3px solid var(--leather-dark);
    box-shadow: 
        inset -5px 0 10px rgba(0, 0, 0, 0.5),
        inset 5px 0 10px rgba(255, 255, 255, 0.05),
        var(--shadow-book);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.book-spine::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.1) 2px,
            rgba(0, 0, 0, 0.1) 4px
        );
    pointer-events: none;
}

.book-title {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--gold-accent);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    letter-spacing: 3px;
    z-index: 1;
}

.journal-book .book-spine {
    background: linear-gradient(to right, 
        #5C0000 0%,
        var(--deep-red) 10%,
        var(--deep-red) 90%,
        #5C0000 100%);
}

.tasks-book .book-spine {
    background: linear-gradient(to right, 
        #1a1a1a 0%,
        var(--charcoal) 10%,
        var(--charcoal) 90%,
        #1a1a1a 100%);
}

.goals-book .book-spine {
    background: linear-gradient(to right, 
        #6B0000 0%,
        #8B0000 10%,
        #8B0000 90%,
        #6B0000 100%);
}

/* Content Area */
.content-area {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.view {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Checklist Paper (Home View) */
.checklist-paper {
    background: linear-gradient(145deg, var(--charcoal) 0%, var(--dark-bg) 100%);
    border: 2px solid var(--neon-red);
    padding: 40px 60px;
    box-shadow: var(--shadow-dark), var(--red-glow);
    border-radius: 10px;
    position: relative;
    min-height: 600px;
}

.checklist-paper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid rgba(255, 0, 64, 0.2);
    border-radius: 10px;
    pointer-events: none;
}

.paper-header {
    margin-bottom: 30px;
    border-bottom: 2px solid var(--neon-red);
    padding-bottom: 20px;
}

.checklist-title {
    font-family: 'Segoe UI', sans-serif;
    font-size: 42px;
    font-weight: 700;
    color: var(--white);
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 0 0 20px var(--neon-red), 0 0 40px rgba(255, 0, 64, 0.5);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.date-display {
    font-family: 'Crimson Text', serif;
    font-size: 20px;
    text-align: center;
    color: var(--grey);
    font-style: italic;
}

.section-header {
    font-family: 'Special Elite', cursive;
    font-size: 28px;
    color: var(--charcoal);
    margin-bottom: 20px;
    padding-left: 60px;
}

.upcoming-tasks-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px dashed var(--light-grey);
}

.upcoming-tasks-section .section-header {
    color: var(--deep-red);
}

.checklist-items {
    padding-left: 60px;
    margin-bottom: 40px;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 5px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.checklist-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(5px);
}

.checklist-item.completed {
    opacity: 0.6;
}

.checkbox-container {
    margin-right: 15px;
    margin-top: 3px;
}

.custom-checkbox {
    width: 24px;
    height: 24px;
    border: 3px solid var(--charcoal);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    background: white;
    transition: all 0.3s ease;
}

.custom-checkbox:hover {
    border-color: var(--deep-red);
}

.custom-checkbox.checked::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 2px;
    font-size: 20px;
    font-weight: bold;
    color: var(--deep-red);
}

.checklist-content {
    flex: 1;
}

.item-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--charcoal);
}

.item-title.completed {
    text-decoration: line-through;
    color: var(--grey);
}

.item-meta {
    font-size: 14px;
    color: var(--grey);
}

.urgency-indicator {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    font-weight: bold;
    font-size: 12px;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.urgency-green { background-color: #2ECC40; }
.urgency-yellow { 
    background-color: #FFDC00; 
    color: #333;
    text-shadow: none;
}
.urgency-red { background-color: #FF4136; }
.urgency-grey { background-color: #AAAAAA; }

/* Quick Actions */
.quick-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 40px;
}

/* Book Page View */
.book-page-view {
    padding: 40px 20px;
}

.book-open {
    display: flex;
    gap: 40px;
    max-width: 1600px;
    margin: 0 auto;
    perspective: 1500px;
    flex-wrap: wrap;
}

.book-page {
    flex: 1;
    background: linear-gradient(145deg, var(--charcoal) 0%, var(--dark-bg) 100%);
    padding: 40px;
    min-height: 700px;
    box-shadow: var(--shadow-dark);
    border: 2px solid var(--neon-red);
    border-radius: 10px;
    position: relative;
    animation: pageOpen 0.6s ease-out;
}

.book-page.full-width {
    flex: 1 1 100%;
    max-width: 100%;
}

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

.left-page {
    border-right: 2px solid rgba(255, 0, 64, 0.3);
}

.right-page {
    border-left: 3px solid var(--leather-brown);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--deep-red);
    padding-bottom: 15px;
}

.page-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--deep-red);
}

/* Search Box */
.search-box {
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 12px 20px;
    font-size: 16px;
    font-family: 'Crimson Text', serif;
    border: 2px solid var(--grey);
    border-radius: 25px;
    background: white;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--deep-red);
    box-shadow: 0 0 10px rgba(139, 0, 0, 0.2);
}

/* Lists */
.entries-list,
.tasks-list,
.goals-list {
    max-height: 550px;
    overflow-y: auto;
    padding-right: 10px;
}

.entries-list::-webkit-scrollbar,
.tasks-list::-webkit-scrollbar,
.goals-list::-webkit-scrollbar {
    width: 8px;
}

.entries-list::-webkit-scrollbar-track,
.tasks-list::-webkit-scrollbar-track,
.goals-list::-webkit-scrollbar-track {
    background: rgba(139, 0, 0, 0.1);
    border-radius: 10px;
}

.entries-list::-webkit-scrollbar-thumb,
.tasks-list::-webkit-scrollbar-thumb,
.goals-list::-webkit-scrollbar-thumb {
    background: var(--deep-red);
    border-radius: 10px;
}

.entry-item,
.task-item,
.goal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 15px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.6);
    border-left: 4px solid var(--deep-red);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.entry-item:hover,
.task-item:hover,
.goal-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.entry-content {
    flex: 1;
    cursor: pointer;
}

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

.btn-complete,
.btn-remove {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: var(--charcoal);
}

.btn-complete {
    background: #2ECC40;
    color: white;
}

.btn-complete:hover {
    background: #28B135;
    transform: scale(1.1);
}

.btn-remove {
    background: var(--deep-red);
}

.btn-remove:hover {
    background: var(--crimson);
    transform: scale(1.1);
}

.entry-item h3,
.task-item h3,
.goal-item h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 5px;
}

.entry-item .date,
.task-item .date,
.goal-item .date {
    font-size: 14px;
    color: var(--grey);
    font-style: italic;
}

.task-item.completed h3,
.goal-item.completed h3 {
    text-decoration: line-through;
    color: var(--grey);
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid var(--grey);
    border-radius: 20px;
    font-family: 'Crimson Text', serif;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: var(--paper-cream);
}

.filter-btn.active {
    background: var(--deep-red);
    color: white;
    border-color: var(--deep-red);
}

/* Editors */
.entry-editor {
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.title-input {
    width: 100%;
    padding: 15px;
    font-size: 24px;
    font-family: 'Crimson Text', serif;
    font-weight: 600;
    border: none;
    border-bottom: 3px solid var(--deep-red);
    background: transparent;
    margin-bottom: 20px;
    color: var(--charcoal);
}

.title-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.3);
}

.date-input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    font-family: 'Crimson Text', serif;
    border: 2px solid var(--grey);
    border-radius: 5px;
    margin-bottom: 20px;
    background: white;
}

.content-textarea,
.description-textarea {
    width: 100%;
    min-height: 300px;
    padding: 15px;
    font-size: 18px;
    font-family: 'Crimson Text', serif;
    line-height: 1.8;
    border: 2px solid var(--grey);
    border-radius: 5px;
    background: white;
    resize: vertical;
    margin-bottom: 20px;
}

.content-textarea:focus,
.description-textarea:focus {
    outline: none;
    border-color: var(--deep-red);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.form-row label {
    flex: 1;
    min-width: 200px;
    font-size: 16px;
    font-weight: 600;
    color: var(--charcoal);
}

.form-row select,
.form-row input[type="date"],
.form-row input[type="time"] {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    font-family: 'Crimson Text', serif;
    border: 2px solid var(--grey);
    border-radius: 5px;
    background: white;
    margin-top: 5px;
}

.recurrence-options {
    background: rgba(139, 0, 0, 0.05);
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Attachments */
.attachments-section {
    margin-bottom: 20px;
}

.file-label {
    display: inline-block;
    padding: 10px 20px;
    background: var(--charcoal);
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.file-label:hover {
    background: var(--deep-red);
}

.file-label input[type="file"] {
    display: none;
}

.attachments-list {
    margin-top: 15px;
}

.attachment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border: 1px solid var(--light-grey);
    border-radius: 5px;
    margin-bottom: 8px;
}

.attachment-name {
    font-size: 14px;
    color: var(--charcoal);
}

.attachment-delete {
    background: var(--deep-red);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

/* Editor Actions */
.editor-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Buttons */
.btn-primary,
.btn-action,
.btn-new,
.btn-save,
.btn-cancel,
.btn-back,
.btn-archive,
.btn-nav {
    padding: 12px 30px;
    font-size: 16px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    border: 2px solid var(--neon-red);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 0, 64, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(145deg, var(--deep-red) 0%, var(--neon-red) 100%);
    color: white;
    width: 100%;
    margin-top: 20px;
}

.btn-primary:hover {
    background: linear-gradient(145deg, var(--neon-red) 0%, var(--deep-red) 100%);
    transform: translateY(-2px);
    box-shadow: var(--neon-glow);
}

.btn-action {
    background: linear-gradient(145deg, var(--charcoal) 0%, var(--dark-grey) 100%);
    color: white;
}

.btn-action:hover {
    background: linear-gradient(145deg, var(--deep-red) 0%, var(--neon-red) 100%);
    transform: translateY(-2px);
    box-shadow: var(--neon-glow);
}

.btn-new {
    background: linear-gradient(145deg, var(--deep-red) 0%, var(--neon-red) 100%);
    color: white;
    padding: 10px 20px;
    font-size: 14px;
}

.btn-new:hover {
    background: linear-gradient(145deg, var(--neon-red) 0%, var(--deep-red) 100%);
    box-shadow: var(--neon-glow);
}

.btn-save {
    background: linear-gradient(145deg, var(--deep-red) 0%, var(--neon-red) 100%);
    color: white;
}

.btn-save:hover {
    background: var(--crimson);
}

.btn-cancel {
    background: var(--grey);
    color: white;
}

.btn-cancel:hover {
    background: var(--charcoal);
}

.btn-back {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: var(--charcoal);
    color: white;
    z-index: 100;
}

.btn-back:hover {
    background: var(--deep-red);
}

.btn-archive {
    margin-top: 20px;
    background: var(--grey);
    color: white;
    width: 100%;
}

.btn-archive:hover {
    background: var(--charcoal);
}

.btn-archive-small {
    background: var(--grey);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.btn-archive-small:hover {
    background: var(--charcoal);
    transform: scale(1.05);
}


/* Calendar */
.calendar-container {
    padding: 20px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(145deg, var(--dark-grey) 0%, var(--charcoal) 100%);
    border: 2px solid var(--neon-red);
    border-radius: 10px;
    box-shadow: var(--shadow-dark), var(--red-glow);
}

.calendar-header h2 {
    font-family: 'Segoe UI', sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 15px var(--neon-red);
    margin: 0;
}

.btn-nav {
    background: linear-gradient(145deg, var(--deep-red) 0%, var(--neon-red) 100%);
    color: var(--white);
    border: 2px solid var(--neon-red);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--red-glow);
    min-width: 50px;
}

.btn-nav:hover {
    background: linear-gradient(145deg, var(--neon-red) 0%, var(--deep-red) 100%);
    transform: scale(1.1);
    box-shadow: var(--neon-glow);
}

.calendar-view-toggle {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.view-toggle-btn {
    padding: 10px 25px;
    background: linear-gradient(145deg, var(--dark-grey) 0%, var(--charcoal) 100%);
    border: 2px solid var(--grey);
    border-radius: 8px;
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-toggle-btn:hover {
    background: linear-gradient(145deg, var(--dark-grey) 0%, var(--dark-red) 100%);
    border-color: var(--neon-red);
    box-shadow: var(--shadow-neon);
}

.view-toggle-btn.active {
    background: linear-gradient(145deg, var(--deep-red) 0%, var(--neon-red) 100%);
    color: var(--white);
    border-color: var(--neon-red);
    box-shadow: var(--neon-glow);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-day {
    aspect-ratio: 1;
    padding: 10px;
    background: linear-gradient(145deg, var(--dark-grey) 0%, var(--charcoal) 100%);
    border: 2px solid var(--grey);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.calendar-day:hover {
    border-color: var(--neon-red);
    transform: scale(1.05);
    box-shadow: var(--shadow-neon);
}

.calendar-day.today {
    border-color: var(--neon-red);
    background: linear-gradient(145deg, var(--deep-red) 0%, var(--dark-red) 100%);
    box-shadow: var(--neon-glow);
}

.calendar-day.other-month {
    opacity: 0.3;
}

.day-number {
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 5px;
}

.day-items {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 5px;
}

.day-item {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--white);
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
}

.day-item:hover {
    transform: scale(1.3);
    z-index: 10;
}

.day-item.urgency-red {
    background: var(--neon-red);
    box-shadow: 0 0 5px rgba(255, 0, 64, 0.6);
}

.day-item.urgency-red:hover {
    box-shadow: 0 0 12px rgba(255, 0, 64, 1);
}

.day-item.urgency-yellow {
    background: var(--yellow);
    color: var(--black);
    text-shadow: none;
}

.day-item.urgency-yellow:hover {
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.8);
}

.day-item.urgency-green {
    background: var(--green);
    box-shadow: 0 0 5px rgba(0, 255, 65, 0.6);
}

.day-item.urgency-green:hover {
    box-shadow: 0 0 12px rgba(0, 255, 65, 1);
}

.day-item-more {
    font-size: 10px;
    color: var(--grey);
    font-weight: 600;
    margin-left: 2px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.day-item-more:hover {
    color: var(--neon-red);
    transform: scale(1.2);
}

/* Quick Add Buttons (Monthly View) */
.day-quick-actions {
    display: flex;
    gap: 2px;
    margin-top: 3px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.calendar-day:hover .day-quick-actions {
    opacity: 1;
}

.btn-quick-add {
    background: linear-gradient(145deg, var(--deep-red) 0%, var(--neon-red) 100%);
    border: 1px solid var(--neon-red);
    border-radius: 3px;
    padding: 2px 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: var(--white);
}

.btn-quick-add:hover {
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(255, 0, 64, 0.8);
}

.btn-quick-add svg {
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}

/* Weekly View Styles */
.weekly-day {
    background: linear-gradient(145deg, var(--dark-grey) 0%, var(--charcoal) 100%);
    border: 2px solid var(--grey);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.weekly-day:hover {
    border-color: var(--neon-red);
    box-shadow: var(--shadow-neon);
}

.weekly-day.today {
    border-color: var(--neon-red);
    background: linear-gradient(145deg, var(--deep-red) 0%, var(--dark-red) 100%);
    box-shadow: var(--neon-glow);
}

.weekly-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--grey);
}

.weekly-day.today .weekly-day-header {
    border-bottom-color: var(--neon-red);
}

.weekly-day-info {
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.weekly-day-name {
    font-size: 24px;
    font-weight: 600;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--neon-red);
}

.weekly-day-date {
    font-size: 16px;
    font-weight: 500;
    color: var(--grey);
    text-transform: uppercase;
}

.weekly-day.today .weekly-day-date {
    color: var(--neon-red);
}

.weekly-day-actions {
    display: flex;
    gap: 8px;
}

.btn-add-item {
    background: linear-gradient(145deg, var(--deep-red) 0%, var(--neon-red) 100%);
    border: 2px solid var(--neon-red);
    border-radius: 8px;
    padding: 8px 15px;
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: var(--red-glow);
}

.btn-add-item:hover {
    background: linear-gradient(145deg, var(--neon-red) 0%, var(--deep-red) 100%);
    transform: translateY(-2px);
    box-shadow: var(--neon-glow);
}

.btn-add-item svg {
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}

.weekly-day-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.weekly-item {
    background: linear-gradient(145deg, var(--charcoal) 0%, var(--dark-grey) 100%);
    border: 2px solid var(--grey);
    border-left: 4px solid var(--grey);
    border-radius: 8px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.weekly-item:hover {
    border-color: var(--neon-red);
    border-left-color: var(--neon-red);
    transform: translateX(5px);
    box-shadow: var(--shadow-neon);
}

.weekly-item-indicator {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.weekly-item-indicator.urgency-red {
    background: var(--neon-red);
    box-shadow: 0 0 8px rgba(255, 0, 64, 0.6);
}

.weekly-item-indicator.urgency-yellow {
    background: var(--yellow);
    color: var(--black);
    text-shadow: none;
}

.weekly-item-indicator.urgency-green {
    background: var(--green);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
}

.weekly-item-title {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: var(--white);
}

.weekly-item-type {
    font-size: 18px;
    opacity: 0.6;
}

.weekly-no-items {
    padding: 30px;
    text-align: center;
    color: var(--grey);
    font-style: italic;
    font-size: 14px;
}

/* Statistics */
.stats-container {
    background: var(--paper-cream);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow-paper);
    max-width: 1200px;
    margin: 0 auto;
}

.stats-container h2 {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    color: var(--deep-red);
    text-align: center;
    margin-bottom: 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    border: 3px solid var(--deep-red);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(139, 0, 0, 0.2);
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    font-weight: 700;
    color: var(--deep-red);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 18px;
    color: var(--grey);
    font-weight: 600;
}

.stats-chart {
    background: white;
    padding: 30px;
    border-radius: 10px;
    border: 2px solid var(--light-grey);
    min-height: 300px;
}

/* Entry/Task/Goal Display */
.entry-display {
    animation: fadeIn 0.4s ease-in;
}

.display-header {
    margin-bottom: 30px;
    border-bottom: 3px solid var(--deep-red);
    padding-bottom: 15px;
}

.display-title {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--charcoal);
    margin-bottom: 10px;
}

.display-meta {
    font-size: 16px;
    color: var(--grey);
    font-style: italic;
}

.display-content {
    font-size: 18px;
    line-height: 1.8;
    color: var(--light-grey);
    margin-bottom: 30px;
    white-space: pre-wrap;
}

.display-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Responsive Design */
/* ============================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ============================================ */

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
    .top-nav-bar {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        padding: 15px;
    }
    
    .nav-icon {
        padding: 10px 15px;
        flex: 0 1 calc(33.333% - 10px);
        max-width: none;
    }
    
    .nav-icon-img,
    .nav-icon-svg {
        width: 35px;
        height: 35px;
    }
    
    .nav-label {
        font-size: 11px;
    }
    
    .calendar-view-container {
        padding: 15px;
    }
    
    .calendar-header-controls h3 {
        font-size: 22px;
        letter-spacing: 2px;
    }
    
    .book-open {
        flex-direction: column;
        gap: 20px;
    }
    
    .book-page {
        padding: 30px 20px;
    }
    
    .left-page {
        border-right: none;
        border-bottom: 2px solid rgba(255, 0, 64, 0.3);
    }
    
    .checklist-paper {
        padding: 30px 25px;
    }
    
    .checklist-title {
        font-size: 36px;
    }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
    .top-nav-bar {
        padding: 10px;
        gap: 8px;
    }
    
    .nav-icon {
        padding: 8px 10px;
        gap: 3px;
        flex: 0 1 calc(50% - 8px);
    }
    
    .nav-icon-img,
    .nav-icon-svg {
        width: 28px;
        height: 28px;
    }
    
    .nav-label {
        font-size: 10px;
        letter-spacing: 0.5px;
    }
    
    .calendar-view-container {
        padding: 10px;
    }
    
    .calendar-header-controls {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .calendar-header-controls h3 {
        font-size: 20px;
        letter-spacing: 1.5px;
    }
    
    .mini-day-name {
        font-size: 11px;
        padding: 4px 0;
    }
    
    .mini-calendar-day {
        font-size: 12px;
        padding: 3px;
    }
    
    .mini-indicator {
        width: 10px;
        height: 10px;
        font-size: 7px;
    }
    
    .checklist-paper {
        padding: 20px 15px;
        min-height: auto;
    }
    
    .checklist-title {
        font-size: 28px;
        letter-spacing: 2px;
    }
    
    .section-header {
        font-size: 20px;
    }
    
    .checklist-item {
        padding: 12px 15px;
        gap: 10px;
    }
    
    .item-title {
        font-size: 15px;
    }
    
    .item-meta {
        font-size: 12px;
    }
    
    .book-page {
        padding: 20px 15px;
        min-height: auto;
    }
    
    .page-header h2 {
        font-size: 24px;
    }
    
    .entry-item {
        padding: 12px;
    }
    
    .entry-item h3 {
        font-size: 16px;
    }
    
    .title-input {
        font-size: 16px;
        padding: 12px;
    }
    
    .content-input {
        font-size: 15px;
        padding: 12px;
        min-height: 200px;
    }
    
    .btn-primary,
    .btn-action,
    .btn-new,
    .btn-save,
    .btn-cancel {
        padding: 12px 20px;
        font-size: 14px;
        letter-spacing: 0.5px;
    }
    
    .urgency-indicator {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }
    
    .date-modal {
        width: 90%;
        max-width: 400px;
        margin: 10px;
    }
    
    .date-modal-header h2 {
        font-size: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 36px;
    }
}

/* Small Mobile (< 480px) */
@media (max-width: 479px) {
    .login-container {
        padding: 20px;
        width: 90%;
    }
    
    .login-title {
        font-size: 32px;
    }
    
    .top-nav-bar {
        padding: 8px;
        gap: 6px;
    }
    
    .nav-icon {
        padding: 6px 8px;
        flex: 0 1 calc(50% - 6px);
    }
    
    .nav-icon-img,
    .nav-icon-svg {
        width: 24px;
        height: 24px;
    }
    
    .nav-label {
        font-size: 9px;
    }
    
    .calendar-view-container {
        padding: 8px;
    }
    
    .calendar-header-controls h3 {
        font-size: 18px;
        letter-spacing: 1px;
    }
    
    .calendar-nav-btn {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
    
    .mini-day-name {
        font-size: 10px;
        padding: 3px 0;
    }
    
    .mini-calendar-day {
        font-size: 11px;
        padding: 2px;
    }
    
    .mini-indicator {
        width: 8px;
        height: 8px;
        font-size: 6px;
    }
    
    .checklist-paper {
        padding: 15px 10px;
    }
    
    .checklist-title {
        font-size: 24px;
        letter-spacing: 1px;
    }
    
    .section-header {
        font-size: 18px;
    }
    
    .checklist-item {
        padding: 10px 12px;
    }
    
    .item-title {
        font-size: 14px;
    }
    
    .book-page {
        padding: 15px 10px;
    }
    
    .page-header h2 {
        font-size: 20px;
    }
    
    .entry-item {
        padding: 10px;
    }
    
    .entry-item h3 {
        font-size: 15px;
    }
    
    .title-input,
    .content-input {
        font-size: 14px;
    }
    
    .btn-primary,
    .btn-action,
    .btn-new,
    .btn-save,
    .btn-cancel {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .form-group label {
        font-size: 13px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 14px;
    }
}

/* Landscape Mobile (480px - 767px landscape) */
@media (max-height: 500px) and (orientation: landscape) {
    .top-nav-bar {
        padding: 5px 10px;
    }
    
    .nav-icon {
        padding: 5px 10px;
    }
    
    .nav-icon-img,
    .nav-icon-svg {
        width: 24px;
        height: 24px;
    }
    
    .calendar-modal-content {
        max-height: 85vh;
    }
    
    .checklist-paper {
        padding: 15px;
        min-height: auto;
    }
    
    .book-page {
        padding: 15px;
        min-height: auto;
    }
}

/* Touch Device Improvements */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets for better mobile experience */
    .nav-icon,
    .btn-primary,
    .btn-action,
    .btn-new,
    .calendar-nav-btn,
    .mini-calendar-day {
        min-height: 44px;
        min-width: 44px;
    }
    
    .checklist-item,
    .entry-item,
    .task-item {
        min-height: 48px;
    }
    
    /* Remove hover effects on touch devices */
    .nav-icon:hover::before {
        display: none;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .nav-icon-img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Print Styles */
@media print {
    .top-nav-bar,
    .btn-primary,
    .btn-action,
    .btn-new,
    .btn-save,
    .btn-cancel {
        display: none !important;
    }
    
    .book-page {
        border: none;
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    .checklist-paper {
        background: white;
        color: black;
        border: 1px solid black;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(139, 0, 0, 0.3);
    border-radius: 50%;
    border-top-color: var(--deep-red);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#journalList,
#tasksList,
#goalsList {
    display: block !important;
    min-height: 100px !important;
}

.entries-list,
.tasks-list {
    display: block !important;
}

.entry-item {
    display: block !important;
    margin-bottom: 15px !important;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(20, 20, 20, 0.95);
    color: #00FF41 !important;
    padding: 20px 30px;
    border: 2px solid #00FF41;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.6), 0 5px 15px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    animation: slideInRight 0.5s ease-out;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    min-width: 250px;
    max-width: 400px;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.8);
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success {
    color: #00FF41 !important;
    border-color: #00FF41;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.6), 0 5px 15px rgba(0, 0, 0, 0.5);
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.8);
}

.notification.error {
    color: #FF0040 !important;
    border-color: #FF0040;
    box-shadow: 0 0 20px rgba(255, 0, 64, 0.7), 0 5px 15px rgba(0, 0, 0, 0.5);
    text-shadow: 0 0 10px rgba(255, 0, 64, 0.8);
}

/* Date Modal */
.date-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease-in;
}

.date-modal {
    background: var(--paper-cream);
    border-radius: 10px;
    box-shadow: var(--shadow-book);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.date-modal-header {
    background: var(--deep-red);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.date-modal-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.date-modal-content {
    padding: 30px;
    overflow-y: auto;
}

.date-section {
    margin-bottom: 30px;
}

.date-section:last-child {
    margin-bottom: 0;
}

.date-section h3 {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    color: var(--charcoal);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--deep-red);
    padding-bottom: 10px;
}

.date-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.date-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: white;
    border-radius: 5px;
    border-left: 4px solid var(--deep-red);
    cursor: pointer;
    transition: all 0.3s ease;
}

.date-item:hover {
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.date-item.completed {
    opacity: 0.6;
}

.date-item.completed .date-item-title {
    text-decoration: line-through;
}

.date-item-title {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    color: var(--charcoal);
}

.date-item-priority {
    font-size: 14px;
    color: var(--grey);
    text-transform: capitalize;
}

/* Quick Add Modal */
.quick-add-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    animation: fadeIn 0.2s ease-in;
}

.quick-add-modal {
    background: linear-gradient(145deg, var(--charcoal) 0%, var(--dark-grey) 100%);
    border: 3px solid var(--neon-red);
    border-radius: 15px;
    box-shadow: var(--shadow-dark), var(--neon-glow);
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.3s ease-out;
}

.quick-add-header {
    background: linear-gradient(145deg, var(--deep-red) 0%, var(--neon-red) 100%);
    padding: 20px 25px;
    border-radius: 12px 12px 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.quick-add-header h3 {
    font-family: 'Segoe UI', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: var(--white);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.quick-add-date {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.quick-add-header .modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.quick-add-header .modal-close:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--white);
    transform: rotate(90deg);
}

.quick-add-content {
    padding: 25px;
}

.quick-add-field {
    margin-bottom: 20px;
}

.quick-add-field:last-of-type {
    margin-bottom: 25px;
}

.quick-add-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.quick-add-field input[type="text"],
.quick-add-field input[type="time"],
.quick-add-field select,
.quick-add-field textarea {
    width: 100%;
    padding: 12px 15px;
    background: linear-gradient(145deg, var(--dark-grey) 0%, var(--charcoal) 100%);
    border: 2px solid var(--grey);
    border-radius: 8px;
    color: var(--white);
    font-size: 15px;
    font-family: 'Segoe UI', sans-serif;
    transition: all 0.3s ease;
}

.quick-add-field input[type="text"]:focus,
.quick-add-field input[type="time"]:focus,
.quick-add-field select:focus,
.quick-add-field textarea:focus {
    outline: none;
    border-color: var(--neon-red);
    box-shadow: 0 0 10px rgba(255, 0, 64, 0.5);
}

.quick-add-field textarea {
    resize: vertical;
    min-height: 80px;
}

.quick-add-field select {
    cursor: pointer;
}

.quick-add-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 10px;
    border-top: 2px solid var(--grey);
}

.quick-add-actions .btn-cancel,
.quick-add-actions .btn-save {
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-add-actions .btn-cancel {
    background: linear-gradient(145deg, var(--dark-grey) 0%, var(--charcoal) 100%);
    border: 2px solid var(--grey);
    color: var(--white);
}

.quick-add-actions .btn-cancel:hover {
    border-color: var(--neon-red);
    box-shadow: var(--shadow-neon);
}

.quick-add-actions .btn-save {
    background: linear-gradient(145deg, var(--deep-red) 0%, var(--neon-red) 100%);
    border: 2px solid var(--neon-red);
    color: var(--white);
    box-shadow: var(--red-glow);
}

.quick-add-actions .btn-save:hover {
    background: linear-gradient(145deg, var(--neon-red) 0%, var(--deep-red) 100%);
    transform: translateY(-2px);
    box-shadow: var(--neon-glow);
}

/* Item Action Modal */
.item-action-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3500;
    animation: fadeIn 0.2s ease-in;
}

.item-action-modal {
    background: linear-gradient(145deg, var(--charcoal) 0%, var(--dark-grey) 100%);
    border: 3px solid var(--neon-red);
    border-radius: 15px;
    box-shadow: var(--shadow-dark), var(--neon-glow);
    max-width: 400px;
    width: 90%;
    animation: slideUp 0.3s ease-out;
}

.item-action-header {
    background: linear-gradient(145deg, var(--deep-red) 0%, var(--neon-red) 100%);
    padding: 20px 25px;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.item-action-icon {
    font-size: 32px;
    line-height: 1;
}

.item-action-title {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-action-header .modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
}

.item-action-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.item-action-btn {
    background: linear-gradient(145deg, var(--dark-grey) 0%, var(--charcoal) 100%);
    border: 2px solid var(--grey);
    border-radius: 10px;
    padding: 15px 20px;
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    text-align: left;
}

.item-action-btn svg {
    flex-shrink: 0;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}

.item-action-btn:hover {
    border-color: var(--neon-red);
    transform: translateX(5px);
    box-shadow: var(--shadow-neon);
}

.item-action-btn.delete {
    border-color: var(--deep-red);
}

.item-action-btn.delete:hover {
    background: linear-gradient(145deg, var(--deep-red) 0%, var(--neon-red) 100%);
    border-color: var(--neon-red);
    box-shadow: var(--red-glow);
}

/* Full-width editor page */
.full-width {
    flex: 1 1 100%;
    max-width: 100%;
    min-width: 100%;
}

/* ============================================
   MOBILE-SPECIFIC IMPROVEMENTS
   ============================================ */

/* Safe Area Support for Notched Devices */
@supports (padding: max(0px)) {
    .top-nav-bar {
        padding-top: max(15px, env(safe-area-inset-top));
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }
    
    .content-area {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}

/* Improve Form Elements on Mobile */
@media (max-width: 767px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    input[type="time"],
    textarea,
    select {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
    
    /* Custom select arrow for mobile */
    select {
        background-image: linear-gradient(45deg, transparent 50%, var(--neon-red) 50%),
                          linear-gradient(135deg, var(--neon-red) 50%, transparent 50%);
        background-position: calc(100% - 20px) calc(1em + 2px),
                             calc(100% - 15px) calc(1em + 2px);
        background-size: 5px 5px, 5px 5px;
        background-repeat: no-repeat;
        padding-right: 35px;
    }
}

/* Smooth scrolling on all devices */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Prevent text selection on interactive elements */
.nav-icon,
.btn-primary,
.btn-action,
.btn-new,
.calendar-nav-btn,
.mini-calendar-day {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: rgba(255, 0, 64, 0.2);
}

/* Optimize animations for mobile */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Fix iOS input shadows */
@media (max-width: 767px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    input[type="time"],
    textarea {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        border-radius: 8px;
    }
}

/* Sticky positioning fix for iOS */
@supports (-webkit-overflow-scrolling: touch) {
    .top-nav-bar {
        position: -webkit-sticky;
        position: sticky;
    }
}

/* Improve touch target sizes */
@media (hover: none) {
    .entry-item,
    .task-item,
    .checklist-item {
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .mini-calendar-day.has-items {
        padding: 5px;
    }
}

/* Handle notch on iPhone X and newer */
@media only screen 
    and (device-width: 375px) 
    and (device-height: 812px) 
    and (-webkit-device-pixel-ratio: 3) {
    .top-nav-bar {
        padding-top: max(15px, 44px); /* Status bar height */
    }
}

/* Landscape optimization for tablets */
@media (min-width: 768px) and (max-width: 1023px) and (orientation: landscape) {
    .top-nav-bar {
        flex-direction: row;
    }
    
    .nav-icons-group {
        width: auto;
    }
}

/* Ultra-wide mobile screens */
@media (min-width: 768px) and (max-width: 1023px) and (orientation: portrait) {
    /* No special calendar widget styles needed - using modal */
}