/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    --bg-dark: #07040a;
    --chat-bg: rgba(18, 10, 26, 0.65);
    --bubble-left: rgba(255, 255, 255, 0.05);
    --bubble-left-border: rgba(255, 255, 255, 0.08);
    --bubble-right: linear-gradient(135deg, #ff6b8b 0%, #e04d70 100%);
    --bubble-right-glow: rgba(255, 107, 139, 0.3);
    --primary: #ff6b8b;
    --primary-glow: rgba(255, 107, 139, 0.35);
    --accent: #ffd700;
    --accent-glow: rgba(255, 215, 0, 0.3);
    --text-main: #f8f9fa;
    --text-muted: #9e8fa8;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --font-sans: 'Outfit', sans-serif;
    --font-serif: 'Playfair Display', serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Background Gradients & Stars */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: radial-gradient(circle at 10% 20%, #150924 0%, #07040a 80%),
                radial-gradient(circle at 90% 80%, #20061e 0%, #07040a 80%);
}

.bg-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background-image: 
        radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 40px),
        radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 30px);
    background-size: 450px 450px, 250px 250px;
    opacity: 0.12;
    animation: backgroundMove 180s linear infinite;
}

@keyframes backgroundMove {
    0% { background-position: 0 0, 40px 60px; }
    100% { background-position: 450px 450px, 290px 310px; }
}

/* Falling Rose Petals */
.falling-petals-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.petal {
    position: absolute;
    background: linear-gradient(135deg, #ff4d6d 0%, #ff758f 100%);
    border-radius: 150px 0 150px 150px;
    opacity: 0.6;
    animation: petalFall linear forwards;
}

@keyframes petalFall {
    0% {
        transform: translate3d(0, -20px, 0) rotate(0deg) rotateY(0deg) scale(0.6);
        opacity: 0;
    }
    15% { opacity: 0.75; }
    100% {
        transform: translate3d(var(--sway-width), 105vh, 0) rotate(360deg) rotateY(360deg) scale(1);
        opacity: 0;
    }
}

/* Custom Cursor */
.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: screen;
    transition: width 0.2s, height 0.2s, background-color 0.2s;
    display: none;
}

.custom-cursor-dot {
    width: 4px;
    height: 4px;
    background-color: var(--accent);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10000;
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    .custom-cursor, .custom-cursor-dot {
        display: block;
    }
}

/* PHONE SHELL MOCKUP (CONCEPT 2) */
.phone-mockup {
    width: 100%;
    max-width: 410px;
    height: 90vh;
    max-height: 820px;
    background: #000;
    border: 10px solid rgba(255, 255, 255, 0.08);
    border-radius: 40px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6),
                0 0 100px rgba(255, 107, 139, 0.05);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

@media (max-width: 550px) {
    .phone-mockup {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border: none;
        border-radius: 0;
    }
}

/* Phone Screen Base */
.phone-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.76, 0, 0.24, 1),
                opacity 0.8s cubic-bezier(0.76, 0, 0.24, 1);
}

/* LOCK SCREEN */
.lock-screen {
    background-image: linear-gradient(rgba(7, 4, 13, 0.35), rgba(7, 4, 13, 0.6)), url('../images/lockscreen_wallpaper.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 30px 40px 30px;
    justify-content: space-between;
    text-align: center;
}

.lock-screen.unlocked {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.lock-screen-header {
    margin-top: 20px;
}

.lock-time {
    font-size: 4.2rem;
    font-weight: 300;
    color: var(--text-main);
    letter-spacing: -1px;
    line-height: 1;
}

.lock-date {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.lock-bday-tag {
    font-size: 0.85rem;
    color: var(--accent);
    margin-top: 10px;
    font-weight: 500;
    background: rgba(255, 215, 0, 0.1);
    padding: 4px 14px;
    border-radius: 20px;
    border: 1px dashed rgba(255, 215, 0, 0.25);
    display: inline-block;
}

.lock-icon-container {
    font-size: 2rem;
    color: var(--text-muted);
    animation: pulseLock 2s infinite;
}

@keyframes pulseLock {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); color: var(--primary); }
}

/* iOS notification style card */
.ios-notification {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 22px;
    padding: 18px;
    width: 100%;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: left;
}

.ios-notification:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),
                0 0 15px rgba(255, 107, 139, 0.15);
}

