@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-soft: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --gradient-card: linear-gradient(135deg, rgba(168, 237, 234, 0.1) 0%, rgba(254, 214, 227, 0.1) 100%);
    --blue-light: #a8edea;
    --pink-light: #fed6e3;
    --purple: #667eea;
    --text-dark: #2d3748;
    --text-light: #718096;
    --card-bg: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #e0f7fa 0%, #fce4ec 100%);
    min-height: 100vh;
    color: var(--text-dark);
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(168, 237, 234, 0.3) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(-20px, 20px) rotate(5deg);
    }
}

main {
    padding-top: 2rem;
    padding-bottom: 5rem;
    position: relative;
    z-index: 1;
}

.toast-container {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translate(-50%, -150px);
    opacity: 0;
    z-index: 9999;
    background-color: var(--card-bg, #ffffff);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    border-top: 4px solid var(--purple, #667eea);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin-top: 20px;
    max-width: 90%;
    width: 400px;
    pointer-events: none;
}

.toast-container.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

.toast-container p {
    margin: 0;
    font-weight: 500;
    color: var(--text-dark, #2d3748);
}

#toast-icon {
    font-size: 1.5rem;
}

.toast-container.error {
    border-top-color: #ff6b6b;
}

.toast-container.error #toast-icon {
    color: #ff6b6b;
}

.toast-container.success {
    border-top-color: #4CAF50;
}

.toast-container.success #toast-icon {
    color: #4CAF50;
}

.logo {
    width: 100px;
    height: 100px;
    border-radius: 30px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
    display: block;
    margin: 0 auto;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

h3 {
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 1rem;
}

.mood-box {
    background: var(--card-bg);
    border-radius: 25px;
    padding: 2rem 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.mood-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-soft);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.mood-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.15);
}

.mood-box i,
.mood-box p {
    position: relative;
    z-index: 1;
}

.mood-box i {
    font-size: 3rem;
    color: var(--purple);
    transition: transform 0.3s ease;
}

.mood-box:hover i {
    transform: scale(1.1);
}

.mood-box p {
    margin: 0.75rem 0 0 0;
    font-weight: 600;
    color: var(--text-dark);
}

.mood-box.selected {
    border-color: var(--purple);
    transform: translateY(-5px);
}

.mood-box.selected::before {
    opacity: 1;
}

.mood-box.selected[data-mood="Senang"] i {
    color: #ffd700;
}

.mood-box.selected[data-mood="Biasa"] i {
    color: #94a3b8;
}

.mood-box.selected[data-mood="Sedih"] i {
    color: #60a5fa;
}

.mood-box.selected[data-mood="Marah"] i {
    color: #f87171;
}

/* Form Controls */
.form-label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-control {
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    background-color: var(--card-bg);
}

.form-control:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background-color: var(--card-bg);
}

/* Buttons */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    border-radius: 15px;
    padding: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-outline-primary {
    border: 2px solid var(--purple);
    color: var(--purple);
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    border: none;
    border-radius: 15px;
    padding: 0.75rem 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(238, 90, 111, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 90, 111, 0.4);
}

/* Cards */
.card {
    border: none;
    border-radius: 25px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    background: var(--card-bg);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.card.text-center {
    background: linear-gradient(135deg, rgba(168, 237, 234, 0.2) 0%, rgba(254, 214, 227, 0.2) 100%);
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.card.text-center .card-title {
    font-size: 1.25rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#quote-text {
    font-style: italic;
    color: var(--text-dark);
    font-weight: 400;
}

/* Ruang Tenang Card */
.card-quote {
    position: relative;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: none;
    overflow: visible;
    background: var(--card-bg);
    transition: all 0.3s ease;
}

.card-quote:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.card-quote .card-body {
    padding: 1.5rem;
    padding-right: 3.5rem;
}

.card-quote .card-title {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.card-quote blockquote p {
    font-size: 0.95rem;
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.card-quote blockquote footer {
    font-size: 1.2rem;
    text-align: right;
    color: var(--text-dark);
    background: none;
    padding: 0;
    border: none;
}

.btn-love {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 0.5rem;
    font-size: 1.4rem;
    color: #cbd5e0;
    transition: all 0.2s ease;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-love:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.btn-love.loved i.bi-heart-fill {
    color: #E53E3E;
}

.btn-love i {
    transition: all 0.2s ease;
}

/* Section Headers */
h5.text-muted {
    color: var(--text-light) !important;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    margin-top: 2rem;
}

/* Profil Section */
.bi-person-circle {
    background: var(--gradient-soft);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.75rem;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 12px;
    position: relative;
}

.nav-item i {
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.nav-item span {
    margin-top: 0.25rem;
    font-weight: 500;
}

.nav-item.active {
    color: var(--purple);
}

.nav-item.active i {
    transform: scale(1.2);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -10px;
    width: 40px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 3px;
}

/* Page Logic */
.page {
    display: none;
    animation: fadeIn 0.4s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 576px) {
    .mood-box {
        padding: 1.5rem 0.75rem;
    }

    .mood-box i {
        font-size: 2.5rem;
    }

    .card-quote .card-body {
        padding-right: 3rem;
    }
}

#auth-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
    background: linear-gradient(135deg, #e0f7fa 0%, #fce4ec 100%);
}

#auth-container .page {
    width: 100%;
}

#auth-error {
    display: none;
    width: 100%;
    max-width: 420px;
    border-radius: 15px;
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
}

.auth-link {
    cursor: pointer;
    color: var(--purple);
    text-decoration: none;
    font-weight: 500;
}

.auth-link:hover {
    text-decoration: underline;
}

#auth-container .card {
    background: var(--card-bg);
}

.journal-entry-card {
    border-left: 5px solid var(--purple);
    background: var(--card-bg);
}

.journal-title {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.journal-mood-icon {
    font-size: 1.75rem;
    margin-right: 12px;
}

.journal-mood-icon.senang {
    color: #ffd700;
}

.journal-mood-icon.biasa {
    color: #94a3b8;
}

.journal-mood-icon.sedih {
    color: #60a5fa;
}

.journal-mood-icon.marah {
    color: #f87171;
}

.journal-mood-icon.default {
    color: var(--text-light);
}

.journal-entry-card .card-text {
    font-size: 0.95rem;
    color: var(--text-light);
    font-style: italic;
    margin-top: 10px;
}