/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&family=Pacifico&display=swap');

/* CSS Variables */
:root {
    --night-blue: #1a1f3a;
    --dark-purple: #2d2b4a;
    --rose-pink: #ffb7c5;
    --warm-gold: #ffd700;
    --soft-lavender: #e8d4f0;
    --soft-cream: #fff8f0;
    --glass-white: rgba(255, 255, 255, 0.25);
    --glass-white-strong: rgba(255, 255, 255, 0.35);
    --text-white: #ffffff;
    --text-soft: #f8f0ff;
    --glow-gold: rgba(255, 215, 0, 0.5);
    --glow-pink: rgba(255, 183, 197, 0.6);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Quicksand', sans-serif;
    background: linear-gradient(180deg, var(--night-blue) 0%, var(--dark-purple) 100%);
    color: var(--text-white);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    touch-action: pan-x pan-y;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--night-blue) 0%, var(--dark-purple) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

#loading-screen.fade-out {
    opacity: 0;
    transform: scale(1.1);
    pointer-events: none;
}

.loading-content {
    text-align: center;
    max-width: 90%;
    padding: 2rem;
}

.loading-content h1 {
    font-size: clamp(1.2rem, 5vw, 2rem);
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--rose-pink), var(--warm-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.loading-subtitle {
    font-size: clamp(0.8rem, 3vw, 1rem);
    color: var(--rose-pink);
    margin-bottom: 2rem;
}

/* Floating Hearts */
.heart-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.heart {
    width: 40px;
    height: 40px;
    background: var(--rose-pink);
    position: relative;
    transform: rotate(-45deg);
    animation: heartBeat 1.2s ease-in-out infinite;
}

.heart::before,
.heart::after {
    content: '';
    width: 40px;
    height: 40px;
    background: var(--rose-pink);
    border-radius: 50%;
    position: absolute;
}

.heart::before {
    top: -20px;
    left: 0;
}

.heart::after {
    left: 20px;
    top: 0;
}

.heart:nth-child(2) {
    animation-delay: 0.4s;
}

.heart:nth-child(3) {
    animation-delay: 0.8s;
}

@keyframes heartBeat {

    0%,
    100% {
        transform: rotate(-45deg) scale(1);
    }

    50% {
        transform: rotate(-45deg) scale(1.2);
    }
}

/* Loading Bar */
.loading-bar {
    width: 100%;
    max-width: 300px;
    height: 8px;
    background: var(--glass-white);
    border-radius: 10px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    margin: 0 auto;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--rose-pink), var(--warm-gold), var(--rose-pink));
    background-size: 200% 100%;
    width: 0%;
    animation: loadProgress 2.5s ease-out forwards, gradientMove 2s linear infinite;
    box-shadow: 0 0 20px var(--glow-gold);
}

@keyframes loadProgress {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

/* Start Button */
.start-btn {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.8rem 2.5rem;
    font-size: 1.2rem;
    font-family: 'Pacifico', cursive;
    color: var(--night-blue);
    background: linear-gradient(135deg, var(--rose-pink), var(--warm-gold));
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 0 20px var(--glow-gold);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.start-btn.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.start-btn:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 0 30px var(--glow-pink);
    background: linear-gradient(135deg, var(--warm-gold), var(--rose-pink));
}

.start-btn.hidden {
    display: none;
}

/* Main App */
#app {
    width: 100%;
    height: 100%;
    position: relative;
}

#canvas {
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
}

/* Top Message */
.top-message {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 100;
    padding: 1rem 1.5rem;
    background: var(--glass-white-strong);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 95%;
    width: auto;
}

.top-message h2 {
    font-family: 'Pacifico', cursive;
    font-size: clamp(0.9rem, 4vw, 1.5rem);
    background: linear-gradient(45deg, var(--rose-pink), var(--warm-gold), var(--rose-pink));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
    margin-bottom: 0.3rem;
    white-space: nowrap;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.subtitle {
    font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
}

/* ====== PREMIUM MUSIC PLAYER ====== */
.music-player {
    position: fixed;
    bottom: 1.5rem;
    right: 1rem;
    background: var(--glass-white-strong);
    backdrop-filter: blur(25px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.8rem;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
    max-width: 280px;
    overflow: hidden;
}

.music-player::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--glow-pink) 0%, transparent 50%, var(--glow-gold) 100%);
    opacity: 0.1;
    border-radius: 24px;
    pointer-events: none;
}

