/* ========== CSS VARIABLES FOR PREMIUM THEME ========== */
:root {
    --bg-dark: #0a0a0c;
    --bg-card: rgba(20, 20, 25, 0.7);
    --text-main: #f0e6e6;
    --text-muted: #b8b0b0;
    --accent-red: #8B0000;
    --accent-gold: #c5a059;
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lora', serif;
}

/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Subtle animated background (stars/dust) */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(circle at center, #1a1014 0%, var(--bg-dark) 100%);
}

/* ========== HERO SECTION (HEADER) ========== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 2rem;
}

.hero-content {
    max-width: 800px;
    animation: fadeIn 2s ease-out;
}

.title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, var(--accent-gold), #fff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 2px 2px 20px rgba(197, 160, 89, 0.2);
}

.subtitle {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--accent-red);
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

.hero-text {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-gold);
    font-size: 0.9rem;
    letter-spacing: 1px;
    opacity: 0.8;
}

.arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--accent-gold);
    border-bottom: 2px solid var(--accent-gold);
    transform: rotate(45deg);
    animation: bounce 2s infinite;
}

/* ========== MAIN GALLERY AREA ========== */
.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-align: center;
    color: var(--accent-gold);
    margin-bottom: 3rem;
    font-style: italic;
}

.memories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-bottom: 6rem;
}

/* ========== MEMORY CARDS ========== */
.memory-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--glass-shadow);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
}

.memory-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.memory-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(139, 0, 0, 0.2);
    border-color: rgba(197, 160, 89, 0.3);
}

.memory-date {
    font-family: var(--font-heading);
    color: var(--accent-gold);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.memory-date::before {
    content: '';
    display: block;
    width: 20px;
    height: 1px;
    background: var(--accent-gold);
}

.memory-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    filter: brightness(0.9) contrast(1.1);
    transition: filter 0.3s ease;
}

.memory-card:hover .memory-image {
    filter: brightness(1) contrast(1.1);
}

.memory-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: #fff;
}

.memory-text {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ========== NOTES SECTION ========== */
.notes-section {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 3rem 2rem;
    margin-top: 2rem;
    box-shadow: var(--glass-shadow);
}

.notes-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.notes-header h2 {
    color: var(--accent-gold);
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.notes-header p {
    color: var(--text-muted);
}

.note-input-area {
    max-width: 700px;
    margin: 0 auto 3rem auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.note-input-area textarea {
    width: 100%;
    background: rgba(10, 10, 12, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 1rem;
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    resize: vertical;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.note-input-area textarea:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-red), #5c0000);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    align-self: flex-end;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 0, 0, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.note-item {
    background: rgba(10, 10, 12, 0.6);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--accent-red);
    padding: 1.5rem;
    border-radius: 8px;
    position: relative;
    animation: fadeIn 0.5s ease-out;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.note-item:hover {
    transform: translateY(-2px);
    border-color: rgba(197, 160, 89, 0.3);
    border-left-color: var(--accent-gold);
}

.note-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.note-item-date {
    font-size: 0.85rem;
    color: var(--accent-gold);
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.note-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s ease, transform 0.2s ease;
    padding: 4px;
}

.btn-icon:hover {
    transform: scale(1.1);
}

.btn-icon.edit-btn:hover {
    color: var(--accent-gold);
}

.btn-icon.delete-btn:hover {
    color: #ff4d4d;
}

.note-content {
    color: var(--text-main);
    line-height: 1.6;
    white-space: pre-wrap;
    /* Preserves line breaks */
}

/* ========== FOOTER ========== */
footer {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-style: italic;
    border-top: 1px solid var(--glass-border);
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) rotate(45deg);
    }

    40% {
        transform: translateY(-10px) rotate(45deg);
    }

    60% {
        transform: translateY(-5px) rotate(45deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .memories-grid {
        grid-template-columns: 1fr;
    }

    .notes-section {
        padding: 2rem 1rem;
    }
}