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

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overscroll-behavior-x: none;
}

#main-content {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.page {
    display: none;
    width: 100%;
    max-width: 500px;
    animation: fadeIn 0.5s ease-in;
}

.page.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

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

/* Landing Page */
.landing-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 60px 16px;
}

.landing-header {
    text-align: center;
    margin-bottom: 32px;
    padding: 32px 28px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 3px dashed #e2e8f0;
    position: relative;
}

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

.card-label {
    font-size: 10px;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.landing-title {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.landing-from {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
}

.landing-date {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-top: 16px;
    border-top: 2px solid #f1f5f9;
    margin-top: 8px;
}

/* Relationship Counter */
.counter-container {
    background: white;
    border-radius: 16px;
    padding: 28px 24px;
    margin: 24px 0 0 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 2px solid transparent;
    opacity: 0;
    transform: translateY(30px);
}

#main-content .counter-container {
    animation: fadeInUp 0.6s ease-out 1.2s forwards;
}

.counter-header {
    text-align: center;
    margin-bottom: 20px;
}

.counter-emoji {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.counter-emoji-img {
    width: 48px;
    height: 48px;
    display: block;
    margin: 0 auto 8px;
}

.counter-title {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.counter-display {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 0;
}

.counter-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

.counter-value {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.counter-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.counter-subtitle {
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
    font-weight: 600;
    margin: 0;
}

/* Responsive Counter */
@media (max-width: 480px) {
    .counter-display {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .counter-item {
        padding: 14px 8px;
    }
    
    .counter-value {
        font-size: 24px;
    }
    
    .counter-label {
        font-size: 10px;
    }
}

.gift-tag {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    border: 2px dashed #cbd5e1;
    margin-bottom: 16px;
    animation: slideInFromTop 0.6s ease-out;
}

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

.tag-from,
.tag-to {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.tag-from {
    animation-delay: 0.3s;
}

.tag-to {
    animation-delay: 0.6s;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.tag-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #94a3b8;
    font-weight: 700;
}

.tag-name {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tag-heart {
    padding: 0 8px;
}

@keyframes fadeInHeart {
    from {
        opacity: 0;
        transform: scale(0.5) rotate(-20deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.tag-heart img {
    width: 32px;
    height: 32px;
    animation: heartbeat 1.5s ease-in-out 1.3s infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.gift-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.gift-card {
    background: white;
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 150px;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.gift-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

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

.gift-card:active {
    transform: scale(0.98);
}

.gift-card.wide {
    grid-column: span 2;
}

.gift-card:hover .gift-icon,
.gift-card:hover .gift-title,
.gift-card:hover .gift-desc {
    color: white;
    position: relative;
    z-index: 1;
}

.gift-icon {
    font-size: 36px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.gift-icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.gift-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.gift-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
    transition: all 0.3s ease;
}

/* Old styles - keeping for backwards compatibility */
.container {
    background: white;
    border-radius: 24px;
    padding: 40px 35px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    text-align: center;
    width: 100%;
    max-width: 500px;
    position: relative;
}

.title {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 16px;
    color: #64748b;
    margin-bottom: 35px;
    font-weight: 400;
}

.button-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.choice-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    border: none;
    padding: 18px 24px;
    font-size: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px 0 rgba(102, 126, 234, 0.25);
    position: relative;
    overflow: hidden;
}

.choice-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.choice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px 0 rgba(102, 126, 234, 0.35);
}

.choice-btn:hover::before {
    opacity: 1;
}

.choice-btn:active {
    transform: translateY(0);
}

/* Receipt Page */
.receipt {
    position: relative;
    background: white;
    border-radius: 24px;
    padding: 40px 35px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    max-width: 500px;
    width: 100%;
    font-family: 'Courier New', monospace;
    max-height: 85vh;
    overflow-y: auto;
}

.receipt-header {
    text-align: center;
    border-bottom: 2px dashed #667eea;
    padding-bottom: 18px;
    margin-bottom: 25px;
}

.receipt-header h2 {
    font-size: 22px;
    color: #667eea;
    margin-bottom: 8px;
    font-weight: 700;
}

.receipt-date {
    color: #64748b;
    font-size: 14px;
}

.receipt-id {
    color: #94a3b8;
    font-size: 12px;
    margin-top: 5px;
    font-family: monospace;
}

/* Coupon Categories */
.coupon-category {
    margin-bottom: 25px;
}

.category-title {
    font-size: 14px;
    font-weight: 700;
    color: #667eea;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.premium-category .category-title {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.unlimited-category .category-title {
    color: #667eea;
}

/* Coupon Items */
.coupon-item {
    margin-bottom: 15px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    transition: all 0.3s;
}

.coupon-item:hover {
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.coupon-item.premium {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    box-shadow: 0 2px 12px rgba(245, 158, 11, 0.2);
}

.coupon-item.premium:hover {
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.coupon-item.unlimited {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border-left: 4px solid #667eea;
}

.coupon-item.special {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    border-left: 4px solid #ec4899;
}

.coupon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.coupon-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 15px;
}

.coupon-qty,
.coupon-code {
    font-weight: 700;
    color: #667eea;
    font-size: 14px;
}

.premium .coupon-code {
    color: #f59e0b;
}

.coupon-desc {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 4px;
    font-style: italic;
}

.coupon-expiry {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 8px;
}

.use-coupon-btn {
    background: #f8fafc;
    color: #1f2937;
    border: 1px dashed #667eea;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    width: 100%;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.use-coupon-btn:hover {
    background: #eef2ff;
    border-color: #667eea;
    transform: translateY(-2px);
}

.use-coupon-btn:active {
    transform: translateY(0);
}

.coupon-item.premium .use-coupon-btn {
    border-color: #f59e0b;
}

.coupon-item.premium .use-coupon-btn:hover {
    background: #fef3c7;
    border-color: #f59e0b;
}

.coupon-item.special .use-coupon-btn {
    border-color: #ec4899;
}

.coupon-item.special .use-coupon-btn:hover {
    background: #fce7f3;
    border-color: #ec4899;
}

.coupon-item.used .use-coupon-btn {
    background: #94a3b8;
    cursor: not-allowed;
    border-color: #94a3b8;
}

.used-count {
    color: #10b981;
    font-weight: 700;
}

.receipt-footer {
    text-align: center;
    border-top: 2px dashed #667eea;
    padding-top: 18px;
    margin-top: 25px;
}

.total {
    font-size: 20px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 12px;
}

.valid {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 5px;
}

.note {
    font-size: 12px;
    color: #94a3b8;
    font-style: italic;
}

/* Receipt Actions */
.receipt-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-top: 25px;
    padding: 0 20px;
}

.action-btn {
    background: white;
    color: #667eea;
    font-weight: 600;
    border: 2px solid #667eea;
    padding: 14px 32px;
    font-size: 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
    flex: 1;
    max-width: 180px;
}

.action-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.action-btn:active {
    transform: translateY(0);
}

.print-btn {
    /* Same as .action-btn */
}

.back-btn {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    font-weight: 600;
    padding: 14px 32px;
    font-size: 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
    flex: 1;
    max-width: 180px;
}

.back-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.reset-btn {
    position: absolute;
    right: 10px;
    background: transparent;
    color: #cbd5e1;
    border: none;
    padding: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.2;
    border-radius: 6px;
}

.reset-btn:hover {
    opacity: 0.5;
    color: #94a3b8;
    background: #f1f5f9;
}

/* Konfetti Canvas */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* Photo Capture Modal */
.photo-capture-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.photo-capture-modal.active {
    display: flex;
}

.capture-content {
    text-align: center;
    max-width: 500px;
    width: 90%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.capture-title {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.capture-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    margin-bottom: 30px;
}

#camera-video {
    width: 100%;
    max-width: 400px;
    border-radius: 16px;
    margin: 0 auto 24px;
    display: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

#camera-video.active {
    display: block;
}

.capture-preview {
    width: 100%;
    max-width: 400px;
    border-radius: 16px;
    margin: 0 auto 24px;
    display: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.capture-preview.active {
    display: block;
}

.capture-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 400px;
}

.capture-btn {
    padding: 16px 28px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.capture-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(102, 126, 234, 0.4);
}

.capture-btn.primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.capture-btn.secondary {
    background: white;
    color: #667eea;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.capture-btn.secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.capture-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .page {
        max-width: none;
    }
    
    .receipt {
        box-shadow: none;
        max-height: none;
        overflow: visible;
        padding: 40px;
    }
    
    .receipt-actions,
    .back-btn,
    .story-back,
    .reset-btn,
    .use-coupon-btn {
        display: none !important;
    }
    
    .coupon-item {
        page-break-inside: avoid;
        margin-bottom: 12px;
    }
    
    .receipt-title {
        color: #1e293b;
        margin-bottom: 30px;
    }
    
    .coupon-category {
        page-break-inside: avoid;
    }
}

/* Story Page */
.story-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 90vh;
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}

/* Upload Section */
.upload-section {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
}

.upload-btn {
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
    transition: all 0.3s ease;
}

.upload-btn:hover {
    background: #eef2ff;
    border-color: #a5b4fc;
}

/* Slideshow */
.slideshow-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 100px;
    position: relative;
}

.no-photos {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    text-align: center;
}

.no-photos p:first-child {
    font-size: 80px;
    margin-bottom: 20px;
}

.no-photos p:nth-child(2) {
    font-size: 20px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 10px;
}

.hint {
    font-size: 14px;
    color: #94a3b8;
}

.photo-slide {
    width: 100%;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #f8f9fa;
    border-radius: 16px;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    touch-action: pan-y pinch-zoom;
}

.photo-slide:active {
    cursor: grabbing;
}

.photo-slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center center;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: block;
    margin: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease-out;
    will-change: transform, opacity;
    pointer-events: none;
}

.photo-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.story-progress {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.story-navigation {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.story-nav-btn {
    background: rgba(102, 126, 234, 0.95);
    color: white;
    font-weight: 600;
    border: none;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.story-nav-btn:hover {
    background: #667eea;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.story-nav-btn:active {
    transform: scale(0.95);
}

.shuffle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

.shuffle-btn svg {
    display: block;
}

.delete-photo-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-photo-btn:hover {
    background: #ef4444;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.delete-photo-btn:active {
    transform: scale(0.95);
}

/* Back Button */
.back-btn {
    background: #64748b;
    color: white;
    font-weight: 600;
    border: none;
    padding: 12px 28px;
    font-size: 15px;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(100, 116, 139, 0.2);
}

.back-btn:hover {
    background: #475569;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.3);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    border: 2px solid #e2e8f0;
    color: #64748b;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.close-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #cbd5e1;
    transform: scale(1.1);
}

.close-btn:active {
    transform: scale(0.95);
}

/* Bucket List Styling */
.page-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.page-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0;
    text-align: center;
    letter-spacing: -0.5px;
}

.section-subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 35px;
    font-size: 15px;
}

.bucket-list {
    margin: 0 auto 25px;
}

.bucket-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    padding: 12px;
    margin-bottom: 15px;
    background: #f8fafc;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.bucket-item:hover {
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.bucket-item.completed {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-left: 4px solid #5568d3;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.bucket-item.completed .bucket-text {
    text-decoration: line-through;
    opacity: 0.9;
}

.checkbox {
    font-size: 22px;
    margin-right: 14px;
    min-width: 28px;
    line-height: 1.5;
    user-select: none;
}

.bucket-text {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    text-align: left;
    word-break: break-word;
    color: #1e293b;
    padding-right: 35px;
}

.delete-bucket-btn {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: all 0.2s ease;
    opacity: 0;
}

.bucket-item:hover .delete-bucket-btn {
    opacity: 1;
}

.delete-bucket-btn:hover {
    color: #ef4444;
    transform: translateY(-50%) scale(1.2);
}

.bucket-item.completed .delete-bucket-btn {
    color: rgba(255, 255, 255, 0.6);
}

.bucket-item.completed .delete-bucket-btn:hover {
    color: white;
}

.add-bucket-container {
    display: none;
    margin: 0 auto 20px;
    background: white;
    padding: 20px;
    border-radius: 14px;
    border: 2px solid #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.add-bucket-container.active {
    display: block;
}

.emoji-picker-section {
    margin-bottom: 16px;
}

.emoji-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 10px;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    margin-bottom: 4px;
}

.emoji-option {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    min-width: 0;
}

.emoji-option:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: scale(1.1);
}

.emoji-option.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    transform: scale(1.05);
}

.bucket-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.bucket-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.bucket-input-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.bucket-input-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bucket-input-btn.cancel {
    background: #f1f5f9;
    color: #64748b;
}

.bucket-input-btn.cancel:hover {
    background: #e2e8f0;
}

.bucket-input-btn.save {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.bucket-input-btn.save:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.add-bucket-btn {
    display: block;
    width: 100%;
    margin: 20px auto;
    padding: 16px;
    background: white;
    color: #667eea;
    border: 2px dashed #667eea;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.add-bucket-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 14px 0 rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

/* Fortune Cookie Styling */
.fortune-container {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cookie-wrapper {
    text-align: center;
    margin: 40px 0;
}

.fortune-cookie {
    font-size: 100px;
    cursor: pointer;
    transition: transform 0.3s;
    display: inline-block;
    user-select: none;
}

.fortune-cookie:hover {
    transform: scale(1.1) rotate(5deg);
}

.fortune-cookie.opened {
    animation: crumble 0.5s ease-out;
    transform: scale(0.8);
    opacity: 0.3;
}

@keyframes crumble {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(0.8) rotate(-5deg); }
}

.fortune-message {
    font-size: 18px;
    color: #1e293b;
    font-weight: 600;
    margin-top: 30px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s;
    min-height: 60px;
    line-height: 1.6;
    padding: 20px;
    background: #f8fafc;
    border-radius: 16px;
    border: 2px dashed #cbd5e1;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.fortune-message.show {
    opacity: 1;
}

.fortune-message.slide-in {
    transform: translateY(0);
}

/* Date Roulette Styling */
.roulette-container {
    text-align: center;
    margin: 30px 0;
}

.roulette-wheel {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 0 auto 30px;
}

.wheel-item {
    padding: 20px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
    color: #334155;
}

.wheel-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    font-weight: 600;
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.spin-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 700;
    border: none;
    padding: 18px 40px;
    font-size: 18px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    margin-bottom: 20px;
}

.spin-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.4);
}

.spin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.winner-display {
    font-size: 28px;
    color: #667eea;
    font-weight: 700;
    min-height: 40px;
    opacity: 0;
    transition: opacity 0.5s;
}

.winner-display.show {
    opacity: 1;
}

/* Travel Map Styling */
.map-container {
    position: relative;
    max-width: 500px;
    width: 100%;
    padding: 20px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.world-map {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 16px;
    border: 3px solid #667eea;
    margin: 20px 0;
    overflow: hidden;
    z-index: 1;
}

.map-pins {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.map-pin {
    position: absolute;
    transform: translate(-50%, -100%);
    cursor: pointer;
    transition: all 0.3s ease;
    animation: pinDrop 0.5s ease-out;
}

@keyframes pinDrop {
    0% {
        transform: translate(-50%, -200%) scale(0);
    }
    60% {
        transform: translate(-50%, -90%) scale(1.1);
    }
    100% {
        transform: translate(-50%, -100%) scale(1);
    }
}

.map-pin:hover {
    transform: translate(-50%, -100%) scale(1.2);
    z-index: 10;
}

.pin-icon {
    font-size: 28px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.pin-label {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.3s;
}

.map-pin:hover .pin-label {
    opacity: 1;
}

.map-list {
    margin-top: 20px;
}

.map-list-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

.travel-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 8px;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
}

.travel-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.travel-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.travel-pin-icon {
    font-size: 20px;
}

.travel-details {
    display: flex;
    flex-direction: column;
}

.travel-location {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.travel-date {
    font-size: 12px;
    color: #64748b;
}

.delete-travel-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    transition: all 0.2s ease;
}

.delete-travel-btn:hover {
    color: #ef4444;
    transform: scale(1.2);
}

/* Memory Game */
.memory-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

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

.stat-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.reset-game-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.memory-card {
    aspect-ratio: 2.5 / 3.5;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid #e2e8f0;
}

.memory-card.flipped {
    transform: rotateY(180deg);
}

.memory-card.matched {
    cursor: default;
}

.memory-card.matched::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotateY(180deg);
    width: 48px;
    height: 48px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 10;
    animation: checkMark 0.5s ease;
}

@keyframes checkMark {
    0% {
        transform: translate(-50%, -50%) rotateY(180deg) scale(0);
    }
    50% {
        transform: translate(-50%, -50%) rotateY(180deg) scale(1.2);
    }
    100% {
        transform: translate(-50%, -50%) rotateY(180deg) scale(1);
    }
}

.memory-card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.memory-card-front {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-size: 32px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.memory-card-front img {
    width: 48px;
    height: 48px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.memory-card-back {
    transform: rotateY(180deg);
    overflow: hidden;
}

.memory-card-back img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f8f9fa;
}

.memory-message {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    padding: 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: none;
}

.memory-message.show {
    display: block;
    animation: slideIn 0.5s ease;
}

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

/* Pin Modal */
.pin-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.pin-modal.active {
    display: flex;
}

.pin-modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.pin-modal-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    text-align: center;
}

.pin-input {
    width: 100%;
    max-width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.pin-textarea {
    resize: vertical;
    min-height: 70px;
}

.pin-field-label {
    display: block;
    font-size: 13px;
    color: #64748b;
    margin: 8px 0 4px;
}

.pin-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.pin-photo-row {
    margin-top: 4px;
}

.pin-photo-label {
    display: block;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 4px;
}

.pin-file-input {
    width: 100%;
    padding: 10px 0;
    font-size: 13px;
    color: #475569;
}

.pin-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.pin-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pin-btn.cancel {
    background: #f1f5f9;
    color: #64748b;
}

.pin-btn.cancel:hover {
    background: #e2e8f0;
}

.pin-btn.save {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.pin-btn.save:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.reset-btn {
    background: transparent;
    color: #94a3b8;
    border: none;
    padding: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.3;
}

.reset-btn:hover {
    opacity: 0.6;
    transform: rotate(90deg);
}

/* Custom Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 35px 30px;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    text-align: center;
}

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

.modal-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
}

.modal-message {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 25px;
    line-height: 1.5;
}

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

.modal-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn {
    background: #f1f5f9;
    color: #64748b;
}

.cancel-btn:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.confirm-btn {
    background: #f8fafc;
    color: #1f2937;
    border: 1px dashed #cbd5e1;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.confirm-btn:hover {
    background: #eef2ff;
    border-color: #a5b4fc;
    transform: translateY(-2px);
}

.confirm-btn:active,
.cancel-btn:active {
    transform: translateY(0);
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 35px 25px;
        border-radius: 20px;
    }
    
    .title {
        font-size: 26px;
    }
    
    .choice-btn {
        font-size: 15px;
        padding: 16px 20px;
    }
    
    .receipt {
        padding: 30px 20px;
        border-radius: 20px;
    }
    
    .image-placeholder {
        height: 300px;
    }
    
    .final-message h2 {
        font-size: 24px;
    }

    .roulette-wheel {
        grid-template-columns: 1fr;
    }
    
    .scratch-grid {
        grid-template-columns: 1fr;
    }
    
    .fortune-cookie {
        font-size: 80px;
    }

    .section-title {
        font-size: 24px;
    }

    .story-container {
        border-radius: 20px;
    }
    
    .pin-input[type="date"] {
        width: 100%;
        max-width: 100%;
        font-size: 14px;
        background: white;
        color: #1e293b;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
    
    .pin-input[type="date"]::-webkit-calendar-picker-indicator {
        filter: invert(0.5);
    }
}

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Page Transitions */
.page {
    animation: fadeIn 0.4s ease;
}

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

/* Card hover animations */
.gift-card {
    animation: cardAppear 0.4s ease;
}

.gift-card:nth-child(1) { animation-delay: 0.05s; }
.gift-card:nth-child(2) { animation-delay: 0.1s; }
.gift-card:nth-child(3) { animation-delay: 0.15s; }
.gift-card:nth-child(4) { animation-delay: 0.2s; }
.gift-card:nth-child(5) { animation-delay: 0.25s; }
.gift-card:nth-child(6) { animation-delay: 0.3s; }

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

/* Bucket item animation */
.bucket-item {
    animation: slideIn 0.3s ease;
}

/* Photo slide animation */
.photo-slide {
    animation: photoFade 0.5s ease;
}

@keyframes photoFade {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Button press feedback */
button {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

button:active:not(:disabled) {
    transform: scale(0.95);
}

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    z-index: 9999;
}

.login-container {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: 24px;
    padding: 48px 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.login-header {
    margin-bottom: 40px;
}

.login-heart {
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.login-title {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 16px;
    color: #64748b;
    font-weight: 500;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    text-align: center;
    letter-spacing: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    outline: none;
}

.login-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.login-btn {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.login-btn:active {
    transform: scale(0.98);
}

.error-message {
    color: #ef4444;
    font-size: 14px;
    font-weight: 600;
    min-height: 20px;
    margin-top: -8px;
}

.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

/* Love Counter Page */
.love-counter-container {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    border-radius: 24px;
    padding: 3rem 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    position: relative;
}

.love-counter-header {
    text-align: center;
    margin-bottom: 3rem;
}

.love-counter-header h2 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.counter-subtitle {
    font-size: 1.1rem;
    color: #64748b;
    font-weight: 500;
}

.counter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.counter-box {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    padding: 2rem 1rem;
    text-align: center;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.counter-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.counter-value {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.counter-label {
    font-size: 0.9rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.love-message {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
}

.love-message p {
    font-size: 1.3rem;
    font-weight: 600;
    font-style: italic;
    margin: 0;
}

/* Responsive for Love Counter */
@media (max-width: 768px) {
    .counter-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .counter-value {
        font-size: 2.5rem;
    }
    
    .love-counter-header h2 {
        font-size: 2rem;
    }
    
    .love-message p {
        font-size: 1.1rem;
    }
}

/* Timeline Styles */
.timeline-wrapper {
    width: 100%;
    margin-top: 24px;
    background: white;
    border-radius: 20px;
    padding: 24px 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out 1.5s forwards;
}

.timeline-header {
    text-align: center;
    margin-bottom: 20px;
}

.timeline-emoji-img {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
}

.timeline-header h2 {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 4px;
    font-weight: 600;
}

.timeline-subtitle {
    font-size: 0.9rem;
    color: #718096;
}

.timeline-countdown {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #4b5563;
    font-weight: 500;
}

.timeline-scroll-container {
    position: relative;
    padding: 0 40px;
}

.timeline-container {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    position: relative;
    padding: 60px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
}

.timeline-container::-webkit-scrollbar {
    height: 6px;
}

.timeline-container::-webkit-scrollbar-track {
    background: #f7fafc;
    border-radius: 10px;
}

.timeline-container::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 10px;
}

.timeline-container::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.timeline-events {
    display: flex;
    gap: 60px;
    position: relative;
    min-width: max-content;
    padding: 0 20px;
    min-height: 220px;
    align-items: stretch;
}

/* Selve tidslinjen tegnes som en linje under alle events og scroller med indholdet */
.timeline-events::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    height: 4px;
    background: linear-gradient(90deg, #e2e8f0 0%, #cbd5e0 50%, #e2e8f0 100%);
    border-radius: 2px;
    z-index: 0;
}

/* Hvert event er et lille grid: top (over linjen), midte (prik på linjen), bund (under linjen) */
.timeline-event {
    position: relative;
    display: grid;
    grid-template-rows: 1fr auto 1fr;
    align-items: center;
    justify-items: center;
    min-width: 120px;
    min-height: 200px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.timeline-event-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Events over linjen: indhold i øverste række */
.timeline-event.above .timeline-event-content {
    grid-row: 1;
    margin-bottom: 12px;
}

/* Events under linjen: indhold i nederste række */
.timeline-event.below .timeline-event-content {
    grid-row: 3;
    margin-top: 12px;
}

.timeline-event:hover {
    transform: scale(1.05);
}

.timeline-event-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: transparent; /* så linjen kan ses igennem cirklen */
    border: 4px solid #667eea;
    grid-row: 2;
    z-index: 2;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.9), 0 4px 10px rgba(15, 23, 42, 0.18);
}

.timeline-event:hover .timeline-event-dot {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.timeline-event-dot.memory {
    border-color: #f56565;
}

.timeline-event-dot.destination {
    border-color: #48bb78;
}

.timeline-event-image {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: contain;
    object-position: center center;
    background: #f8fafc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 3px solid white;
    margin-bottom: 8px;
}

.timeline-event-icon {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 3px solid white;
    margin-bottom: 8px;
}

.timeline-event-icon svg {
    width: 32px;
    height: 32px;
    color: white;
}

.timeline-event-icon.destination {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.timeline-event-date {
    font-size: 0.75rem;
    color: #718096;
    font-weight: 600;
    margin-bottom: 4px;
}

.timeline-event-title {
    font-size: 0.85rem;
    color: #2d3748;
    font-weight: 600;
    text-align: center;
    max-width: 120px;
    line-height: 1.3;
}

.timeline-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.timeline-nav:hover {
    background: #667eea;
    border-color: #667eea;
    transform: translateY(-50%) scale(1.1);
}

.timeline-nav:hover span {
    color: white;
}

.timeline-nav span {
    font-size: 1.2rem;
    color: #4a5568;
    transition: color 0.3s ease;
}

.timeline-nav-left {
    left: 0;
}

.timeline-nav-right {
    right: 0;
}

.timeline-empty {
    text-align: center;
    padding: 40px 20px;
    color: #a0aec0;
    font-size: 0.95rem;
}

/* Timeline Modal */
.timeline-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.timeline-modal.active {
    display: flex;
}

.timeline-modal-content {
    background: white;
    border-radius: 20px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    position: relative;
    animation: scaleIn 0.3s ease;
}

.timeline-modal-image {
    width: 100%;
    height: 250px;
    object-fit: contain;
    background-color: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 16px;
}

.timeline-modal-icon {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin-bottom: 16px;
}

.timeline-modal-icon svg {
    color: white;
    width: 48px;
    height: 48px;
}

.close-btn svg {
    width: 24px;
    height: 24px;
    color: #4a5568;
    transition: color 0.2s;
}

.close-btn:hover svg {
    color: #2d3748;
}

.btn-icon {
    display: flex;
    align-items: center;
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

.timeline-gallery-btn svg {
    width: 20px;
    height: 20px;
    color: white;
}

.timeline-delete-photo-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.timeline-delete-photo-btn svg {
    width: 16px;
    height: 16px;
}



.timeline-modal-title {
    font-size: 1.3rem;
    color: #2d3748;
    margin-bottom: 8px;
    font-weight: 600;
}

.timeline-modal-actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
}

/* New Timeline Modal Styles */
.timeline-photo-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    margin-bottom: 20px;
    gap: 10px;
}

.timeline-btn-small {
    padding: 6px 12px;
    font-size: 0.75rem;
    height: auto;
    min-height: 32px;
}

.timeline-btn-small .btn-icon svg {
    width: 14px;
    height: 14px;
}

.timeline-editable-field {
    margin-bottom: 16px;
    position: relative;
}

.timeline-display-container {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 8px;
    margin: -6px -8px; /* Negative margin to align text with label */
    border-radius: 6px;
    transition: background 0.2s;
    cursor: pointer;
}

.timeline-display-container:hover {
    background: rgba(0, 0, 0, 0.03);
}

.timeline-display-container:hover .timeline-edit-btn {
    opacity: 1;
}

.timeline-edit-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #a0aec0;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; /* Hidden by default, shown on hover */
    transition: all 0.2s;
    margin-top: 2px; /* Align with text */
}

.timeline-edit-btn:hover {
    background: #edf2f7;
    color: #4a5568;
}

/* Mobile optimization: always show edit button on touch devices */
@media (hover: none) {
    .timeline-edit-btn {
        opacity: 1;
    }
}

.timeline-edit-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    background: white;
    font-family: inherit;
}

.timeline-title-field .timeline-modal-title {
    margin-bottom: 0;
    flex-grow: 1;
}

.timeline-description-field .timeline-modal-description {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.5;
    flex-grow: 1;
    white-space: pre-wrap;
}

.timeline-description-field label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #718096;
    margin-bottom: 8px;
    display: block;
}

.timeline-date-field label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #718096;
    margin-bottom: 4px;
    display: block;
}

.timeline-date-field .timeline-modal-date {
    font-size: 0.95rem;
    color: #4a5568;
    margin-bottom: 0;
    flex-grow: 1;
}

/* Single Image Delete Button */
.timeline-delete-single-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    color: #e53e3e;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.timeline-delete-single-btn:hover {
    background: #fff5f5;
    transform: scale(1.1);
}

/* Add Photo Thumbnail */
.timeline-add-thumb {
    border: 2px dashed #cbd5e0 !important;
    background: #f7fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0aec0;
    width: 56px;
    height: 56px;
    padding: 0;
}

.timeline-add-thumb:hover {
    border-color: #667eea !important;
    color: #667eea;
    background: #ebf4ff;
}

/* Empty State Add Button */
.timeline-modal-icon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.timeline-add-first-photo-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 1px dashed #cbd5e0;
    border-radius: 8px;
    color: #718096;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.timeline-add-first-photo-btn:hover {
    border-color: #667eea;
    color: #667eea;
    background: #ebf4ff;
}

.timeline-delete-btn {
    border: 1px solid #f56565;
    background: #fff5f5;
    color: #c53030;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}

.timeline-delete-btn:hover {
    background: #fc8181;
    color: white;
    transform: translateY(-1px);
}

.timeline-modal-date {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 12px;
}

.timeline-modal-date-edit {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.timeline-modal-date-edit label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #4a5568;
}

.timeline-date-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #2d3748;
    background: white;
}

.timeline-date-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.timeline-modal-description-edit {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.timeline-modal-description-edit label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #4a5568;
}

.timeline-description-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #2d3748;
    background: white;
    font-family: inherit;
    resize: vertical;
}

.timeline-description-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Outlined/Striped buttons */
.timeline-outline-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.timeline-outline-btn .btn-icon {
    font-size: 1.1rem;
}

.timeline-outline-green {
    border-color: #48bb78;
    color: #48bb78;
}

.timeline-outline-green:hover {
    background: #48bb78;
    color: white;
    transform: translateY(-1px);
}

.timeline-outline-red {
    border-color: #f56565;
    color: #f56565;
}

.timeline-outline-red:hover {
    background: #f56565;
    color: white;
    transform: translateY(-1px);
}

.timeline-outline-gray {
    border-color: #a0aec0;
    color: #4a5568;
}

.timeline-outline-gray:hover {
    background: #a0aec0;
    color: white;
    transform: translateY(-1px);
}

.timeline-modal-danger-zone {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.timeline-delete-event-btn {
    padding: 8px 16px;
    background: white;
    color: #e53e3e;
    border: 1px solid #feb2b2;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.timeline-delete-event-btn:hover {
    background: #fff5f5;
    border-color: #fc8181;
    transform: translateY(-1px);
}

/* Delete photos grid */
.timeline-delete-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.timeline-delete-photo-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.timeline-delete-photo-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    background: #f8fafc;
}

.timeline-delete-photo-btn {
    width: 100%;
    padding: 8px;
    background: white;
    color: #e53e3e;
    border: 2px solid #f56565;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.timeline-delete-photo-btn:hover {
    background: #f56565;
    color: white;
    transform: translateY(-1px);
}

.timeline-modal-description {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.6;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Galleri med flere billeder i timeline-modal (for rejser) */
.timeline-gallery {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.timeline-gallery-main {
    width: 100%;
    position: relative;
}

.timeline-gallery-main .timeline-modal-image {
    width: 100%;
    height: 250px;
    object-fit: contain;
    background-color: #f8f9fa;
    border-radius: 12px;
}

.timeline-gallery-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 4px;
    transform: translateY(-50%);
    pointer-events: none;
}

.timeline-gallery-btn {
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.7);
    color: #f9fafb;
    border: none;
    border-radius: 999px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
}

.timeline-gallery-btn:hover {
    background: rgba(79, 70, 229, 0.9);
}

.timeline-gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.timeline-thumb {
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 0;
    background: none;
    cursor: pointer;
    flex: 0 0 auto;
}

.timeline-thumb img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    background: #f8fafc;
    border-radius: 6px;
    display: block;
}

.timeline-thumb.active {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.35);
}

/* Nye timeline-effekter: nye events, år-markører og "Overrask mig" */

/* Puls + lille hjerte-konfetti omkring prikken når der kommer et nyt minde */
.timeline-event-new .timeline-event-dot {
    animation: timelinePulse 1.2s ease-out 0s 2;
}

.timeline-event-new .timeline-event-dot::after {
    content: '';
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f56565' stroke='none'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0;
    animation: heartConfetti 1.2s ease-out forwards;
}

@keyframes timelinePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.9), 0 4px 10px rgba(15, 23, 42, 0.18);
    }
    50% {
        transform: scale(1.3);
        box-shadow: 0 0 0 6px rgba(236, 72, 153, 0.35), 0 8px 18px rgba(102, 126, 234, 0.7);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.9), 0 4px 10px rgba(15, 23, 42, 0.18);
    }
}