.music-player:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(244, 165, 174, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.player-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150%;
    height: 150%;
    background: radial-gradient(circle, var(--glow-pink) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.music-player.playing .player-glow {
    opacity: 0.15;
    animation: playerPulse 2s ease-in-out infinite;
}

@keyframes playerPulse {

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

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.2;
    }
}

/* Vinyl Disc Album Art */
.album-art {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.vinyl-disc {
    width: 100%;
    height: 100%;
    background: conic-gradient(from 0deg, #1a1a1a, #333, #1a1a1a, #333, #1a1a1a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
    position: relative;
    transition: transform 0.3s ease;
}

.music-player.playing .vinyl-disc {
    animation: vinylSpin 3s linear infinite;
}

@keyframes vinylSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.vinyl-disc::before {
    content: '';
    position: absolute;
    width: 90%;
    height: 90%;
    border-radius: 50%;
    background: repeating-radial-gradient(circle at center,
            #222 0px,
            #222 2px,
            #333 3px,
            #333 4px);
}

.vinyl-center {
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, var(--rose-pink), var(--warm-gold));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Player Info */
.player-info {
    flex: 1;
    min-width: 0;
    display: none;
}

.song-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-artist {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Player Controls */
.player-controls {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.control-btn {
    background: transparent;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

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

.play-btn {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--rose-pink), var(--warm-gold));
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(244, 165, 174, 0.4);
}

.play-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(244, 165, 174, 0.5);
}

.prev-btn,
.next-btn {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Sound Waves Animation */
.sound-waves {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 20px;
    padding: 0 0.3rem;
}

.wave {
    width: 3px;
    background: linear-gradient(to top, var(--rose-pink), var(--warm-gold));
    border-radius: 2px;
    height: 5px;
    transition: height 0.1s ease;
}

.music-player.playing .wave {
    animation: waveMove 0.5s ease-in-out infinite;
}

.wave:nth-child(1) {
    animation-delay: 0s;
}

.wave:nth-child(2) {
    animation-delay: 0.1s;
}

.wave:nth-child(3) {
    animation-delay: 0.2s;
}

.wave:nth-child(4) {
    animation-delay: 0.1s;
}

.wave:nth-child(5) {
    animation-delay: 0s;
}

@keyframes waveMove {

    0%,
    100% {
        height: 5px;
    }

    50% {
        height: 18px;
    }
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

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

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.92);
    backdrop-filter: blur(15px);
}

.modal-content {
    position: relative;
    max-width: 500px;
    width: 92%;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.85) translateY(30px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* Message Card */
.message-card {
    background: linear-gradient(135deg, rgba(244, 165, 174, 0.12), rgba(255, 215, 0, 0.12));
    backdrop-filter: blur(30px);
    border-radius: 28px;
    border: 2px solid rgba(255, 255, 255, 0.18);
    padding: 2rem 1.5rem;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.08) 0%, transparent 60%);
    animation: rotateGlow 15s linear infinite;
    pointer-events: none;
}

@keyframes rotateGlow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.close-btn {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg) scale(1.1);
}

.day-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--rose-pink), var(--warm-gold));
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(244, 165, 174, 0.4);
}

