@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Poppins:wght@300;400;500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-image: url('bratz_image.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mobile fix for background */
@media (max-width: 768px) {
    body {
        background-attachment: scroll;
        background-size: cover;
    }
}

/* LIGHTER overlay so background shows through more */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(233, 213, 255, 0.3) 0%, rgba(245, 208, 254, 0.25) 20%, rgba(250, 232, 255, 0.3) 40%, rgba(224, 231, 255, 0.25) 60%, rgba(221, 214, 254, 0.3) 80%, rgba(233, 213, 255, 0.3) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Premium Y2K Bratz sparkle decorations */
body::before {
    content: '✧˖°.';
    position: fixed;
    font-size: 180px;
    color: rgba(168, 85, 247, 0.3);
    bottom: 8%;
    left: 5%;
    transform: rotate(-12deg);
    text-shadow: 0 0 40px rgba(168, 85, 247, 0.5), 0 0 80px rgba(168, 85, 247, 0.3);
    animation: floatSlow 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
    filter: blur(0.5px);
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0px) rotate(-12deg); }
    50% { transform: translateY(-25px) rotate(-8deg); }
}

.container {
    max-width: 850px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border-radius: 32px;
    padding: 45px;
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.15), 0 8px 24px rgba(236, 72, 153, 0.1), inset 0 1px 1px rgba(255, 255, 255, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.5);
    position: relative;
    z-index: 10;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 35px 25px;
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.6) 0%, rgba(139, 92, 246, 0.6) 50%, rgba(236, 72, 153, 0.6) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.25), 0 4px 16px rgba(236, 72, 153, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.4);
    position: relative;
}

.logout-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 22px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Poppins', sans-serif;
    text-transform: lowercase;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.8em;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 4px 4px 8px rgba(236, 72, 153, 0.6), 0 0 40px rgba(255, 255, 255, 0.4), 2px 2px 4px rgba(139, 92, 246, 0.5);
    letter-spacing: 3px;
    font-weight: 700;
}

.date {
    color: #fff;
    font-size: 1.1em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.journal-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    padding: 35px 40px;
    border-radius: 30px;
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.1), inset 0 1px 1px rgba(255, 255, 255, 0.6);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
}

.card h2 {
    font-family: 'Playfair Display', serif;
    color: #8b5cf6;
    margin-bottom: 25px;
    font-size: 1.3em;
    font-weight: 400;
    letter-spacing: 1px;
}

.mood-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.mood-btn {
    padding: 15px 24px;
    border: 1.5px solid rgba(167, 139, 250, 0.5);
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    text-transform: lowercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1), inset 0 1px 1px rgba(255, 255, 255, 0.5);
    color: #6B21A8;
}

.mood-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
    border-color: rgba(167, 139, 250, 0.7);
}

.mood-btn.active {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.8) 0%, rgba(139, 92, 246, 0.8) 100%);
    color: white;
    border-color: rgba(167, 139, 250, 0.8);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
    font-weight: 600;
    transform: scale(1.02);
}

.selected-mood {
    margin-top: 15px;
    color: #a78bfa;
    font-style: italic;
    font-size: 0.95em;
    font-weight: 300;
}

textarea, input[type="text"] {
    width: 100%;
    padding: 18px 22px;
    border: 1.5px solid rgba(196, 181, 253, 0.5);
    border-radius: 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95em;
    font-weight: 400;
    resize: vertical;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(15px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.05), inset 0 1px 1px rgba(255, 255, 255, 0.5);
    color: #6B21A8;
}

textarea::placeholder, input[type="text"]::placeholder {
    color: rgba(107, 33, 168, 0.5);
}

textarea:focus, input[type="text"]:focus {
    outline: none;
    border-color: rgba(167, 139, 250, 0.8);
    box-shadow: 0 6px 20px rgba(167, 139, 250, 0.2), 0 0 0 3px rgba(167, 139, 250, 0.15);
    background: rgba(255, 255, 255, 0.5);
}

.gratitude-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gratitude-input {
    margin-bottom: 0;
}

.primary-btn, .save-btn, .secondary-btn {
    width: 100%;
    padding: 18px 32px;
    border: none;
    border-radius: 20px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Poppins', sans-serif;
    text-transform: lowercase;
    letter-spacing: 1px;
}

.primary-btn {
    background: linear-gradient(135deg, #A78BFA 0%, #8B5CF6 100%);
    color: white;
    margin-top: 10px;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
    background: linear-gradient(135deg, #C4B5FD 0%, #A78BFA 100%);
}

.save-btn {
    background: linear-gradient(135deg, #EC4899 0%, #DB2777 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.3);
}

.save-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(236, 72, 153, 0.4);
    background: linear-gradient(135deg, #F472B6 0%, #EC4899 100%);
}
.secondary-btn {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(15px);
    color: #6B21A8;
    border: 1.5px solid rgba(139, 92, 246, 0.5);
    margin-top: 10px;
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.1), inset 0 1px 1px rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 24px rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.7);
    transform: translateY(-3px);
}

.bible-verse-card {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1.5px solid rgba(167, 139, 250, 0.4);
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.1);
}

