/* ====================================================
   JEJAK RASA - AESTHETIC WITH LOGO MASCOT "JEKI"
   ==================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* Palet Warna Menenangkan Sesuai Gradasi Logo */
    --primary-color: #3b6651;       /* Sage Green */
    --primary-hover: #2c4e3e;
    --primary-light: #e8f3ed;
    --secondary-color: #e07a5f;     /* Warm Coral */
    --accent-purple: #c084fc;
    --accent-pink: #f472b6;
    --bg-color: #f4f0e6;            /* Soft Cream */
    --card-bg: rgba(255, 255, 255, 0.92);
    --text-color: #2b2d42;
    --text-muted: #6c757d;
    --border-color: #e2ddd3;
    --danger-color: #e63946;
    --bubble-user: #e3ebd3;
    --bubble-other: #f0f2f5;
    --font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
    --border-radius: 20px;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 30px rgba(43, 45, 66, 0.06);
    --shadow-hover: 0 18px 40px rgba(43, 45, 66, 0.12);
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ====================================================
   BACKGROUND & DEKORASI OVERLAY MASKOT "JEKI"
   ==================================================== */
body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(192, 132, 252, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 90% 15%, rgba(59, 102, 81, 0.15) 0%, transparent 45%),
        radial-gradient(circle at 50% 85%, rgba(244, 114, 182, 0.1) 0%, transparent 50%),
        radial-gradient(rgba(59, 102, 81, 0.08) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 100% 100%, 24px 24px;
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* DEKORASI MASKOT 1: SI "JEKI" BERBENTUK HATI & JEJAK (KIRI ATAS) */
body::before {
    content: "";
    position: fixed;
    top: 85px;
    left: -10px;
    width: 190px;
    height: 190px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cdefs%3E%3ClinearGradient id='jrGrad' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%239ec5fe'/%3E%3Cstop offset='35%25' stop-color='%23c084fc'/%3E%3Cstop offset='70%25' stop-color='%23f472b6'/%3E%3Cstop offset='100%25' stop-color='%2386efac'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M100 165 C40 120 20 80 45 50 C70 20 95 40 100 55 C105 40 130 20 155 50 C180 80 160 120 100 165 Z' fill='url(%23jrGrad)' stroke='%23ffffff' stroke-width='4'/%3E%3Cpath d='M110 85 C125 85 135 95 130 110 C125 125 105 135 95 140 C90 130 100 115 100 105 C100 95 102 85 110 85 Z' fill='%23ffffff' opacity='0.35'/%3E%3Ccircle cx='75' cy='90' r='6' fill='%232d3748'/%3E%3Ccircle cx='73' cy='88' r='2' fill='%23ffffff'/%3E%3Ccircle cx='125' cy='90' r='6' fill='%232d3748'/%3E%3Ccircle cx='123' cy='88' r='2' fill='%23ffffff'/%3E%3Cellipse cx='65' cy='98' rx='7' ry='4' fill='%23f472b6' opacity='0.6'/%3E%3Cellipse cx='135' cy='98' rx='7' ry='4' fill='%23f472b6' opacity='0.6'/%3E%3Cpath d='M92 102 Q100 112 108 102' stroke='%232d3748' stroke-width='3' fill='none' stroke-linecap='round'/%3E%3Cellipse cx='75' cy='168' rx='10' ry='6' fill='%23c084fc'/%3E%3Cellipse cx='125' cy='168' rx='10' ry='6' fill='%23f472b6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    z-index: 0;
    pointer-events: none;
    opacity: 0.9;
    animation: floatMascot 6s ease-in-out infinite;
}

/* DEKORASI MASKOT 2: SI "JEKI" DENGAN GELEMBUNG CURHAT (KANAN BAWAH) */
body::after {
    content: "";
    position: fixed;
    bottom: 20px;
    right: -10px;
    width: 200px;
    height: 200px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cdefs%3E%3ClinearGradient id='jrGrad2' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%23f472b6'/%3E%3Cstop offset='50%25' stop-color='%23fba518'/%3E%3Cstop offset='100%25' stop-color='%2386efac'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M40 60 C40 35 160 35 160 60 C160 110 130 120 100 120 C80 120 60 135 45 145 C50 125 40 115 40 60 Z' fill='url(%23jrGrad2)' opacity='0.88'/%3E%3Ccircle cx='75' cy='70' r='6' fill='%23ffffff'/%3E%3Ccircle cx='125' cy='70' r='6' fill='%23ffffff'/%3E%3Cpath d='M88 85 Q100 96 112 85' stroke='%23ffffff' stroke-width='4' fill='none' stroke-linecap='round'/%3E%3Ccircle cx='63' cy='78' r='5' fill='%23ffffff' opacity='0.5'/%3E%3Ccircle cx='137' cy='78' r='5' fill='%23ffffff' opacity='0.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    z-index: 0;
    pointer-events: none;
    opacity: 0.85;
    animation: floatChat 7s ease-in-out infinite;
}

@keyframes floatMascot {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-14px) rotate(4deg); }
}

@keyframes floatChat {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-10px) scale(1.03); }
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