.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.notif-app-name {
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.notif-body {
    color: var(--text-main);
}

.notif-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.notif-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.swipe-to-unlock {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    animation: bounceSwipe 1.5s infinite;
}

@keyframes bounceSwipe {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(-5px); opacity: 1; }
}


/* CHAT SCREEN */
.app-screen {
    background: var(--bg-dark);
    z-index: 5;
}

.app-screen .chat-window {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
    backdrop-filter: none;
    background: transparent;
    max-height: 100%;
    max-width: 100%;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Chat Header */
.chat-header {
    padding: 18px 20px;
    background: rgba(14, 7, 21, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2;
}

.chat-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #2b1747 0%, #1a0f2e 100%);
    border: 1px solid rgba(255, 107, 139, 0.25);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
    box-shadow: 0 0 10px rgba(255, 107, 139, 0.1);
}

.chat-partner-info {
    flex-grow: 1;
}

.chat-partner-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
}

.chat-partner-status {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-partner-status::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #2ec4b6;
    border-radius: 50%;
    box-shadow: 0 0 8px #2ec4b6;
}

.chat-partner-status.typing {
    color: var(--primary);
}

.chat-partner-status.typing::before {
    background-color: var(--primary);
    box-shadow: 0 0 8px var(--primary);
    animation: flash 1.5s infinite;
}

@keyframes flash {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Chat Feed */
.chat-feed {
    flex: 1 1 0%;
    min-height: 0;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}


.chat-feed::-webkit-scrollbar {
    width: 4px;
}
.chat-feed::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

/* Chat Bubbles */
.message-row {
    display: flex;
    width: 100%;
}

.message-row.left {
    justify-content: flex-start;
}

.message-row.right {
    justify-content: flex-end;
}

.message-bubble {
    max-width: 82%;
    padding: 14px 18px;
    border-radius: 18px;
    line-height: 1.55;
    font-size: 0.95rem;
    position: relative;
    animation: bubbleEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.message-row.left .message-bubble {
    background: var(--bubble-left);
    border: 1px solid var(--bubble-left-border);
    color: var(--text-main);
    border-bottom-left-radius: 4px;
}

.message-row.right .message-bubble {
    background: var(--bubble-right);
    box-shadow: 0 4px 15px var(--bubble-right-glow);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 5px;
    display: block;
    text-align: right;
}

.message-row.right .message-time {
    color: rgba(255, 255, 255, 0.7);
}

/* Typing Indicator Bubble */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 0;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: var(--text-muted);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Special Chat Blocks: Calendar Card */
.calendar-card-bubble {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 16px;
    width: 100%;
    max-width: 360px;
    margin: 8px 0;
}

/* Calendar grid items in chat */
.calendar-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-smooth);
}

.calendar-btn:hover:not(:disabled) {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
}

.calendar-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.calendar-weekdays div {
    padding: 4px 0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.85rem;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
}

.calendar-day.empty {
    cursor: default;
}

.calendar-day.disabled {
    color: rgba(255, 255, 255, 0.12);
    cursor: not-allowed;
    background: transparent !important;
}

.calendar-day.weekend {
    color: var(--primary);
    font-weight: 600;
}

.calendar-day.weekend:hover:not(.disabled):not(.selected) {
    background: rgba(255, 107, 139, 0.15);
}

.calendar-day.selected {
    background: var(--primary) !important;
    color: white !important;
    font-weight: 700;
    box-shadow: 0 0 10px var(--primary-glow);
}

.calendar-day.selected::after {
    content: "❤️";
    position: absolute;
    font-size: 0.55rem;
    bottom: 1px;
}