.message-card h3 {
    font-family: 'Pacifico', cursive;
    font-size: clamp(1.3rem, 5vw, 1.8rem);
    margin-bottom: 1.2rem;
    color: var(--warm-gold);
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.message-body {
    font-size: clamp(0.9rem, 3.5vw, 1.05rem);
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 1.2rem;
    position: relative;
    z-index: 1;
}

.message-body p {
    margin-bottom: 0.8rem;
}

.message-emoji {
    font-size: 2.5rem;
    text-align: center;
    animation: floatEmoji 3s ease-in-out infinite;
}

@keyframes floatEmoji {

    0%,
    100% {
        transform: translateY(0) rotate(-5deg);
    }

    50% {
        transform: translateY(-12px) rotate(5deg);
    }
}

/* Sky Message Modal */
.sky-message .modal-content {
    max-width: 420px;
}

.sky-card {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(10, 14, 39, 0.95));
    backdrop-filter: blur(30px);
    border-radius: 25px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    padding: 2rem 1.5rem;
    box-shadow: 0 0 60px rgba(255, 215, 0, 0.2),
        0 25px 80px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.stars-decoration {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.stars-decoration span {
    animation: twinkleStar 1.5s ease-in-out infinite;
}

.stars-decoration span:nth-child(2) {
    animation-delay: 0.5s;
}

.stars-decoration span:nth-child(3) {
    animation-delay: 1s;
}

@keyframes twinkleStar {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

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

.sky-card h3 {
    font-family: 'Pacifico', cursive;
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    color: var(--warm-gold);
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.sky-body {
    font-size: clamp(0.9rem, 3vw, 1rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
}

.sky-emoji {
    font-size: 3rem;
    animation: floatEmoji 3s ease-in-out infinite;
}

/* Floating Hint */
.floating-hint {
    position: fixed;
    bottom: 6rem;
    right: 1rem;
    background: var(--glass-white);
    backdrop-filter: blur(15px);
    padding: 0.5rem 1rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 100;
    animation: hintBounce 2s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.floating-hint.show {
    opacity: 1;
}

.hint-icon {
    font-size: 1.2rem;
    animation: sparkleRotate 2s linear infinite;
}

@keyframes sparkleRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.hint-text {
    font-size: 0.75rem;
    color: var(--text-white);
    font-weight: 500;
}

@keyframes hintBounce {

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

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

/* Instructions */
.instructions {
    position: absolute;
    bottom: 0.8rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-white);
    backdrop-filter: blur(20px);
    padding: 0.6rem 1.2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 100;
    max-width: 95%;
}

.instructions p {
    font-size: clamp(0.65rem, 2.5vw, 0.8rem);
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    white-space: nowrap;
}

/* Floating Hearts Effect */
#floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
    overflow: hidden;
}

.floating-heart {
    position: absolute;
    bottom: -50px;
    animation: floatUp 6s ease-out forwards;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* ====== MOBILE RESPONSIVE ====== */
@media (max-width: 768px) {
    .top-message {
        top: 0.5rem;
        padding: 0.7rem 1rem;
    }

    .top-message h2 {
        white-space: normal;
    }

    .music-player {
        bottom: 4.5rem;
        right: 0.8rem;
        padding: 0.6rem;
        gap: 0.5rem;
    }

    .album-art {
        width: 40px;
        height: 40px;
    }

    .vinyl-center {
        width: 18px;
        height: 18px;
        font-size: 0.5rem;
    }

    .play-btn {
        width: 32px;
        height: 32px;
    }

    .control-btn {
        font-size: 0.9rem;
        padding: 0.3rem;
    }

    /* Unhide controls for mobile */
    .prev-btn,
    .next-btn {
        display: flex;
    }

    .sound-waves {
        display: flex;
        height: 15px;
        /* Slightly smaller on mobile */
    }

    .instructions {
        bottom: 0.5rem;
        border-radius: 22px;
    }

    .day-badge {
        padding: 0.3rem 1rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 400px) {
    html {
        font-size: 14px;
    }

    .top-message {
        padding: 0.5rem 0.8rem;
    }

    .music-player {
        bottom: 4rem;
        max-width: 280px;
        /* Allow full width for controls */
    }

    .modal-content {
        width: 95%;
    }
}

/* Large screens */
@media (min-width: 1024px) {
    .music-player {
        max-width: 320px;
        padding: 1rem;
    }

    .player-info {
        display: block;
    }

    .album-art {
        width: 55px;
        height: 55px;
    }

    .sound-waves {
        height: 25px;
    }

    .wave {
        width: 4px;
    }
}

/* Special Effects */
.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    animation: sparkleAnim 1s ease-out forwards;
    pointer-events: none;
}

@keyframes sparkleAnim {
    0% {
        opacity: 1;
        transform: scale(0);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0);
    }
}

/* Cursor effects for interactivity */
#canvas {
    cursor: grab;
}

#canvas:active {
    cursor: grabbing;
}

/* Memory Counter - Minimal Side Design */
.memory-counter {
    position: fixed;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    background: linear-gradient(135deg, rgba(255, 183, 197, 0.25), rgba(232, 212, 240, 0.25));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    z-index: 100;
    text-align: center;
    box-shadow: 0 8px 32px rgba(255, 183, 197, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.counter-text {
    font-size: 0.7rem;
    color: var(--text-white);
    font-weight: 500;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.counter-text span {
    color: var(--warm-gold);
    font-weight: 700;
    font-size: 0.85rem;
}

.counter-bar {
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    overflow: hidden;
}

.counter-progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--rose-pink), var(--soft-lavender), var(--warm-gold));
    border-radius: 2px;
    transition: width 0.5s ease-out;
    box-shadow: 0 0 8px var(--glow-pink);
}

/* Mobile adjustments for counter */
@media (max-width: 768px) {
    .memory-counter {
        top: auto;
        bottom: 5rem;
        left: 0.5rem;
        padding: 8px 12px;
        border-radius: 15px;
    }

    .counter-text {
        font-size: 0.65rem;
    }

    .counter-bar {
        width: 50px;
        height: 3px;
    }
}

@media (max-width: 400px) {
    .memory-counter {
        bottom: 4.5rem;
        left: 0.3rem;
        padding: 6px 10px;
    }
}

/* ====== MEMORY JOURNAL ====== */

/* Journal Button */
.journal-btn {
    position: fixed;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 183, 197, 0.35), rgba(232, 212, 240, 0.35));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(255, 183, 197, 0.2);
    transition: all 0.3s ease;
}

.journal-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 12px 40px rgba(255, 183, 197, 0.35);
}