@keyframes heartConfetti {
    0% {
        opacity: 0;
        transform: translate(-50%, 0) scale(0.8);
    }
    40% {
        opacity: 1;
        transform: translate(-50%, -6px) scale(1.1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -18px) scale(0.9);
    }
}

/* Års-markører og små stats på linjen */
.timeline-year-marker {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    gap: 6px;
    z-index: 1;
}

.timeline-year-badge {
    padding: 4px 10px;
    border-radius: 999px;
    background: #1f2937;
    color: #f9fafb;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.45);
}

.timeline-year-stats {
    font-size: 0.7rem;
    color: #718096;
    white-space: nowrap;
}
.timeline-add-memory-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
}

.timeline-add-memory-btn {
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    color: #1f2937;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

.timeline-add-memory-btn:hover {
    background: #eef2ff;
    border-color: #a5b4fc;
}

/* Highlight på kortet når "Overrask mig" vælger et event */
.timeline-event-highlight {
    animation: surpriseHighlight 0.8s ease-out;
}

@keyframes surpriseHighlight {
    0% {
        transform: scale(1);
    }
    40% {
        transform: scale(1.12);
    }
    100% {
        transform: scale(1.02);
    }
}

.timeline-surprise-btn {
    margin-top: 10px;
    padding: 8px 16px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: visible;
}

.timeline-surprise-btn::before,
.timeline-surprise-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 24px;
    height: 24px;
    background-image: url('assets/arrow.png');
    background-size: contain;
    background-repeat: no-repeat;
    transform-origin: center;
    opacity: 0.9;
}

.timeline-surprise-btn::before {
    right: 100%;
    margin-right: 8px;
    transform: translateY(-50%) rotate(-25deg);
}

.timeline-surprise-btn::after {
    left: 100%;
    margin-left: 8px;
    transform: translateY(-50%) rotate(25deg) scaleX(-1);
}

.timeline-surprise-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.timeline-surprise-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

