/* ===============================
   WISH PAGE STYLES
   =============================== */

/* 🎆 BACKGROUND ELEMENTS */
.bg-sparkles, .bg-hearts {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.1;
}

.bg-sparkles::before {
    content: '✨✨✨✨';
    position: absolute;
    font-size: 2rem;
    animation: float 20s infinite linear;
}

.bg-hearts::before {
    content: '❤️💖💕💓💗';
    position: absolute;
    font-size: 1.5rem;
    animation: float 25s infinite linear reverse;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(100px, 100px) rotate(360deg); }
}

/* 🎯 CONFETTI CANVAS */
#confettiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/* 🔔 NOTIFICATION TOAST */
.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    transform: translateX(400px);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1001;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 350px;
}

.notification-toast.show {
    transform: translateX(0);
}

.toast-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.3s ease;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 🎨 WISH PAGE LAYOUT */
.wish-page {
    padding: 30px 20px;
    min-height: calc(100vh - 200px);
}

/* 🎭 WISH CARD WRAPPER */
.wish-card-wrapper {
    max-width: 900px;
    margin: 0 auto 60px;
    position: relative;
}

/* 🎇 WISH CARD */
.wish-card {
    background: white;
    border-radius: 24px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    margin-bottom: 30px;
}

#fireworksCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ✨ CARD DECORATIONS */
.card-decoration {
    position: absolute;
    font-size: 1.5rem;
    z-index: 2;
    opacity: 0.3;
    animation: glow 2s infinite alternate;
}

.card-decoration.top-left {
    top: 20px;
    left: 20px;
}

.card-decoration.top-right {
    top: 20px;
    right: 20px;
}

.card-decoration.bottom-left {
    bottom: 20px;
    left: 20px;
}

.card-decoration.bottom-right {
    bottom: 20px;
    right: 20px;
}

@keyframes glow {
    from { opacity: 0.3; transform: scale(1); }
    to { opacity: 0.7; transform: scale(1.1); }
}

/* 🖼️ CARD CONTENT */
.card-content {
    position: relative;
    z-index: 3;
}

/* WISH IMAGE */
.wish-image-container {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.wish-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s ease;
    opacity: 0;
}

.wish-img.loaded {
    opacity: 1;
    animation: fadeIn 1s ease;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.6));
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 🎯 WISH CONTENT */
.wish-content {
    padding: 40px;
    position: relative;
}

.occasion-badge {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(45deg, #ff4d6d, #ff7eb3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 20px rgba(255, 77, 109, 0.3);
    z-index: 4;
}

/* 🎊 WISH TITLE */
.wish-title {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.title-text {
    display: inline-block;
    background: linear-gradient(45deg, #ff4d6d, #ff7eb3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
}

.title-sparkle {
    animation: sparkle 2s infinite;
    display: inline-block;
    margin-left: 10px;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* 💭 MESSAGE CONTAINER */
.message-container {
    margin: 40px 0;
}

.message-scroll {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
}

.message-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 248, 248, 0.9));
    border-radius: 20px;
    padding: 30px;
    border-left: 5px solid #ff4d6d;
    border-right: 5px solid #ff4d6d;
    display: flex;
    align-items: center;
    gap: 20px;
    backdrop-filter: blur(10px);
}

.message-icon {
    font-size: 2rem;
    opacity: 0.5;
    flex-shrink: 0;
}

.wish-message {
    flex: 1;
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    line-height: 1.8;
    color: #333;
    text-align: center;
    font-style: italic;
    margin: 0;
}

/* 👤 SENDER INFO */
.sender-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.sender-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, transparent, #ff4d6d, transparent);
}

.from-text {
    font-size: 1.2rem;
    color: #555;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
}

.from-label {
    font-weight: 600;
    color: #ff4d6d;
}

.from-name {
    font-weight: 700;
    color: #333;
}

/* 📅 WISH DATE */
.wish-date {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    margin-top: 20px;
    font-style: italic;
}

/* 🎭 CARD INTERACTIONS */
.card-interactions {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    border-top: 1px solid #f0f0f0;
    background: rgba(255, 255, 255, 0.5);
}

.interaction-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 50px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

.like-btn {
    background: white;
    border: 2px solid #ff4d6d;
    color: #ff4d6d;
}

.like-btn:hover, .like-btn.liked {
    background: #ff4d6d;
    color: white;
    transform: translateY(-2px);
}