.journal-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.journal-icon {
    font-size: 1.4rem;
}

.journal-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--rose-pink), var(--warm-gold));
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 8px rgba(255, 183, 197, 0.4);
}

/* Journal Modal Content */
.journal-content {
    max-width: 550px;
    width: 95%;
    max-height: 80vh;
}

.journal-card {
    background: linear-gradient(135deg, rgba(255, 248, 240, 0.12), rgba(232, 212, 240, 0.15));
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 28px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 1.5rem;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.journal-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.journal-header h2 {
    font-family: 'Pacifico', cursive;
    font-size: clamp(1.2rem, 4vw, 1.6rem);
    background: linear-gradient(45deg, var(--rose-pink), var(--warm-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.journal-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Journal Entries Container */
.journal-entries {
    max-height: 55vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.journal-entries::-webkit-scrollbar {
    width: 6px;
}

.journal-entries::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.journal-entries::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--rose-pink), var(--soft-lavender));
    border-radius: 3px;
}

/* Empty State */
.empty-journal {
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(255, 255, 255, 0.6);
}

.empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
    animation: floatEmoji 3s ease-in-out infinite;
}

.empty-journal p {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.empty-hint {
    font-size: 0.8rem !important;
    opacity: 0.7;
}

/* Individual Journal Entry */
.journal-entry {
    background: linear-gradient(135deg, rgba(255, 183, 197, 0.1), rgba(255, 215, 0, 0.08));
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1rem 1.2rem;
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.journal-entry:hover {
    background: linear-gradient(135deg, rgba(255, 183, 197, 0.18), rgba(255, 215, 0, 0.12));
    transform: translateX(5px);
    border-color: rgba(255, 183, 197, 0.3);
}

.journal-entry:last-child {
    margin-bottom: 0;
}

.entry-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.6rem;
}

.entry-emoji {
    font-size: 1.5rem;
}

.entry-title {
    font-family: 'Pacifico', cursive;
    font-size: 1rem;
    color: var(--warm-gold);
    flex: 1;
}

.entry-day {
    font-size: 0.7rem;
    color: var(--rose-pink);
    background: rgba(255, 183, 197, 0.15);
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
}

.entry-preview {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobile Adjustments for Journal */
@media (max-width: 768px) {
    .journal-btn {
        width: 44px;
        height: 44px;
        right: 0.5rem;
    }

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

    .journal-badge {
        min-width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }

    .journal-card {
        padding: 1.2rem;
    }

    .journal-entries {
        max-height: 50vh;
    }

    .journal-entry {
        padding: 0.8rem 1rem;
    }

    .journal-icon {
        font-size: 1.4rem;
    }

    .journal-badge {
        position: absolute;
        top: -4px;
        right: -4px;
        min-width: 20px;
        height: 20px;
        background: linear-gradient(135deg, var(--rose-pink), var(--warm-gold));
        border-radius: 10px;
        font-size: 0.7rem;
        font-weight: 700;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 5px;
        box-shadow: 0 2px 8px rgba(255, 183, 197, 0.4);
    }

    /* Journal Modal Content */
    .journal-content {
        max-width: 550px;
        width: 95%;
        max-height: 80vh;
    }

    .journal-card {
        background: linear-gradient(135deg, rgba(255, 248, 240, 0.12), rgba(232, 212, 240, 0.15));
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        border-radius: 28px;
        border: 2px solid rgba(255, 255, 255, 0.2);
        padding: 1.5rem;
        box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
        position: relative;
        overflow: hidden;
    }

    .journal-header {
        text-align: center;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .journal-header h2 {
        font-family: 'Pacifico', cursive;
        font-size: clamp(1.2rem, 4vw, 1.6rem);
        background: linear-gradient(45deg, var(--rose-pink), var(--warm-gold));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-bottom: 0.5rem;
    }

    .journal-subtitle {
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.7);
    }

    /* Journal Entries Container */
    .journal-entries {
        max-height: 55vh;
        overflow-y: auto;
        padding-right: 0.5rem;
    }

    .journal-entries::-webkit-scrollbar {
        width: 6px;
    }

    .journal-entries::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 3px;
    }

    .journal-entries::-webkit-scrollbar-thumb {
        background: linear-gradient(135deg, var(--rose-pink), var(--soft-lavender));
        border-radius: 3px;
    }

    /* Empty State */
    .empty-journal {
        text-align: center;
        padding: 3rem 1rem;
        color: rgba(255, 255, 255, 0.6);
    }

    .empty-icon {
        font-size: 3rem;
        display: block;
        margin-bottom: 1rem;
        animation: floatEmoji 3s ease-in-out infinite;
    }

    .empty-journal p {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    .empty-hint {
        font-size: 0.8rem !important;
        opacity: 0.7;
    }

    /* Individual Journal Entry */
    .journal-entry {
        background: linear-gradient(135deg, rgba(255, 183, 197, 0.1), rgba(255, 215, 0, 0.08));
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        padding: 1rem 1.2rem;
        margin-bottom: 0.8rem;
        transition: all 0.3s ease;
        cursor: pointer;
    }

    .journal-entry:hover {
        background: linear-gradient(135deg, rgba(255, 183, 197, 0.18), rgba(255, 215, 0, 0.12));
        transform: translateX(5px);
        border-color: rgba(255, 183, 197, 0.3);
    }

    .journal-entry:last-child {
        margin-bottom: 0;
    }

    .entry-header {
        display: flex;
        align-items: center;
        gap: 0.8rem;
        margin-bottom: 0.6rem;
    }

    .entry-emoji {
        font-size: 1.5rem;
    }

    .entry-title {
        font-family: 'Pacifico', cursive;
        font-size: 1rem;
        color: var(--warm-gold);
        flex: 1;
    }

    .entry-day {
        font-size: 0.7rem;
        color: var(--rose-pink);
        background: rgba(255, 183, 197, 0.15);
        padding: 0.2rem 0.6rem;
        border-radius: 10px;
    }

    .entry-preview {
        font-size: 0.85rem;
        color: rgba(255, 255, 255, 0.75);
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Mobile Adjustments for Journal */
    @media (max-width: 768px) {
        .journal-btn {
            width: 44px;
            height: 44px;
            right: 0.5rem;
        }

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

        .journal-badge {
            min-width: 18px;
            height: 18px;
            font-size: 0.65rem;
        }

        .journal-card {
            padding: 1.2rem;
        }

        .journal-entries {
            max-height: 50vh;
        }

        .journal-entry {
            padding: 0.8rem 1rem;
        }
    }

    @media (max-width: 400px) {
        .journal-btn {
            top: auto;
            bottom: 7.5rem;
            /* Closer to music player but safe */
            right: 0.8rem;
            transform: none;
        }

        .journal-btn:hover {
            transform: scale(1.1);
        }

        /* Move hint to top-left to avoid title overlap */
        .floating-hint {
            bottom: auto;
            top: 1rem;
            left: 1rem;
            right: auto;
            transform: none;
            width: max-content;
        }

        /* Hide redundant instructions to declutter bottom area */
        .instructions {
            display: none;
        }
    }