:root{
    --bg:#f5f7ff;
    --panel:#ffffff;
    --panel2:#f8f9ff;

    --text:#1a1a1a;
    --muted:#6b7280;

    --purple:#7c5cff;
    --purpleDark:#4a2475;
    --blue:#3aa0ff;

    --line:#e7e9f5;
    --shadow:0 10px 25px rgba(20,20,40,0.08);
}

/* ================= GLOBAL ================= */
body{
    margin:0;
    font-family:"Segoe UI", system-ui, sans-serif;
    background:var(--bg);
    color:var(--text);
}

/* PAGE WRAP */
.main{
    margin-top:60px;
    padding:26px;
    margin-bottom:20px;
}

/* ================= LAYOUT (FIX HEIGHT) ================= */
.layout{
    display:grid;
    grid-template-columns:360px 1fr;
    gap:20px;

    align-items:stretch;
    min-height:calc(100vh - 80px);
}

/* BOTH PANELS SAME HEIGHT */
.leftPanel,
.rightPanel{
    height:100%;
    display:flex;
    flex-direction:column;
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:18px;
    box-shadow:var(--shadow);
}

/* ================= LEFT PANEL ================= */
.leftPanel{
    padding:16px;
    overflow:hidden;
}

/* HEADER */
.panelHeader h2{
    margin:0;
    font-size:20px;
}

.panelHeader p{
    margin:6px 0 10px;
    font-size:12px;
    color:var(--muted);
}

/* SEARCH */
#searchInput{
    width:100%;
    padding:12px;
    border-radius:12px;
    border:1px solid var(--line);
    background:#f9faff;
    outline:none;
    transition:0.2s;
}

#searchInput:focus{
    border-color:var(--purple);
    box-shadow:0 0 0 3px rgba(124,92,255,0.15);
}

/* FILTER TABS */
.tabs{
    display:flex;
    gap:6px;
    margin:14px 0;
}

.tab{
    flex:1;
    padding:8px;
    font-size:11px;
    border-radius:10px;
    border:1px solid var(--line);
    background:#f7f8ff;
    color:var(--muted);
    cursor:pointer;
    transition:0.2s;
}

.tab:hover{
    transform:translateY(-2px);
    border-color:var(--purple);
    color:var(--text);
}

.tab.active{
    background:#4a2475;
    color:white;
    border:none;
    box-shadow:0 8px 18px rgba(124,92,255,0.2);
}

/* EVENT LIST AREA */
.leftPanel{
    overflow:hidden;
}

.leftPanelContent{
    flex:1;
    overflow-y:auto;
    padding-right:6px;
}

/* EVENT CARD */
.eventCard{
    display:flex;
    flex-direction:column;
    gap:4px;
    padding:14px;
    margin-bottom:10px;
    border-radius:14px;
    background:#ffffff;
    border:1px solid var(--line);
    text-decoration:none;
    color:var(--text);
    position:relative;
    transition:0.2s;
}

.eventCard:hover{
    transform:translateY(-2px);
    border-color:rgba(124,92,255,0.4);
    box-shadow:0 6px 18px rgba(0,0,0,0.05);
}

.eventCard.active{
    background:rgba(124,92,255,0.06);
}

/* TEXT */
.title{
    font-size:13px;
    font-weight:600;
    margin-bottom: 4px;
    line-height: 1.4;
}

.club{
    font-size:11px;
    color: var(--muted);
    margin-bottom: 3px;
    line-height: 1.3;
}

.date{
    font-size:10px;
    color: var(--muted);
    line-height: 1.2;
}

/* DOT */
.liveDot{
    position:absolute;
    right:12px;
    top:50%;
    width:8px;
    height:8px;
    border-radius:50%;
    background:var(--blue);
    box-shadow:0 0 8px rgba(58,160,255,0.4);
}

.badge{
    position:absolute;
    right:12px;
    top:12px;
    background:var(--purple);
    color:white;
    font-size:10px;
    padding:4px 7px;
    border-radius:20px;
    min-width:18px;
    text-align:center;
    box-shadow:0 6px 12px rgba(124,92,255,0.3);
    display:none;
}
/* ================= RIGHT PANEL ================= */
.rightPanel{
    padding:18px;
    overflow:hidden;
}

/* HEADER */
.rightHeader{
    display:flex;
    justify-content:space-between;
    align-items:center;

    padding-bottom:10px;
    margin-bottom:14px;

    border-bottom:1px solid var(--line);

    position:sticky;
    top:0;
    background:rgba(255,255,255,0.9);
    backdrop-filter:blur(8px);
}

.rightHeader h3{
    margin:0;
    font-size:15px;
    color:#4a2475;
}

/* MESSAGE LIST AREA */
.messageList{
    flex:1;
    overflow-y:auto;
    padding-right:6px;
}

/* MESSAGE CARD */
.msgCard{
    background:white;
    border-radius:14px;
    padding:14px;
    margin-bottom:12px;
    border:1px solid var(--line);
    box-shadow:0 6px 16px rgba(0,0,0,0.04);
    transition:0.2s;
}

.msgCard:hover{
    transform:translateY(-2px);
    box-shadow:0 10px 25px rgba(0,0,0,0.08);
}

/* META */
.meta{
    display:flex;
    justify-content:space-between;
    font-size:12px;
    color: black;
    margin-bottom:8px;
    font-weight:500px;
}

/* TEXT */
.text{
    font-size:13px;
    line-height:1.6;
}

/* FILE BUTTON */
.fileBtn{
    display:inline-block;
    margin-top:10px;
    padding:7px 12px;
    background:linear-gradient(135deg, var(--purple), var(--purpleDark));
    color:white;
    border-radius:10px;
    font-size:11px;
    text-decoration:none;
}

/* IMAGE */
.thumb{
    margin-top:10px;
    width:100%;
    max-width:260px;
    border-radius:12px;
    cursor:pointer;
    border:1px solid var(--line);
}

/* ================= MODAL ================= */
.imgModal{
    position:fixed;
    inset:0;
    display:none;
    justify-content:center;
    align-items:center;
    background:rgba(0,0,0,0.75);
    z-index:9999;
}

.imgModal.show{
    display:flex;
}

.imgBox{
    position:relative;
    display:inline-block;
}

.imgBox img{
    max-width:90vw;
    max-height:85vh;
    border-radius:14px;
    box-shadow:0 10px 30px rgba(0,0,0,0.3);
}

.closeBtn {
    position: absolute;
    top: 12px;
    right: 12px;

    width: 34px;
    height: 34px;

    border: none;
    border-radius: 50%;

    background: rgba(0,0,0,0.6);
    color: #fff;

    font-size: 18px;
    font-weight: 900;
    line-height: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    z-index: 10;

    transition: 0.2s ease;
}

.closeBtn:hover {
    background: rgba(239, 68, 68, 0.9);
    transform: rotate(90deg) scale(1.1);
}