.wish-btn {
    background: linear-gradient(45deg, #ff4d6d, #ff7eb3);
    color: white;
}

.wish-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 77, 109, 0.3);
}

.btn-icon {
    font-size: 1.2rem;
}

.count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-left: 5px;
}

.floating-heart {
    position: absolute;
    font-size: 2rem;
    animation: floatUp 1s ease-out forwards;
    pointer-events: none;
    z-index: 10;
}

@keyframes floatUp {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-100px) scale(0.5); opacity: 0; }
}

/* 📱 SHARE SECTION */
.share-section {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 20px;
    padding: 30px;
    margin-top: 40px;
    display: none;
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-header h3 {
    color: #333;
    margin-bottom: 10px;
}

.section-subtitle {
    color: #666;
    font-size: 0.95rem;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 10px;
    border-radius: 15px;
    border: none;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.share-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.share-option.whatsapp:hover { border-color: #25D366; }
.share-option.facebook:hover { border-color: #1877F2; }
.share-option.instagram:hover { border-color: #E4405F; }
.share-option.copy:hover { border-color: #ff4d6d; }
.share-option.download:hover { border-color: #4CAF50; }

.option-icon {
    font-size: 2rem;
}

.option-text {
    font-weight: 600;
    color: #333;
}

.share-link {
    background: white;
    padding: 20px;
    border-radius: 15px;
}

.link-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.link-container input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    background: #f8fafc;
}

.copy-btn {
    background: linear-gradient(45deg, #ff4d6d, #ff7eb3);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 77, 109, 0.3);
}

.link-note {
    text-align: center;
    color: #666;
    font-size: 0.85rem;
    margin: 0;
}

/* 🚀 CTA SECTION */
.wish-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
    margin: 60px 0;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.cta-content > p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 40px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.cta-btn {
    padding: 18px 35px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.cta-btn.primary {
    background: white;
    color: #764ba2;
}

.cta-btn.primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.cta-btn.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.cta-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-5px);
}

.cta-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

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

.feature-icon {
    font-size: 1.5rem;
}

.feature-text {
    font-weight: 500;
}

/* 💌 RELATED WISHES */
.related-wishes {
    margin-top: 60px;
}

.related-wishes h3 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.wishes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.related-wish-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
    border: 1px solid #f0f0f0;
}

.related-wish-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.related-wish-occasion {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.related-wish-preview {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    font-style: italic;
}

.view-wish-btn {
    display: inline-block;
    background: linear-gradient(45deg, #ff4d6d, #ff7eb3);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-wish-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 77, 109, 0.3);
}

/* 🎭 MODALS */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1002;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 400px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 30px;
    text-align: center;
}

.modal-body p {
    margin-bottom: 25px;
    color: #666;
    line-height: 1.6;
}

.modal-btn {
    width: 100%;
    padding: 15px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    border: none;
}

.modal-btn.primary {
    background: linear-gradient(45deg, #ff4d6d, #ff7eb3);
    color: white;
}

.modal-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 77, 109, 0.3);
}

.modal-btn.secondary {
    background: #f8fafc;
    color: #666;
    border: 2px solid #e2e8f0;
}

.modal-btn.secondary:hover {
    background: #f1f5f9;
    border-color: #ff4d6d;
    color: #ff4d6d;
}

/* 📱 RESPONSIVE */
@media (max-width: 768px) {
    .wish-content {
        padding: 25px;
    }
    
    .message-box {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .message-icon {
        display: none;
    }
    
    .sender-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .sender-line {
        width: 100px;
        height: 1px;
    }
    
    .share-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .cta-features {
        flex-direction: column;
        gap: 20px;
    }
    
    .card-interactions {
        flex-direction: column;
        align-items: center;
    }
    
    .interaction-btn {
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .wish-image-container {
        height: 200px;
    }
    
    .title-text {
        font-size: 1.8rem;
    }
    
    .wish-message {
        font-size: 1rem;
    }
    
    .share-options {
        grid-template-columns: 1fr;
    }
    
    .link-container {
        flex-direction: column;
    }
}

/* 🌙 DARK MODE */
@media (prefers-color-scheme: dark) {
    .wish-card, .share-section, .related-wish-card {
        background: #1e293b;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .message-box {
        background: rgba(30, 41, 59, 0.8);
    }
    
    .wish-message, .from-name {
        color: #f1f5f9;
    }
    
    .from-label {
        color: #ff7eb3;
    }
    
    .wish-date {
        color: #94a3b8;
    }
    
    .share-link, .link-container input {
        background: #0f172a;
        border-color: #334155;
        color: #f1f5f9;
    }
    
    .share-option {
        background: #1e293b;
        color: #f1f5f9;
    }
    
    .option-text {
        color: #f1f5f9;
    }
}
/* ===============================
   OWNER-SPECIFIC STYLES
   =============================== */

/* Hide share section by default */
.share-section {
    display: none;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 20px;
    padding: 30px;
    margin-top: 40px;
}

/* Hide card interactions by default */
.card-interactions {
    display: none;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    border-top: 1px solid #f0f0f0;
    background: rgba(255, 255, 255, 0.5);
}

/* CTA section for everyone */
.wish-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
    margin: 60px 0;
}

/* Floating heart animation */
.floating-heart {
    position: absolute;
    font-size: 2rem;
    animation: floatUp 1s ease-out forwards;
    pointer-events: none;
    z-index: 10;
}

@keyframes floatUp {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-100px) scale(0.5); opacity: 0; }
}

/* ===============================
   SHARE MESSAGE SELECTOR (IMPROVED)
================================ */

.share-message-selector {
    background: #ffffff;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 18px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    border: 1px solid #eee;
}

.selector-title {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

/* Dropdown */
#shareMessageDropdown {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 10px;
    border: 1.5px solid #ddd;
    background: #f9f9fb;
    cursor: pointer;
    transition: all 0.25s ease;
}

#shareMessageDropdown:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
}

/* Custom message box */
.custom-message-container {
    margin-top: 10px;
}

.custom-message-label {
    font-size: 12px;
    font-weight: 500;
    color: #777;
    margin-bottom: 6px;
    display: block;
}

/* Textarea */
.custom-message-textarea {
    width: 100%;
    min-height: 60px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.5;
    border-radius: 10px;
    border: 1.5px solid #e0e0e0;
    resize: none;
    background: #fafafa;
    transition: all 0.25s ease;
}

.custom-message-textarea::placeholder {
    color: #aaa;
    font-style: italic;
}

.custom-message-textarea:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
}

/* ===============================
   MOBILE OPTIMIZATION
================================ */
@media (max-width: 768px) {
    .share-message-selector {
        padding: 12px;
    }

    .selector-title {
        font-size: 12px;
    }

    #shareMessageDropdown {
        font-size: 13px;
        padding: 9px 12px;
    }

    .custom-message-textarea {
        font-size: 12.5px;
        min-height: 54px;
        padding: 9px 12px;
    }
}

@media (max-width: 480px) {
    .share-message-selector {
        padding: 10px;
        border-radius: 12px;
    }

    #shareMessageDropdown {
        font-size: 12.5px;
    }

    .custom-message-textarea {
        font-size: 12px;
        min-height: 50px;
    }
}

