* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f4f8f4;
    color: #344536;
    overflow-x: hidden;
}

/* =========================
   NAVBAR DESKTOP
========================= */

.navbar {
    background-color: #a8c3a0;
    padding: 16px 6%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    position: relative;
    z-index: 1000;
    box-shadow: 0 3px 12px rgba(70, 100, 70, 0.08);
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-decoration: none;
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1001;
}

.nav-menu a {
    text-decoration: none;
    color: white;
    font-size: 14px;
    font-weight: 600;
    position: relative;
    z-index: 1002;
    transition: 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #344536;
    opacity: 0.9;
}

/* =========================
   HERO
========================= */

.hero {
    min-height: 80vh;
    padding: 70px 8%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-text {
    max-width: 550px;
}

.hero-text h1 {
    font-size: 48px;
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 30px;
    color: #657265;
}

.btn {
    display: inline-block;
    background-color: #6f9b70;
    color: white;
    padding: 13px 25px;
    border-radius: 12px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s ease;
}

.btn:hover {
    background-color: #587f5b;
    transform: translateY(-2px);
}

.hero-image {
    width: 350px;
    height: 350px;
    background-color: #dcebd8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 100px;
    flex-shrink: 0;
}

/* =========================
   DASHBOARD
========================= */

.dashboard {
    max-width: 1200px;
    margin: auto;
    padding: 40px 8%;
}

.welcome {
    background: linear-gradient(135deg, #dcebd8, #eef6eb);
    padding: 35px;
    border-radius: 24px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(80, 110, 80, 0.08);
}

.small-text {
    color: #6f9b70;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
}

.welcome h1 {
    font-size: 34px;
    color: #344536;
    margin-bottom: 12px;
}

.welcome p {
    color: #657265;
    line-height: 1.7;
    font-size: 16px;
}

/* =========================
   FEATURE & CARDS
========================= */

.feature-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.feature-card {
    background-color: white;
    padding: 28px;
    border-radius: 24px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    border: 1px solid #edf2ed;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.feature-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 12px 25px rgba(80, 110, 80, 0.13);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background-color: #eef6eb;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 20px;
}

.feature-card h2 {
    font-size: 21px;
    color: #344536;
    margin-bottom: 10px;
}

.feature-card p {
    line-height: 1.6;
    margin-bottom: 22px;
    color: #657265;
    min-height: 52px;
}

.card-button {
    display: inline-block;
    background-color: #6f9b70;
    color: white;
    padding: 11px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s ease;
    text-align: center;
}

.card-button:hover {
    background-color: #587f5b;
    transform: translateY(-2px);
}

/* =========================
   MOOD CHECK
========================= */

.mood-container {
    max-width: 850px;
    margin: 40px auto;
    padding: 0 20px;
    text-align: center;
}

.mood-container h1 {
    color: #344536;
    margin-bottom: 10px;
}

.mood-container > p {
    color: #687568;
    margin-bottom: 30px;
}

.mood-options {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 25px 0;
}

.mood-card {
    width: 120px;
    padding: 20px 10px;
    background: white;
    border-radius: 18px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: 0.2s ease;
    text-align: center;
    border: 2px solid transparent;
}

.mood-card:hover {
    transform: translateY(-5px);
}

.mood-card input {
    display: none;
}

.mood-card .emoji {
    display: block;
    font-size: 40px;
    margin-bottom: 8px;
}

.mood-name {
    display: block;
    font-size: 15px;
    color: #344536;
    font-weight: 600;
}

.mood-card:has(input:checked) {
    background-color: #dcebd8;
    border-color: #6f9b70;
    transform: translateY(-5px);
}

.catatan-label {
    display: block;
    text-align: left;
    margin-bottom: 8px;
    color: #344536;
    font-weight: bold;
}

.mood-container textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #dcebd8;
    border-radius: 15px;
    resize: vertical;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    font-family: Arial, sans-serif;
    outline: none;
    background-color: #ffffff;
}

.mood-container textarea:focus {
    border-color: #6f9b70;
    box-shadow: 0 0 0 3px rgba(111, 155, 112, 0.2);
}

/* =========================
   FORM JURNAL & RIWAYAT
========================= */

.jurnal-container,
.history-container,
.artikel-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.history-header {
    text-align: center;
    margin-bottom: 30px;
}

.history-header h1 {
    font-size: 26px;
    color: #344536;
    margin-bottom: 6px;
}

.history-subtitle {
    color: #687568;
    font-size: 14px;
    line-height: 1.5;
}

.form-jurnal {
    background-color: #ffffff;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.form-jurnal h1 {
    color: #344536;
    margin-bottom: 8px;
}

.form-jurnal p {
    color: #687568;
    margin-bottom: 25px;
}

.form-jurnal form {
    display: flex;
    flex-direction: column;
}

.form-jurnal label {
    font-weight: bold;
    color: #344536;
    margin-bottom: 8px;
    margin-top: 15px;
}

.form-jurnal input[type="text"],
.form-jurnal textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #dcebd8;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: 0.2s ease;
    background-color: #fbfdfb;
}