/* NAVBAR GLASSMORPHISM */
.navbar {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 221, 211, 0.8);
    padding: 0.9rem 2.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.04);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.4px;
}

.navbar-brand img {
    height: 40px;
    width: auto;
    border-radius: 10px;
    transition: var(--transition);
}

.navbar-brand:hover img {
    transform: rotate(-6deg) scale(1.08);
}

.nav-links {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.92rem;
}

.nav-links a:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
    text-decoration: none;
}

/* TOMBOL CURHAT BERPENDAR */
.btn-curhat {
    background: linear-gradient(135deg, var(--secondary-color), #f4a261) !important;
    color: white !important;
    font-weight: 700 !important;
    padding: 10px 20px !important;
    border-radius: 30px !important;
    box-shadow: 0 4px 16px rgba(224, 122, 95, 0.38);
}

.btn-curhat:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(224, 122, 95, 0.48) !important;
    opacity: 1 !important;
}

/* LAYOUT CONTAINER */
.container {
    max-width: 1060px;
    margin: 2.2rem auto;
    padding: 0 1.2rem;
    display: grid;
    grid-template-columns: 1fr 310px;
    gap: 26px;
    position: relative;
    z-index: 1;
}

.container-single {
    max-width: 840px;
    margin: 2.2rem auto;
    padding: 0 1.2rem;
    position: relative;
    z-index: 1;
}

.auth-container {
    max-width: 450px;
    margin: 3.5rem auto;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    padding: 2.4rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 1;
}

/* DESAIN KARTU STATUS */
.card {
    background-color: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 1.6rem;
    margin-bottom: 1.6rem;
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-pink), var(--secondary-color));
    opacity: 0;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.card:hover::before {
    opacity: 1;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 1.1rem;
}

.avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #527993);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(59, 102, 81, 0.25);
    flex-shrink: 0;
}

.post-author-name {
    font-weight: 700;
    color: var(--text-color);
    font-size: 1.02rem;
}

.badge-bk {
    background: linear-gradient(135deg, #2a9d8f, #264653);
    color: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    margin-left: 6px;
    letter-spacing: 0.3px;
    display: inline-block;
}

.post-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.2rem;
    white-space: pre-line;
    word-break: break-word;
    color: #2c2e3e;
}

/* FORM ELEMENTS */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    font-size: 0.92rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    font-size: 0.96rem;
    font-family: inherit;
    background-color: rgba(255, 255, 255, 0.95);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 102, 81, 0.16);
}

textarea.form-control {
    resize: vertical;
    min-height: 95px;
}

.btn {
    display: inline-block;
    padding: 11px 24px;
    background: linear-gradient(135deg, var(--primary-color), #2d503f);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(59, 102, 81, 0.28);
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 102, 81, 0.38);
    background: linear-gradient(135deg, var(--primary-hover), #223f31);
}

/* KOMENTAR */
.comments-section {
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px dashed var(--border-color);
}

.comment-item {
    background: rgba(245, 242, 235, 0.8);
    border-left: 3.5px solid var(--primary-color);
    padding: 10px 14px;
    border-radius: 0 12px 12px 0;
    margin-bottom: 10px;
    font-size: 0.92rem;
    word-break: break-word;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.comment-author {
    font-weight: 700;
    font-size: 0.88rem;
}

/* CHAT BOX */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 550px;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.chat-header {
    padding: 1.2rem 1.4rem;
    background: linear-gradient(135deg, var(--primary-color), #2c4e3e);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.chat-messages {
    flex: 1;
    padding: 1.2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-bubble {
    max-width: 80%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 0.95rem;
    word-break: break-word;
    box-shadow: var(--shadow-sm);
}

.message-self {
    align-self: flex-end;
    background: var(--bubble-user);
    border-bottom-right-radius: 3px;
    color: #1c3326;
}

.message-other {
    align-self: flex-start;
    background: var(--bubble-other);
    border-bottom-left-radius: 3px;
}

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

.chat-form {
    display: flex;
    padding: 1rem 1.1rem;
    gap: 10px;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
}

.chat-form input {
    flex: 1;
}

/* ALERT MESSAGES */
.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 1.2rem;
    font-size: 0.92rem;
    font-weight: 600;
}

.alert-danger {
    background-color: #fde8e8;
    color: #9b1c1c;
    border: 1px solid #f8b4b4;
}

.alert-success {
    background-color: #def7ec;
    color: #03543f;
    border: 1px solid #84e1bc;
}

/* RESPONSIVE UNTUK HP (< 768px) */
@media (max-width: 768px) {
    body::before, body::after {
        display: none;
    }

    .navbar {
        padding: 0.8rem 1rem;
        flex-direction: column;
        align-items: stretch;
    }

    .navbar-brand {
        justify-content: center;
        margin-bottom: 6px;
    }

    .nav-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
    }

    .container {
        grid-template-columns: 1fr;
        padding: 0 0.8rem;
        margin: 1.2rem auto;
    }

    .comments-section form {
        flex-direction: column;
    }

    .comments-section form .btn {
        width: 100%;
    }
}