:root {
    --primary-color: #ff4d6d;
    --primary-light: #ffb3c1;
    --primary-dark: #c9184a;
    --secondary-color: #4361ee;
    --secondary-light: #a2d2ff;
    --dark-bg: #0b132b;
    --card-bg: #1c2541;
    --light-text: #f8f9fa;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #0b132b;
    color: #fff;
}

.font-cursive {
    font-family: 'Dancing Script', cursive;
}

.card {
    background-color: #1c2541;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.gradient-text {
    background: linear-gradient(45deg, #ff4d6d, #4361ee);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-primary {
    background-color: #ff4d6d;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #d1345a;
}

.btn-secondary {
    background-color: #4361ee;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #3a53cc;
}

.input-field {
    background-color: #3a506b;
    border: none;
    color: white;
}

.input-field::placeholder {
    color: #8d99ae;
}

.input-field:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 77, 109, 0.3);
    outline: none;
}

select.input-field {
    background-color: var(--card-bg);
    color: var(--light-text);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

select.input-field option {
    background-color: var(--card-bg);
    color: var(--light-text);
}

.card-header {
    border-bottom: 2px solid rgba(255, 77, 109, 0.3);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.photo-item {
    position: relative;
    height: 200px;
    overflow: hidden;
    border-radius: 0.5rem;
    cursor: pointer;
}

.photo-item img {
    transition: transform 0.3s ease;
}

.photo-item:hover img {
    transform: scale(1.05);
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-item:hover .photo-overlay {
    opacity: 1;
}

.heart-icon {
    color: #ff4d6d;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.progress {
    height: 8px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.mood-emoji {
    font-size: 1.75rem;
    transition: all 0.3s ease;
}

.mood-emoji:hover {
    transform: scale(1.2);
    cursor: pointer;
}

.mood-emoji.unselected {
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.mood-emoji.unselected:hover {
    opacity: 0.8;
}

.notification {
    animation: slideIn 0.3s forwards, fadeOut 0.3s 2.7s forwards;
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.tab-button {
    position: relative;
    transition: all 0.3s ease;
}

.tab-button::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #ff4d6d;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.tab-button:hover::after {
    width: 50%;
}

.tab-active {
    color: #ff4d6d;
}

.tab-active::after {
    width: 80%;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.love-note {
    background-color: #2c3e50;
    border-left: 3px solid #ff4d6d;
}

.anniversary-countdown {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #1c2541, #3a506b);
    border-radius: 0.5rem;
}

.countdown-number {
    font-size: 3rem;
    font-weight: bold;
    color: #ff4d6d;
    display: block;
}

.countdown-label {
    color: #8d99ae;
}

.quote-card {
    background-color: rgba(67, 97, 238, 0.1);
    border-left: 4px solid var(--secondary-color);
}

.date-idea-card {
    background-color: rgba(58, 80, 107, 0.4);
    transition: background-color 0.3s ease;
    border-left: 3px solid transparent;
}

.date-idea-card:hover {
    background-color: rgba(58, 80, 107, 0.6);
}

.date-idea-card.completed {
    background-color: rgba(58, 80, 107, 0.2);
    border-left: 3px solid #4361ee;
}

.date-filter.active {
    background-color: rgba(255, 77, 109, 0.2);
    color: #ff4d6d;
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.avatar-s {
    background-color: #4361ee;
}

.avatar-i {
    background-color: #ff4d6d;
}

.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 4px;
    width: 2px;
    background-color: #3a506b;
}

.timeline-item {
    position: relative;
    padding-left: 20px;
    margin-bottom: 20px;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ff4d6d;
}

.delete-btn {
    color: #8d99ae;
}

.delete-btn:hover {
    color: #ff4d6d;
}

.mood-label .mood-emoji {
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.mood-label input:checked + .mood-emoji {
    filter: grayscale(0%);
}

.checkbox-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8d99ae;
    transition: all 0.2s ease;
}

.checkbox-btn:hover {
    color: #ff4d6d;
}

.checkbox-btn.checked {
    color: #4361ee;
}

.checkbox-btn.checked:hover {
    color: #3a53cc;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .card {
        padding: 1rem !important;
    }
    
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .photo-item {
        height: 150px;
    }
    
    /* Make buttons larger and easier to tap on mobile */
    button, .btn-primary, .btn-secondary {
        min-height: 44px;
        padding: 0.75rem !important;
    }
    
    /* Show photo overlay by default on mobile for better UX */
    .photo-overlay {
        opacity: 1;
        background: rgba(0, 0, 0, 0.5);
        padding: 0.5rem;
    }
    
    /* Improve form elements on mobile */
    input, select, textarea {
        font-size: 16px !important; /* Prevents iOS zoom on focus */
    }
    
    /* Better spacing for mobile */
    .grid {
        gap: 0.75rem !important;
    }
    
    /* Make modals better on mobile */
    #sexCounterModal .card,
    #addEventModal .card,
    #imageModal .relative {
        width: 95% !important;
        max-width: 95% !important;
    }
    
    /* Improve tabs scrolling */
    .tabs-container {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        padding-bottom: 5px;
    }
    
    .tabs-container::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    /* Add visual indicator for scrollable tabs */
    .tabs-container::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 30px;
        background: linear-gradient(to right, transparent, rgba(11, 19, 43, 0.8));
        pointer-events: none;
    }
}

/* Fix for file inputs on mobile */
.file-input-fix {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

/* Custom file upload styling */
.custom-file-upload {
    display: block;
    position: relative;
    overflow: hidden;
    background-color: #3a506b;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-file-upload:hover {
    background-color: #455a79;
    border-color: rgba(255, 77, 109, 0.4);
}

.custom-file-upload input[type="file"] {
    position: absolute;
    font-size: 100px;
    opacity: 0;
    right: 0;
    top: 0;
    cursor: pointer;
}

.custom-file-upload .file-upload-text {
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-file-upload .file-upload-icon {
    margin-right: 0.5rem;
    color: #ff4d6d;
}

/* Add touch feedback */
.touch-active {
    transform: scale(0.97);
    opacity: 0.9;
}

/* Better responsive layout for forms */
@media (max-width: 768px) {
    form .grid {
        grid-template-columns: 1fr !important;
    }
}

.flip-card-container {
    perspective: 1000px;
    height: 100%;
}

.flip-card {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-card.flipped {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.flip-card-back {
    transform: rotateY(180deg);
}

.goal-item.completed {
    opacity: 0.7;
}

/* Add this to your CSS file */
.photo-thumbnail {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    cursor: pointer;
    border-radius: 8px;
    transition: transform 0.2s;
}

.photo-thumbnail:hover {
    transform: scale(1.03);
}

/* Modal styles */
.photo-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    padding-top: 60px;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.recent-photo-item {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 0.5rem;
    cursor: pointer;
}

.recent-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recent-photo-item:hover img {
    transform: scale(1.05);
}

.dashboard-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    max-height: 240px;
    overflow-y: auto;
}

/* Photo Gallery Grid */
.photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    padding: 0.5rem;
}

.gallery-photo-item {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-photo-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.gallery-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-photo-item:hover img {
    transform: scale(1.05);
}

.photo-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.75rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .photo-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.5rem;
    }
    
    .photo-title {
        font-size: 0.65rem;
        padding: 0.25rem;
    }
}

/* Add this to your CSS file */
.btn-primary.upload-btn {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary.upload-btn:hover {
    background: linear-gradient(45deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.1), 0 3px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary.upload-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary.upload-btn i {
    margin-right: 0.5rem;
    font-size: 1.1em;
}

/* Add a subtle animation effect */
.btn-primary.upload-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
}

.btn-primary.upload-btn:hover::after {
    animation: shine 1.5s;
}

@keyframes shine {
    100% {
        transform: translateX(100%);
    }
}

/* Mobile optimization */
@media (max-width: 768px) {
    .btn-primary.upload-btn {
        width: 100%;
        padding: 0.85rem 1rem;
    }
}

.gallery-photo-item {
    position: relative; /* Ensure relative positioning for absolute child elements */
}

/* Add some hover effect for the delete button if desired */
.gallery-photo-item .absolute {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.gallery-photo-item:hover .absolute {
    opacity: 1;
}