.form-jurnal input[type="text"]:focus,
.form-jurnal textarea:focus {
    border-color: #6f9b70;
    box-shadow: 0 0 0 3px rgba(111, 155, 112, 0.2);
    background-color: #ffffff;
}

.form-jurnal .btn {
    margin-top: 25px;
    align-self: flex-start;
}

/* =========================
   HISTORY / ARTIKEL
========================= */

.jurnal-item,
.history-card,
.artikel-card {
    background: #ffffff;
    padding: 22px;
    margin-bottom: 18px;
    border-radius: 18px;
    border: 1px solid #eef6eb;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.history-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.history-mood {
    font-size: 32px;
    background-color: #eef6eb;
    padding: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.history-content {
    flex: 1;
    min-width: 0;
}

.history-content h2,
.jurnal-item h3,
.artikel-card h2 {
    color: #344536;
    margin-bottom: 8px;
}

.history-content h2 {
    font-size: 18px;
}

.history-content p,
.jurnal-item p,
.artikel-card p {
    color: #657265;
    line-height: 1.6;
    margin-bottom: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.history-content small {
    font-size: 12px;
    color: #888888;
}

.history-action {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 10px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 12px;
    white-space: nowrap;
}

.btn-edit {
    background-color: #eef6eb;
    color: #344536;
}

.btn-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #fde8e8;
    color: #e74c3c;
    padding: 8px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    transition: 0.2s ease;
    white-space: nowrap;
}

.btn-delete:hover {
    background-color: #f8b4b4;
    color: #c0392b;
}

.empty-history {
    text-align: center;
    background-color: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

/* =========================
   MESSAGES
========================= */

.success-message {
    background-color: #dcebd8;
    color: #49664b;
    padding: 12px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-error {
    background-color: #fde8e8;
    color: #c53030;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 20px;
}

/* =========================
   AUTH / LOGIN REGISTER
========================= */

.auth-body {
    background-color: #f4f8f4;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 380px;
    background-color: #ffffff;
    padding: 30px 35px;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.auth-container h1 {
    font-size: 26px;
    color: #344536;
    margin-bottom: 5px;
}

.auth-container h2 {
    font-size: 15px;
    color: #666;
    font-weight: normal;
    margin-bottom: 20px;
}

.auth-container form {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.auth-container label {
    font-size: 13px;
    font-weight: 600;
    margin-top: 12px;
    margin-bottom: 5px;
    color: #344536;
}

.auth-container input {
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.auth-container input:focus {
    border-color: #a8c3a0;
}

.auth-container button {
    margin-top: 20px;
    padding: 12px;
    background-color: #a8c3a0;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease;
}

.auth-container button:hover {
    background-color: #8fae87;
}

.auth-container p {
    margin-top: 18px;
    font-size: 13px;
    color: #666;
}

.auth-container a {
    color: #344536;
    text-decoration: none;
    font-weight: bold;
}

.auth-container a:hover {
    text-decoration: underline;
}

/* =========================
   BOTTOM NAVIGATION
========================= */

.mobile-bottom-nav {
    display: none;
}

/* =========================
   TABLET
========================= */

@media (max-width: 900px) {

    .feature-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero {
        gap: 30px;
    }

    .hero-image {
        width: 280px;
        height: 280px;
        font-size: 80px;
    }

    .hero-text h1 {
        font-size: 40px;
    }
}

/* =========================
   HP
   390 x 844
========================= */

@media (max-width: 600px) {

    body {
        padding-bottom: 78px !important;
    }

    /* =====================
       NAVBAR HP
    ===================== */

    .navbar {
        padding: 13px 18px;
        min-height: 56px;
    }

    .logo {
        font-size: 21px;
    }

    .nav-menu {
        display: none !important;
    }

    /* =====================
       HERO HP
    ===================== */

    .hero {
        min-height: auto;
        padding: 30px 18px 35px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 25px;
        text-align: center;
    }

    .hero-text {
        width: 100%;
        max-width: 100%;
    }

    .hero-text h1 {
        font-size: 31px;
        line-height: 1.2;
        margin-bottom: 15px;
    }

    .hero-text p {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: 22px;
    }

    /* Tombol hero */
    .hero-text .btn {
        padding: 11px 17px;
        font-size: 13px;
        border-radius: 11px;
        margin: 3px;
    }

    .hero-image {
        width: 210px;
        height: 210px;
        font-size: 65px;
        flex-shrink: 0;
    }

    /* =====================
       DASHBOARD HP
    ===================== */

    .dashboard {
        width: 100%;
        padding: 22px 16px;
    }

    .welcome {
        padding: 20px;
        border-radius: 18px;
        margin-bottom: 20px;
    }

    .small-text {
        font-size: 13px;
        margin-bottom: 7px;
    }

    .welcome h1 {
        font-size: 24px;
        line-height: 1.25;
        margin-bottom: 10px;
    }

    .welcome p {
        font-size: 14px;
        line-height: 1.6;
    }

    /* =====================
       FEATURE CARD HP
    ===================== */

    .feature-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feature-card {
        padding: 22px;
        border-radius: 19px;
    }

    .feature-card:hover {
        transform: none;
    }

    .feature-icon {
        width: 52px;
        height: 52px;
        border-radius: 15px;
        font-size: 27px;
        margin-bottom: 15px;
    }

    .feature-card h2 {
        font-size: 19px;
        margin-bottom: 8px;
    }

    .feature-card p {
        font-size: 14px;
        line-height: 1.55;
        min-height: auto;
        margin-bottom: 17px;
    }

    .card-button {
        width: 100%;
        padding: 10px 15px;
        font-size: 14px;
        border-radius: 11px;
    }

    /* =====================
       MOOD CHECK HP
    ===================== */

    .mood-container {
        width: 100%;
        max-width: 100%;
        margin: 25px auto;
        padding: 0 16px;
    }

    .mood-container h1 {
        font-size: 25px;
        line-height: 1.25;
    }

    .mood-container > p {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 22px;
    }

    .mood-options {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 9px;
        margin: 20px 0;
    }

    .mood-card {
        width: 100%;
        min-width: 0;
        padding: 13px 5px;
        border-radius: 15px;
    }

    .mood-card:hover {
        transform: none;
    }

    .mood-card .emoji {
        font-size: 32px;
        margin-bottom: 5px;
    }

    .mood-name {
        font-size: 12px;
    }

    .catatan-label {
        font-size: 14px;
    }

    .mood-container textarea {
        padding: 12px;
        border-radius: 12px;
        font-size: 14px;
    }

    /* =====================
       JURNAL HP
    ===================== */

    .jurnal-container,
    .history-container,
    .artikel-container {
        width: 100%;
        max-width: 100%;
        margin: 25px auto;
        padding: 0 16px;
    }

    .form-jurnal {
        padding: 22px;
        border-radius: 18px;
    }

    .form-jurnal h1 {
        font-size: 24px;
    }

    .form-jurnal p {
        font-size: 14px;
        line-height: 1.5;
    }

    .form-jurnal label {
        font-size: 14px;
    }

    .form-jurnal input[type="text"],
    .form-jurnal textarea {
        padding: 12px;
        font-size: 14px;
    }

    .form-jurnal .btn {
        width: 100%;
        text-align: center;
        padding: 12px;
    }

    /* =====================
       RIWAYAT MOOD HP
    ===================== */

    .history-header {
        margin-bottom: 22px;
    }

    .history-header h1 {
        font-size: 24px;
        line-height: 1.25;
    }

    .history-subtitle {
        font-size: 13px;
    }

    .history-card {
        padding: 14px;
        margin-bottom: 13px;
        border-radius: 15px;
        gap: 10px;
        align-items: flex-start;
    }

    .history-mood {
        width: 48px;
        height: 48px;
        padding: 7px;
        font-size: 26px;
    }

    .history-content h2 {
        font-size: 16px;
        margin-bottom: 4px;
    }

    .history-content p {
        font-size: 13px;
        line-height: 1.45;
        margin-bottom: 5px;
    }

    .history-content small {
        font-size: 11px;
    }

    .history-action {
        gap: 4px;
    }

    .btn-action {
        padding: 5px 7px;
        font-size: 11px;
    }

    .btn-delete {
        padding: 6px 9px;
        font-size: 11px;
    }

    .empty-history {
        padding: 30px 18px;
        border-radius: 17px;
    }

    /* =====================
       ARTIKEL HP
    ===================== */

    .artikel-card {
        padding: 19px;
        border-radius: 17px;
        margin-bottom: 14px;
    }

    .artikel-card h2 {
        font-size: 19px;
    }

    .artikel-card p {
        font-size: 14px;
        line-height: 1.55;
    }

    /* =====================
       LOGIN / REGISTER HP
    ===================== */

    .auth-body {
        padding: 18px;
    }

    .auth-container {
        max-width: 100%;
        padding: 25px 22px;
        border-radius: 17px;
    }

    .auth-container h1 {
        font-size: 24px;
    }

    .auth-container h2 {
        font-size: 14px;
    }

    .auth-container input {
        padding: 11px;
        font-size: 14px;
    }

    .auth-container button {
        padding: 12px;
    }

    /* =====================
       BOTTOM NAV HP
    ===================== */

    .mobile-bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 70px;
        background-color: #ffffff;
        border-top: 1px solid #e0e8e0;
        justify-content: space-around;
        align-items: center;
        padding: 7px 0 env(safe-area-inset-bottom, 0px);
        z-index: 2000;
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.08);
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #657265;
        font-size: 10px;
        font-weight: 600;
        gap: 4px;
        flex: 1;
        min-width: 0;
    }

    .mobile-nav-item .icon {
        font-size: 20px;
        line-height: 1;
    }

    .mobile-nav-item span:not(.icon) {
        line-height: 1;
        white-space: nowrap;
    }

    .mobile-nav-item.active,
    .mobile-nav-item:hover {
        color: #6f9b70;
    }
}

/* =========================
   HP KECIL
   360px ke bawah
========================= */

@media (max-width: 380px) {

    .logo {
        font-size: 19px;
    }

    .hero {
        padding: 25px 15px 30px;
    }

    .hero-text h1 {
        font-size: 28px;
    }

    .hero-text p {
        font-size: 14px;
    }

    .hero-image {
        width: 185px;
        height: 185px;
        font-size: 58px;
    }

    .hero-text .btn {
        padding: 10px 13px;
        font-size: 12px;
    }

    .feature-card {
        padding: 19px;
    }

    .mood-options {
        gap: 7px;
    }

    .mood-card {
        padding: 11px 3px;
    }

    .mood-card .emoji {
        font-size: 29px;
    }

    .mood-name {
        font-size: 11px;
    }
}