/* Memories Section Styles */

/* Memories Stats */
.memories-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Memories Tabs */
.memories-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color, #e1e5e9);
}

.memories-tabs .tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary, #6b7280);
    transition: all 0.3s ease;
}

.memories-tabs .tab-btn.active {
    color: var(--primary-color, #3b82f6);
    border-bottom-color: var(--primary-color, #3b82f6);
}

.memories-tabs .tab-btn:hover {
    color: var(--primary-color, #3b82f6);
    background: var(--hover-bg, #f8fafc);
}

/* Memories Filters */
.memories-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-container {
    margin-left: auto;
}

.search-input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color, #e1e5e9);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    min-width: 250px;
    background: var(--card-bg, #ffffff);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    transform: scale(1.02);
}

.search-input::placeholder {
    color: var(--text-secondary, #6b7280);
    font-style: italic;
}

/* Memories Gallery Grid */
.memories-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.memory-card {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e1e5e9);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.memory-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.memory-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    cursor: pointer;
}

.memory-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--bg-secondary, #f8fafc);
    transition: transform 0.3s ease;
}

.memory-image-container:hover .memory-image {
    transform: scale(1.05);
}

.image-date-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.memory-image-container:hover .image-date-overlay {
    opacity: 1;
}

.image-date-overlay .date-text {
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 0.5rem;
    backdrop-filter: blur(10px);
}

.memory-content {
    padding: 1rem;
}

.memory-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary, #1f2937);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.memory-description {
    color: var(--text-secondary, #6b7280);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.memory-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light, #f1f5f9);
}

.memory-date {
    color: var(--text-secondary, #6b7280);
    font-size: 0.75rem;
}

.memory-favorite {
    color: #fbbf24;
    font-size: 1.25rem;
}

.memory-actions {
    display: flex;
    gap: 0.5rem;
}

.memory-actions button {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    border-radius: 0.25rem;
    color: var(--text-secondary, #6b7280);
    transition: all 0.2s ease;
}

.memory-actions button:hover {
    background: var(--hover-bg, #f8fafc);
    color: var(--text-primary, #1f2937);
}

/* Birthdays Section */
.birthdays-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.upcoming-birthdays,
.all-birthdays {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e1e5e9);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.upcoming-birthdays h3,
.all-birthdays h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary, #1f2937);
    font-size: 1.125rem;
}

.birthday-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--border-light, #f1f5f9);
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.birthday-item:hover {
    background: var(--hover-bg, #f8fafc);
    border-color: var(--border-color, #e1e5e9);
}

.birthday-item.upcoming {
    background: #fef3cd;
    border-color: #fbbf24;
}

.birthday-item.today {
    background: #fecaca;
    border-color: #ef4444;
}

.birthday-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--primary-color, #3b82f6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.25rem;
}

.birthday-info {
    flex: 1;
}

.birthday-name {
    font-weight: 600;
    color: var(--text-primary, #1f2937);
    margin-bottom: 0.25rem;
}

.birthday-date {
    color: var(--text-secondary, #6b7280);
    font-size: 0.875rem;
}

.birthday-days-left {
    color: var(--primary-color, #3b82f6);
    font-size: 0.75rem;
    font-weight: 500;
}

.birthday-actions {
    display: flex;
    gap: 0.5rem;
}

.birthday-actions button {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 0.25rem;
    color: var(--text-secondary, #6b7280);
    transition: all 0.2s ease;
}

.birthday-actions button:hover {
    background: var(--hover-bg, #f8fafc);
    color: var(--text-primary, #1f2937);
}

.add-birthday-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    border-radius: 50%;
    width: 3.5rem;
    height: 3.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

/* Modal Styles for Memories */
.image-preview {
    margin-top: 0.75rem;
    border: 2px dashed var(--border-color, #e1e5e9);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 0.5rem;
}

.image-preview.empty {
    color: var(--text-secondary, #6b7280);
    font-size: 0.875rem;
}

.memory-view-content {
    max-width: 800px;
    margin: 0 auto;
}

.memory-date-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.memory-date-icon {
    font-size: 1.25rem;
}

.memory-date-text {
    font-size: 1.125rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.memory-view-image {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.memory-view-image:hover {
    transform: scale(1.02);
}

.memory-relative-date {
    color: var(--text-secondary, #6b7280);
    font-size: 0.875rem;
    font-style: italic;
}

.memory-view-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #1f2937);
    margin-bottom: 0.75rem;
}

.memory-view-description {
    color: var(--text-secondary, #6b7280);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.memory-view-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light, #f1f5f9);
}

/* Empty States */
.empty-memories {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary, #6b7280);
}

.empty-memories h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary, #1f2937);
}

.empty-birthdays {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary, #6b7280);
}

/* Help Section Styles */
.help-instructions-section {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e1e5e9);
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.help-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-secondary, #f8fafc);
    border-radius: 0.5rem;
}

.help-page {
    display: none;
    text-align: center;
    padding: 2rem;
}

.help-page.active {
    display: block;
}

.help-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.help-page h4 {
    color: var(--primary-color, #3b82f6);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.help-page ul {
    text-align: left;
    max-width: 600px;
    margin: 0 auto 1.5rem auto;
    line-height: 1.6;
}

.help-page li {
    margin-bottom: 0.5rem;
}

.contact-info {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 0.75rem;
    border: 1px solid #bae6fd;
}

.contact-details {
    margin: 1rem 0;
}

.support-tips {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--card-bg, #ffffff);
    border-radius: 0.5rem;
}

.support-tips ul {
    margin-top: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .memories-gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .birthdays-section {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .memories-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .filter-buttons {
        justify-content: center;
    }

    .search-container {
        margin-left: 0;
    }

    .search-input {
        min-width: auto;
        width: 100%;
    }

    .help-instructions-section {
        padding: 1rem;
    }

    .help-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .help-page {
        padding: 1rem;
    }
    
    .add-birthday-btn {
        bottom: 1rem;
        right: 1rem;
        width: 3rem;
        height: 3rem;
        font-size: 0.875rem;
    }
    
    .memory-view-content {
        padding: 1rem;
    }
}

/* Loading and Animation States */
.memory-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.memory-card.loading .memory-image {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Filter Active States */
.filter-btn.active {
    background: #3b82f6;
    color: white;
}

.filter-btn:hover {
    background: #dbeafe;
    color: #3b82f6;
}

.filter-btn.active:hover {
    background: #2563eb;
    color: white;
}

/* Slideshow Styles */
.slideshow-modal {
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
}

.slideshow-modal .modal-content {
    max-width: none;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.slideshow-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    color: white;
}

.slideshow-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.slideshow-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
}

.slideshow-controls-top {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.slideshow-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.slideshow-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.close-slideshow {
    font-size: 1.5rem;
    padding: 0.25rem 0.5rem;
}

.slideshow-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 0;
}

.slideshow-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slideshow-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: opacity 0.5s ease;
}

.slideshow-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    display: none;
}

.slideshow-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 2rem;
}

.nav-btn {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: bold;
    transition: all 0.3s ease;
    pointer-events: auto;
    backdrop-filter: blur(10px);
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.slideshow-footer {
    padding: 1.5rem 2rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
}

.slideshow-info {
    flex: 1;
    min-width: 0;
}

.slideshow-memory-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.slideshow-memory-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    max-width: 600px;
}

.slideshow-memory-date {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.slideshow-progress {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    min-width: 150px;
}

.slideshow-counter {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    font-weight: 500;
}

.slideshow-progress-bar {
    width: 150px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.slideshow-progress-fill {
    height: 100%;
    background: #3b82f6;
    transition: width 0.5s ease;
    border-radius: 2px;
}

/* Slideshow Animation States */
.slideshow-image.fade-out {
    opacity: 0;
}

.slideshow-image.fade-in {
    opacity: 1;
}

/* Slideshow Responsive Design */
@media (max-width: 768px) {
    .slideshow-header {
        padding: 0.75rem 1rem;
    }

    .slideshow-title {
        font-size: 1rem;
    }

    .slideshow-controls-top {
        gap: 0.5rem;
    }

    .slideshow-btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }

    .slideshow-navigation {
        padding: 0 1rem;
    }

    .nav-btn {
        width: 3rem;
        height: 3rem;
        font-size: 1.25rem;
        padding: 0.75rem;
    }

    .slideshow-footer {
        padding: 1rem;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .slideshow-memory-title {
        font-size: 1.25rem;
    }

    .slideshow-memory-description {
        font-size: 0.875rem;
    }

    .slideshow-progress {
        align-items: stretch;
    }

    .slideshow-progress-bar {
        width: 100%;
    }
}

/* Slideshow Fullscreen Mode */
.slideshow-modal.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
}

.slideshow-modal.fullscreen .slideshow-image {
    max-width: 95%;
    max-height: 95%;
}

/* Slideshow Loading State */
.slideshow-modal.loading .slideshow-loading {
    display: block;
}

.slideshow-modal.loading .slideshow-image {
    opacity: 0.3;
}

/* Slideshow Controls Animation */
.slideshow-controls-top .slideshow-btn.active {
    background: rgba(59, 130, 246, 0.7);
    border-color: rgba(59, 130, 246, 0.8);
}

/* Slideshow Speed Indicator */
.slideshow-btn.speed-1x::after { content: ' 1x'; }
.slideshow-btn.speed-2x::after { content: ' 2x'; }
.slideshow-btn.speed-3x::after { content: ' 3x'; }

/* Date Tooltip Styles */
.date-tooltip {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.date-tooltip.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}

.date-tooltip-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.date-tooltip .date-icon {
    font-size: 1rem;
}

/* Memory Card Click Interaction */
.memory-card {
    position: relative;
}

.memory-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(29, 78, 216, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0.75rem;
    pointer-events: none;
    z-index: 1;
}

.memory-card:hover::before {
    opacity: 1;
}

.memory-card:active {
    transform: translateY(-1px) scale(0.98);
}

/* Enhanced Memory Card Styles */
.memory-card:hover .memory-title {
    color: var(--primary-color, #3b82f6);
}

.memory-card .memory-content {
    position: relative;
    z-index: 2;
}

/* Click instruction for images */
.memory-image-container::after {
    content: '📅 Click for date';
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.memory-image-container:hover::after {
    opacity: 1;
}

/* ========================================= */
/* COMPREHENSIVE DARK MODE SUPPORT */
/* ========================================= */

/* Memories Stats - Dark Mode */
.dark-mode .memories-stats {
    background: #1f2937;
}

.dark-mode .stat-card {
    background: #1f2937;
    border-color: #374151;
    color: #f9fafb;
}

.dark-mode .stat-card span {
    color: #60a5fa;
}

.dark-mode .stat-card label {
    color: #9ca3af;
}

/* Memories Tabs - Dark Mode */
.dark-mode .memories-tabs {
    border-bottom-color: #374151;
}

.dark-mode .memories-tabs .tab-btn {
    color: #9ca3af;
    background: #1f2937;
}

.dark-mode .memories-tabs .tab-btn:hover {
    color: #60a5fa;
    background: #374151;
}

.dark-mode .memories-tabs .tab-btn.active {
    color: #60a5fa;
    border-bottom-color: #60a5fa;
}

/* Memories Filters - Dark Mode */
.dark-mode .filter-btn {
    background: #374151;
    color: #f9fafb;
    border-color: #4b5563;
}

.dark-mode .filter-btn:hover {
    background: #4b5563;
    color: #60a5fa;
}

.dark-mode .filter-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.dark-mode .search-input {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

.dark-mode .search-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.dark-mode .search-input::placeholder {
    color: #9ca3af;
}

/* Memory Cards - Dark Mode */
.dark-mode .memory-card {
    background: #1f2937;
    border-color: #374151;
}

.dark-mode .memory-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.dark-mode .memory-title {
    color: #f9fafb;
}

.dark-mode .memory-description {
    color: #9ca3af;
}

.dark-mode .memory-date {
    color: #9ca3af;
}

.dark-mode .memory-meta {
    border-top-color: #374151;
}

.dark-mode .memory-actions button:hover {
    background: #4b5563;
    color: #f9fafb;
}

/* Birthday Items - Dark Mode */
.dark-mode .upcoming-birthdays,
.dark-mode .all-birthdays {
    background: #1f2937;
    border-color: #374151;
}

.dark-mode .upcoming-birthdays h3,
.dark-mode .all-birthdays h3 {
    color: #f9fafb;
}

.dark-mode .birthday-item {
    border-color: #374151;
}

.dark-mode .birthday-item:hover {
    background: #374151;
    border-color: #4b5563;
}

.dark-mode .birthday-item.upcoming {
    background: #451a03;
    border-color: #f59e0b;
}

.dark-mode .birthday-item.today {
    background: #7f1d1d;
    border-color: #ef4444;
}

.dark-mode .birthday-name {
    color: #f9fafb;
}

.dark-mode .birthday-date,
.dark-mode .birthday-days-left {
    color: #9ca3af;
}

.dark-mode .birthday-actions button:hover {
    background: #4b5563;
    color: #f9fafb;
}

/* Memory View Modal - Dark Mode */
.dark-mode .memory-date-header {
    background: linear-gradient(135deg, #1e40af, #1e3a8a);
    color: white;
}

.dark-mode .memory-view-title {
    color: #f9fafb;
}

.dark-mode .memory-view-description {
    color: #9ca3af;
}

.dark-mode .memory-view-meta {
    border-top-color: #374151;
}

.dark-mode .memory-relative-date {
    color: #9ca3af;
}

/* Help Section - Dark Mode */
.dark-mode .help-instructions-section {
    background: #1f2937;
    border-color: #374151;
}

.dark-mode .help-instructions-section h3 {
    color: #f9fafb;
}

.dark-mode .help-navigation {
    background: #374151;
}

.dark-mode .help-navigation button {
    background: #4b5563;
    color: #f9fafb;
    border-color: #6b7280;
}

.dark-mode .help-navigation button:hover:not(:disabled) {
    background: #6b7280;
    border-color: #9ca3af;
}

.dark-mode .help-navigation button:disabled {
    opacity: 0.4;
    background: #374151;
}

.dark-mode .help-navigation span {
    color: #9ca3af;
}

.dark-mode .help-page h4 {
    color: #60a5fa;
}

.dark-mode .help-page p,
.dark-mode .help-page li {
    color: #e5e7eb;
}

.dark-mode .help-page strong {
    color: #f9fafb;
}

.dark-mode .contact-info {
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
    border-color: #3b82f6;
}

.dark-mode .contact-info h3 {
    color: white;
}

.dark-mode .contact-info p {
    color: #e0f2fe;
}

.dark-mode .contact-info a {
    color: #93c5fd;
}

.dark-mode .contact-info a:hover {
    color: #dbeafe;
}

.dark-mode .support-tips {
    background: #374151;
    border: 1px solid #4b5563;
}

.dark-mode .support-tips h4 {
    color: #f9fafb;
}

.dark-mode .support-tips li {
    color: #d1d5db;
}

/* Empty States - Dark Mode */
.dark-mode .empty-memories {
    color: #9ca3af;
}

.dark-mode .empty-memories h3 {
    color: #f9fafb;
}

.dark-mode .empty-birthdays {
    color: #9ca3af;
}

/* Image Preview - Dark Mode */
.dark-mode .image-preview {
    border-color: #4b5563;
    background: #374151;
}

.dark-mode .image-preview.empty {
    color: #9ca3af;
}

/* Modals - Dark Mode */
.dark-mode .modal-content {
    background: #1f2937;
    border-color: #374151;
}

.dark-mode .modal-content h2 {
    color: #f9fafb;
}

.dark-mode .form-group label {
    color: #d1d5db;
}

.dark-mode .form-group input,
.dark-mode .form-group select,
.dark-mode .form-group textarea {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

.dark-mode .form-group input:focus,
.dark-mode .form-group select:focus,
.dark-mode .form-group textarea:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.dark-mode .form-group input::placeholder,
.dark-mode .form-group textarea::placeholder {
    color: #9ca3af;
}

.dark-mode .checkbox-group .checkmark {
    border-color: #4b5563;
    background: #374151;
}

.dark-mode .checkbox-group input[type="checkbox"]:checked + .checkmark {
    background: #3b82f6;
    border-color: #3b82f6;
}

.dark-mode .form-actions {
    border-top-color: #374151;
}

/* Date Tooltip - Dark Mode Support (already dark by design) */
.dark-mode .date-tooltip-content {
    background: rgba(0, 0, 0, 0.95);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Memory Card Interactions - Dark Mode */
.dark-mode .memory-card::before {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.1), rgba(59, 130, 246, 0.1));
}

.dark-mode .memory-card:hover .memory-title {
    color: #60a5fa;
}

/* Image Date Overlay - Dark Mode */
.dark-mode .image-date-overlay .date-text {
    background: rgba(0, 0, 0, 0.9);
    color: white;
}

/* Loading States - Dark Mode */
.dark-mode .memory-card.loading .memory-image {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
}

/* Slideshow - Dark Mode Support (already optimized for dark) */
.dark-mode .slideshow-modal {
    background: rgba(0, 0, 0, 0.98);
}

/* Responsive Dark Mode Fixes */
@media (max-width: 768px) {
    .dark-mode .help-instructions-section {
        background: #1f2937;
    }

    .dark-mode .help-navigation {
        background: #374151;
    }

    .dark-mode .memory-view-content {
        background: #1f2937;
    }
}

/* Button Variants - Dark Mode */
.dark-mode .btn-primary {
    background: #3b82f6;
    color: white;
}

.dark-mode .btn-primary:hover {
    background: #2563eb;
}

.dark-mode .btn-secondary {
    background: #374151;
    color: #f9fafb;
    border-color: #4b5563;
}

.dark-mode .btn-secondary:hover {
    background: #4b5563;
    border-color: #6b7280;
}

.dark-mode .btn-danger {
    background: #dc2626;
    color: white;
}

.dark-mode .btn-danger:hover {
    background: #b91c1c;
}

/* Special Dark Mode Improvements */
.dark-mode .add-birthday-btn {
    background: #3b82f6;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.dark-mode .add-birthday-btn:hover {
    background: #2563eb;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

/* Memory Image Container Dark Mode */
.dark-mode .memory-image-container::after {
    background: rgba(0, 0, 0, 0.8);
    color: #e5e7eb;
}

/* Progress and Status Indicators - Dark Mode */
.dark-mode .progress-bar {
    background: #374151;
}

.dark-mode .status-good {
    background: #064e3b;
    color: #6ee7b7;
}

.dark-mode .status-warning {
    background: #451a03;
    color: #fbbf24;
}

.dark-mode .status-danger {
    background: #7f1d1d;
    color: #fca5a5;
}
