@import url('https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@400;500;700;900&display=swap');

body {
    font-family: 'Zen Maru Gothic', sans-serif;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Safe Area for PWA */
.pb-safe {
    padding-bottom: env(safe-area-inset-bottom);
}

.pt-safe {
    padding-top: env(safe-area-inset-top);
}

/* View Switching Logic */
.view-section {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.view-section.active {
    display: block;
    opacity: 1;
}

/* Tab Content */
.tab-content {
    display: none;
    width: 100%;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Modals */
.modal-overlay {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
}

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

/* Chat */
.chat-room {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f9fafb;
    z-index: 60;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.chat-room.active {
    transform: translateX(0);
}

.message-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
}

.message-mine {
    background-color: #ec4899;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.message-theirs {
    background-color: white;
    color: #374151;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.message-system {
    align-self: center;
    background-color: #f3f4f6;
    color: #6b7280;
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 12px;
    margin: 8px 0;
    text-align: center;
    max-width: 90%;
    border: 1px solid #e5e7eb;
}

.chat-input-area {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 12px;
    /* Ensure padding is consistent */
}

.btn-date-confirm {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ec4899;
    /* Pink-500 */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(236, 72, 153, 0.3);
    transition: transform 0.1s;
}

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

/* FAQ Accordion */
.faq-content {
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out, padding 0.3s ease;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.faq-content.open {
    max-height: 500px;
    opacity: 1;
    padding-bottom: 2rem;
}

.chevron {
    transition: transform 0.3s ease;
}

.chevron.rotate {
    transform: rotate(180deg);
}

/* Toast */
.toast-notification {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: bold;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 200;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Visuals */
.secret-blur {
    filter: blur(8px);
    transition: filter 0.5s ease;
}

.secret-overlay {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
}

/* Animations */
@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-blob {
    animation: blob 10s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Rank Badges */
.rank-badge-platinum {
    background: linear-gradient(135deg, #e0eafc, #cfdef3);
    color: #5a6e8c;
    border: 1px solid #b0c4de;
}

.rank-badge-gold {
    background: linear-gradient(135deg, #fceabb, #f8b500);
    color: #8a6e00;
    border: 1px solid #e6c65e;
}

.rank-badge-silver {
    background: linear-gradient(135deg, #eef2f3, #8e9eab);
    color: #555;
    border: 1px solid #bdc3c7;
}

.rank-badge-bronze {
    background: linear-gradient(135deg, #E6DADA, #274046);
    color: #fff;
    border: 1px solid #999;
}

/* Additional Animations for New LP */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes shine {
    100% {
        transform: translateX(100%) skewX(-12deg);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-shine {
    animation: shine 1.5s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

.animate-pulse-slow {
    animation: pulse 3s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

.shadow-glow {
    box-shadow: 0 0 30px rgba(236, 72, 153, 0.6);
}

.perspective-1000 {
    perspective: 1000px;
}

/* Ensure standard pulse is defined if not already */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

/* =========================================
   My Page Styles
   ========================================= */
.profile-header {
    background: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
    color: white;
    padding-bottom: 3rem;
    border-radius: 0 0 1.5rem 1.5rem;
    margin: -1rem -1rem 1rem -1rem;
    /* Negative margin to stretch */
    position: relative;
    overflow: hidden;
}

.profile-avatar-container {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto;
}

.profile-avatar-edit {
    position: absolute;
    bottom: 0;
    right: 0;
    background: white;
    color: #333;
    border-radius: 50%;
    padding: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s;
}

.profile-avatar-edit:active {
    transform: scale(0.9);
}

.dashboard-card {
    background: white;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.income-display {
    font-family: 'Zen Maru Gothic', sans-serif;
    color: #be185d;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

.rank-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.rank-item:last-child {
    border-bottom: none;
}

.rank-crown {
    font-size: 1.25rem;
    margin-right: 0.75rem;
    width: 24px;
    text-align: center;
}

.event-banner {
    background: linear-gradient(90deg, #4f46e5, #ec4899);
    color: white;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s;
}

.event-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
}

.rank-badge-small {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: bold;
    margin-left: auto;
}

/* Heart Popup */
.heart-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 8rem;
    color: #ec4899;
    z-index: 200;
    pointer-events: none;
    opacity: 0;
}

.heart-popup.animate {
    animation: popHeart 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popHeart {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Match Modal */
.match-modal-overlay {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.match-shine {
    background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.8) 50%, transparent 100%);
    width: 50%;
    height: 100%;
    position: absolute;
    top: 0;
    left: -100%;
    transform: skewX(-20deg);
    animation: shine-swipe 1s infinite;
}

@keyframes shine-swipe {
    0% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

/* Confetti (Simple CSS implementation) */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: #f00;
    animation: fall linear forwards;
    z-index: 250;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(720deg);
    }
}

/* =========================================
   Hide Gamification Sections from My Page
   ========================================= */
#integrated-gamification-vip-card,
#daily-missions-card,
#goal-management-card {
    display: none !important;
}