/* ===============================
   MICRO ANIMATIONS ✨
================================ */

/* Shared animation base */
#shareMessageDropdown,
.custom-message-textarea {
    transition: 
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.2s ease,
        background-color 0.25s ease;
}

/* Focus glow */
#shareMessageDropdown:focus,
.custom-message-textarea:focus {
    border-color: #667eea;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.18);
    transform: scale(1.01);
}

/* Hover feedback (desktop only) */
@media (hover: hover) {
    #shareMessageDropdown:hover,
    .custom-message-textarea:hover {
        border-color: #c7cffc;
    }
}

/* Subtle pulse when user types */
.custom-message-textarea.typing {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

/* Reduced motion support (accessibility) */
@media (prefers-reduced-motion: reduce) {
    #shareMessageDropdown,
    .custom-message-textarea {
        transition: none;
        transform: none;
        box-shadow: none;
    }
}
/* ===============================
   Share Message Note – Highlight
   Light + Dark Mode Support
================================ */

.share-message-note {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;

    /* Light mode */
    background: linear-gradient(135deg, #f5f8ff, #ffffff);
    border-left: 4px solid #667eea;
    color: #2c2c2c;

    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.18);
}

.share-message-note strong {
    color: #4a5fd6;
    font-weight: 600;
}

/* 🌙 Dark Mode */
@media (prefers-color-scheme: dark) {
    .share-message-note {
        background: linear-gradient(135deg, #1e2340, #12152a);
        border-left-color: #8fa2ff;
        color: #e6e8ff;

        box-shadow: 0 4px 18px rgba(143, 162, 255, 0.25);
    }

    .share-message-note strong {
        color: #aab6ff;
    }
}