.calendar-day.birthday {
    background: rgba(255, 215, 0, 0.12) !important;
    border: 1px dashed var(--accent) !important;
    color: var(--accent) !important;
    font-weight: 700 !important;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.15);
}

.calendar-day.birthday:hover:not(.selected) {
    background: rgba(255, 215, 0, 0.25) !important;
}

.calendar-day.birthday.selected {
    background: linear-gradient(135deg, var(--accent) 0%, #cc9900 100%) !important;
    color: var(--bg-dark) !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 12px var(--accent-glow) !important;
}

.calendar-day.birthday.selected::after {
    content: "🎂" !important;
    position: absolute;
    font-size: 0.55rem;
    bottom: 1px;
}

/* Special Chat Blocks: Locations Carousel */
.carousel-bubble {
    width: 100%;
    overflow-x: auto;
    padding: 10px 0;
    margin: 8px 0;
    scroll-snap-type: x mandatory;
    display: flex;
    gap: 15px;
    scrollbar-width: none;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.carousel-bubble::-webkit-scrollbar {
    display: none;
}

.carousel-item {
    min-width: 250px;
    width: 250px;
    scroll-snap-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.carousel-item:hover {
    border-color: rgba(255, 107, 139, 0.25);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.carousel-img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
    pointer-events: none;
}

.carousel-info {
    padding: 14px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.carousel-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.carousel-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 12px;
}

.carousel-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Special Chat Blocks: Summary Recap */
.recap-bubble-card {
    background: rgba(255, 107, 139, 0.04);
    border: 1px solid rgba(255, 107, 139, 0.15);
    border-radius: 20px;
    padding: 20px;
    width: 100%;
    max-width: 360px;
    margin: 8px 0;
    text-align: left;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Chat Input Bar & Quick Replies */
.chat-bottom-section {
    padding: 16px 20px;
    background: rgba(14, 7, 21, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 2;
    flex-shrink: 0;
}


.quick-replies {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    position: relative;
    min-height: 48px;
    align-items: center;
}

.quick-reply-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-main);
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition-smooth);
    outline: none;
    white-space: nowrap;
}

.quick-reply-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.quick-reply-btn.primary {
    background: var(--bubble-right);
    border: none;
    box-shadow: 0 4px 10px rgba(255, 107, 139, 0.2);
}

.quick-reply-btn.primary:hover {
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* Text Input Bar */
.chat-input-bar {
    display: none;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    padding: 6px 6px 6px 18px;
    width: 100%;
}

.chat-input-field {
    flex-grow: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.95rem;
}

.chat-input-field::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.chat-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 8px var(--primary-glow);
}

/* Heart explosion success */
.success-full-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 4, 10, 0.94);
    z-index: 20;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px;
    animation: fadeInScale 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.success-full-screen.active {
    display: flex;
}

.success-heart {
    font-size: 5.5rem;
    color: var(--primary);
    animation: heartbeat 1.5s infinite;
    text-shadow: 0 0 35px var(--bubble-right-glow);
    margin-bottom: 20px;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    15% { transform: scale(1.2); }
    30% { transform: scale(1); }
    45% { transform: scale(1.15); }
    60% { transform: scale(1); }
    100% { transform: scale(1); }
}

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

/* Confetti styling */
.confetti {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    opacity: 0.8;
    border-radius: 50%;
    animation: confetti-fall 4s linear infinite;
    pointer-events: none;
    z-index: 50;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-20px) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    100% {
        transform: translateY(90vh) rotate(360deg);
        opacity: 0;
    }
}

/* Common Modal styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 4, 10, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: var(--transition-smooth);
}

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

.modal-content {
    background: #100817;
    border: 1px solid rgba(255, 107, 139, 0.15);
    border-radius: 24px;
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    transform: scale(0.9);
    transition: var(--transition-smooth);
}

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

.modal-img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}

.modal-body {
    padding: 25px;
    text-align: left;
}

.modal-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.modal-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}