.verse-text {
    font-size: 1.15em;
    line-height: 1.8;
    color: #6B21A8;
    font-style: italic;
    margin-bottom: 15px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.verse-reference {
    color: #8b5cf6;
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.verse-context {
    color: #7C3AED;
    line-height: 1.7;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(196, 181, 253, 0.4);
    font-weight: 400;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(50px) saturate(200%);
    -webkit-backdrop-filter: blur(50px) saturate(200%);
    padding: 45px;
    border-radius: 28px;
    max-width: 850px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    width: 90%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 25px 70px rgba(139, 92, 246, 0.2);
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2em;
    cursor: pointer;
    color: #8b5cf6;
}

.close:hover {
    color: #a78bfa;
}

.past-entry {
    background: #f5f3ff;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    border-left: 4px solid #8b5cf6;
}

.past-entry h3 {
    color: #8b5cf6;
    margin-bottom: 10px;
}

.past-entry p {
    margin-bottom: 8px;
    line-height: 1.6;
}

.past-entry strong {
    color: #6c757d;
}

/* Song Card Styling */
.song-card {
    background: linear-gradient(135deg, rgba(245, 243, 255, 0.9) 0%, rgba(237, 233, 254, 0.9) 100%);
    border: 1.5px solid rgba(139, 92, 246, 0.3);
    backdrop-filter: blur(10px);
}

.song-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.song-input {
    margin-bottom: 0 !important;
    flex: 1;
}

.play-song-btn {
    padding: 18px 30px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.85) 0%, rgba(167, 139, 250, 0.85) 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.95em;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    text-transform: lowercase;
    letter-spacing: 1px;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.25);
}

.play-song-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
}

.song-hint {
    color: #a78bfa;
    font-size: 0.85em;
    font-style: italic;
    margin: 10px 0 0 0;
    font-weight: 300;
}

/* Photo Collage Styling */
.photo-card {
    background: linear-gradient(135deg, rgba(245, 243, 255, 0.9) 0%, rgba(237, 233, 254, 0.9) 100%);
    border: 1.5px solid rgba(167, 139, 250, 0.3);
    backdrop-filter: blur(10px);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    min-height: 100px;
}

.photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.2);
    transition: transform 0.3s ease;
}

.photo-item:hover {
    transform: scale(1.05) rotate(-2deg);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-item .delete-photo {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(139, 92, 246, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 0.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-item:hover .delete-photo {
    opacity: 1;
}

.add-photo-btn {
    width: 100%;
    padding: 14px 30px;
    background: rgba(255, 255, 255, 0.8);
    color: #8b5cf6;
    border: 1.5px dashed rgba(139, 92, 246, 0.4);
    border-radius: 20px;
    font-size: 0.95em;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    text-transform: lowercase;
    letter-spacing: 1px;
}

.add-photo-btn:hover {
    background: rgba(245, 243, 255, 0.9);
    border-color: rgba(139, 92, 246, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

/* Song Links Styling */
.song-links {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    justify-content: center;
}

.song-link {
    color: #a78bfa;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 20px;
    background: rgba(167, 139, 250, 0.1);
    border-radius: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(167, 139, 250, 0.3);
}

.song-link:hover {
    background: rgba(167, 139, 250, 0.2);
    color: #8b5cf6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(167, 139, 250, 0.3);
}

/* Photo upload styles */
.photo-btn {
    width: 100%;
    padding: 16px 28px;
    background: linear-gradient(135deg, #A78BFA 0%, #8B5CF6 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Poppins', sans-serif;
    text-transform: lowercase;
    letter-spacing: 1px;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
}

.photo-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
    background: linear-gradient(135deg, #C4B5FD 0%, #A78BFA 100%);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.photo-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    padding: 8px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.1);
}

.photo-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
}

.delete-photo {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    background: rgba(236, 72, 153, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2em;
    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.2);
}

.delete-photo:hover {
    background: rgba(219, 39, 119, 0.95);
    transform: scale(1.1);
}

/* Voice recording styles */
.record-btn {
    width: 100%;
    padding: 16px 28px;
    background: linear-gradient(135deg, #A78BFA 0%, #8B5CF6 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Poppins', sans-serif;
    text-transform: lowercase;
    letter-spacing: 1px;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.3);
}

.record-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
    background: linear-gradient(135deg, #C4B5FD 0%, #A78BFA 100%);
}

.voice-status {
    margin-top: 12px;
    color: #8B5CF6;
    font-style: italic;
    font-size: 0.95em;
    text-align: center;
    font-weight: 500;
}

.voice-playback {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    border: 1.5px solid rgba(167, 139, 250, 0.4);
}

.voice-playback audio {
    width: 100%;
    margin-bottom: 12px;
    border-radius: 12px;
}

.voice-playback .delete-btn {
    width: 100%;
    padding: 10px 20px;
    background: rgba(236, 72, 153, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    text-transform: lowercase;
}

.voice-playback .delete-btn:hover {
    background: rgba(219, 39, 119, 0.9);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 1.8em;
        letter-spacing: 1px;
        word-spacing: 0.05em;
        line-height: 1.3;
        padding-right: 0;
    }
    
    .card {
        padding: 20px;
    }
    
    .mood-selector {
        grid-template-columns: repeat(2, 1fr);
    }
    
    header {
        padding: 60px 15px 20px 15px;
    }
    
    .logout-btn {
        top: 10px;
        right: 10px;
        padding: 6px 15px;
        font-size: 0.75em;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5em;
        letter-spacing: 0.5px;
        padding-right: 0;
    }
    
    .container {
        padding: 20px;
    }
    
    header {
        padding: 50px 10px 20px 10px;
    }
    
    .logout-btn {
        position: relative;
        top: auto;
        right: auto;
        margin-top: 15px;
        width: 100%;
        display: block;
    }
}
