body{
    background:#f5f6f8;
    color:#111;
    font-family:system-ui;
    margin:0;
}

/* HEADER */
.header{
    padding:12px;
    background:#fff;
    border-bottom:1px solid #ddd;
    position:sticky;
    top:0;
    z-index:10;
}

form{
    display:flex;
    gap:6px;
    flex-wrap:wrap;
}

input,select,button{
    padding:8px;
    border:1px solid #ccc;
    background:#fff;
    border-radius:6px;
}

button{
    background:#111;
    color:#fff;
    cursor:pointer;
}

/* LAYOUT */
.layout{
    display:flex;
    gap:12px;
}

.main{
    flex:1;
}

/* SIDEBAR DESKTOP */
.sidebar{
    width:280px;
    background:#fff;
    border-left:1px solid #ddd;
    padding:10px;
    position:sticky;
    top:70px;
    height:fit-content;
}

/* CONTAINER */
.container{
    max-width:900px;
    margin:auto;
}

/* CLUSTER */
.cluster{
    background:#fff;
    margin:10px;
    padding:12px;
    border-radius:10px;
    box-shadow:0 2px 6px rgba(0,0,0,0.05);
}

.title{
    font-weight:bold;
}

.score{
    float:right;
    font-size:12px;
    color:#666;
}

.meta{
    font-size:12px;
    margin-bottom:8px;
}

.article{
    font-size:14px;
    margin:6px 0;
}

.article-meta{
    font-size:11px;
    color:#777;
}

/* LINK */
a{
    color:#0a58ca;
    text-decoration:none;
}

a:hover{
    text-decoration:underline;
}

/* HIGHLIGHT */
mark{
    background:yellow;
}

/* TAG */
.tag{
    display:inline-block;
    font-size:11px;
    padding:2px 6px;
    margin:2px;
    border-radius:6px;
    background:#eee;
}

/* SENTIMENT */
.sentiment{
    padding:3px 8px;
    border-radius:20px;
    font-size:11px;
    font-weight:bold;
}

.pos{ background:#d4edda; }
.neg{ background:#f8d7da; }
.neu{ background:#e2e3e5; }

/* BAR */
.bar{
    height:6px;
    background:#ddd;
    border-radius:5px;
    overflow:hidden;
}

.bar-fill{
    height:100%;
}

.bar-pos{ background:#28a745; }
.bar-neg{ background:#dc3545; }
.bar-neu{ background:#6c757d; }

/* PAGINATION */
.pagination{
    display:flex;
    justify-content:space-between;
    padding:10px;
}

/* CARD */
.card{
    background:#f8f9fa;
    padding:8px;
    margin-bottom:10px;
    border-radius:8px;
}

/* =========================
   🔥 MOBILE MODE
========================= */
@media (max-width: 768px){

    .layout{
        flex-direction:column;
    }

    .container{
        max-width:100%;
    }

    .cluster{
        margin:8px;
    }

    /* SIDEBAR JADI BOTTOM SHEET */
    .sidebar{
        position:fixed;
        bottom:0;
        left:0;
        right:0;
        top:auto;
        width:auto;
        max-height:70%;
        overflow:auto;
        transform:translateY(100%);
        transition:0.3s;
        border-radius:16px 16px 0 0;
        box-shadow:0 -5px 20px rgba(0,0,0,0.15);
        z-index:999;
    }

    .sidebar.active{
        transform:translateY(0);
    }

    /* FLOAT BUTTON */
    .open-sidebar-btn{
        position:fixed;
        bottom:20px;
        right:20px;
        background:#111;
        color:#fff;
        border:none;
        padding:14px;
        border-radius:50%;
        font-size:16px;
        z-index:1000;
        cursor:pointer;
    }

    /* FORM FULL WIDTH */
    form{
        flex-direction:column;
    }

    input,select,button{
        width:100%;
    }
}