/* =========================================================
   jacksonchat.lol — Vaporwave theme + wider layout
   ========================================================= */

:root{
    --bg:#0b0820; --bg2:#120c2f; --fg:#f8eefe; --muted:#cdb9ff;
    --card:#1a1440aa; --border:#3a2a6b; --ring:#ff80e5; --link:#7df9ff;
    --mine:linear-gradient(180deg,#ff73e8,#e056c6);
    --theirs:linear-gradient(180deg,#6b5bff,#4439d6);
    --btn:#22194b; --btn-border:#4c3b86; --warn:#ffcc00; --danger:#ff5b7f;
}

.light{
    --bg:#ffe9fb; --bg2:#fff; --fg:#201433; --muted:#634b93;
    --card:#ffffffcc; --border:#e6d9ff; --ring:#cc2ea4; --link:#0b7890;
    --mine:linear-gradient(180deg,#f95ad6,#d73bb6);
    --theirs:linear-gradient(180deg,#6e62ff,#4b42e0);
    --btn:#fff; --btn-border:#e6d9ff; --warn:#9a7b00; --danger:#b81a47;
}

*{ box-sizing:border-box }
html,body{ height:100% }

body{
    margin:0;
    font:15px/1.45 system-ui, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    color:var(--fg);
    background:
            radial-gradient(1200px 700px at -10% -20%, #ff7ad9 0%, transparent 55%),
            radial-gradient(1200px 700px at 120% 10%, #7df9ff 0%, transparent 55%),
            radial-gradient(1100px 600px at 50% 120%, #9b7bff 0%, transparent 60%),
            linear-gradient(180deg, var(--bg2), var(--bg) 60%);
    display:grid;
    place-items:center;
    padding:28px;
    transition:background .3s,color .3s;
}

/* ---------- container ---------- */
.wrap{ width:min(1280px,95vw) }               /* wider than before (was 960px) */

.topbar{
    display:flex; flex-wrap:wrap; gap:10px;
    align-items:center; justify-content:space-between;
    margin-bottom:12px; color:var(--muted); font-size:14px;
}
.left,.right{ display:flex; gap:8px; align-items:center }
.pill,.badge{
    display:inline-flex; gap:6px; align-items:center;
    padding:6px 10px; border:1px solid var(--border);
    border-radius:999px; background:linear-gradient(180deg,transparent,#ffffff07)
}
.btn{
    appearance:none; border:1px solid var(--btn-border); background:var(--btn);
    color:var(--fg); padding:9px 12px; border-radius:12px; cursor:pointer
}
.btn:hover{ border-color:var(--ring) }

/* ---------- card ---------- */
.card{
    background:linear-gradient(180deg,var(--card),color-mix(in oklab,var(--card) 70%,transparent));
    border:1px solid var(--border); border-radius:18px;
    box-shadow:0 20px 60px rgba(0,0,0,.35); overflow:hidden
}
.header{
    padding:12px 14px; border-bottom:1px solid var(--border);
    display:flex; align-items:center; justify-content:space-between; gap:10px
}
.typing{ font-size:12px; color:var(--muted) }

/* ---------- main layout: chat + sidebar ---------- */
.main{
    display:grid;
    grid-template-columns: 1fr 260px;  /* chat grows, sidebar fixed */
    gap:16px;
    align-items:stretch;
    height:520px;                      /* unified height for chat area */
    padding:12px 14px;
}

/* chat pane */
.chat{
    height:100%;
    overflow:auto;
    padding:16px;
    scroll-behavior:smooth;
    background:linear-gradient(180deg,transparent,rgba(255,255,255,0.03));
    border-radius:12px;
}

/* sidebar */
.sidebar{
    border-left:1px solid var(--border);
    padding-left:12px;
    overflow:auto;
}
.sidebar-title{
    display:flex; align-items:center; justify-content:space-between;
    font-size:13px; color:var(--muted); margin-bottom:6px
}
.user{
    display:flex; align-items:center; justify-content:space-between;
    gap:8px; padding:8px; border:1px solid var(--border);
    border-radius:10px; background:linear-gradient(180deg,transparent,#ffffff07);
    margin:6px 0
}
.user .who{ display:flex; align-items:center; gap:8px; min-width:0; flex:1 }
.dot{
    width:8px; height:8px; border-radius:50%;
    background:#3bd671; box-shadow:0 0 0 3px color-mix(in oklab,#3bd671 30%,transparent)
}
.typing-dot{
    width:8px; height:8px; border-radius:50%;
    background:#ffd34d; box-shadow:0 0 0 3px color-mix(in oklab,#ffd34d 30%,transparent)
}
.me-badge{
    font-size:11px; color:var(--muted); border:1px solid var(--border);
    padding:2px 6px; border-radius:999px
}
.mutebtn{
    appearance:none; cursor:pointer; border:1px solid var(--btn-border);
    background:var(--btn); color:var(--fg); padding:4px 8px; border-radius:8px
}
.user.muted{ opacity:.6 }
.name-clip{
    max-width:160px;                    /* more room for names */
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis
}

/* ---------- composer (WIDE TEXTBOX) ---------- */
.row{
    display:grid;
    grid-template-columns: auto 1fr auto;   /* attach | textarea | send */
    gap:8px;
    padding:12px;
    border-top:1px solid var(--border);
}
.row .input{
    width:100%;
    min-height:60px;                      /* taller textbox */
    padding:12px;
    border:1px solid var(--border);
    background:transparent;
    color:var(--fg);
    border-radius:12px;
    outline:none;
    resize:vertical;                      /* allow drag to grow */
}
.row .input:focus{
    border-color:var(--ring);
    box-shadow:0 0 0 3px color-mix(in oklab,var(--ring) 30%,transparent)
}
.row .btn{
    height:44px;                          /* align with textbox nicely */
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0 12px;
}

.limits{
    font-size:12px; color:var(--muted);
    display:flex; gap:10px; align-items:center; justify-content:space-between;
    padding:0 12px 12px
}
.warn{ color:var(--warn) }

/* ---------- bubbles ---------- */
.bubble{
    max-width:72%;
    padding:10px 12px; border-radius:16px; margin:8px 0;
    word-wrap:break-word; white-space:pre-wrap; position:relative; color:white
}
.mine{ margin-left:auto; background:var(--mine) }
.theirs{ background:var(--theirs) }
.name{ font-size:12px; opacity:.9; margin-bottom:4px; cursor:pointer }
.meta{ font-size:11px; opacity:.85; margin-left:8px }
.system{ opacity:.85; font-style:italic; text-align:center; margin:10px 0 }
.link{ color:var(--link) }

/* ---------- Minecraft-style logo (with subtle motion) ---------- */
.mc-wrap{ display:flex; align-items:center; gap:12px; margin-bottom:10px }
.mc-logo{ position:relative; line-height:1; user-select:none; transform-origin:center }
.mc-main{
    font-weight:900; font-size:22px; letter-spacing:1.5px; text-transform:uppercase;
    padding:2px 8px; background:linear-gradient(#8cd05a,#5ea932);
    border:2px solid #2b4f1d; border-radius:6px; color:#1a2b10;
    text-shadow:0 1px 0 #d5ffb2, 0 0 2px rgba(0,0,0,.2), 2px 2px 0 #304d1e;
    box-shadow: inset 0 -6px 0 rgba(0,0,0,.15), 0 4px 0 #203914
}
.mc-banner{
    position:absolute; left:6px; right:6px; top:100%;
    transform:translateY(6px);
    font-size:11px; font-weight:700; text-align:center;
    background:linear-gradient(#d8d8d8,#bdbdbd);
    border:2px solid #7a7a7a; border-radius:4px; padding:2px 6px; color:#222; letter-spacing:.6px;
    box-shadow:0 2px 0 #666
}
.mc-splash{
    position:absolute; right:-110px; top:-10px; transform:rotate(-15deg);
    background:#ffd400; color:#1b1b1b; font-weight:900;
    padding:4px 8px; border-radius:999px; font-size:12px; box-shadow:0 3px 0 #d3a600; white-space:nowrap
}

/* gentle bob + breathe like the X360 menu */
.mc-logo.animate{
    animation: bob 5s ease-in-out infinite alternate, breathe 6s ease-in-out infinite;
}
@keyframes bob { from{ transform:translateY(-2px) } to{ transform:translateY(2px) } }
@keyframes breathe { 0%{ filter:drop-shadow(0 0 0 rgba(255,128,229,.0)) scale(1)}
    50%{ filter:drop-shadow(0 0 10px rgba(255,128,229,.25)) scale(1.02)}
    100%{ filter:drop-shadow(0 0 0 rgba(255,128,229,.0)) scale(1)}
}

/* ---------- scrollbars (subtle) ---------- */
.chat::-webkit-scrollbar,
.sidebar::-webkit-scrollbar{ width:10px }
.chat::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb{
    background:color-mix(in oklab, var(--border) 70%, transparent);
    border-radius:999px
}

/* ---------- responsive tweaks ---------- */
@media (max-width: 1024px){
    .wrap{ width:min(1000px,96vw) }
    .main{ grid-template-columns: 1fr 240px }
    .name-clip{ max-width:130px }
}
@media (max-width: 820px){
    .wrap{ width: 96vw }
    .main{
        grid-template-columns: 1fr;           /* stack */
        height:auto;
    }
    .sidebar{
        border-left:none; border-top:1px solid var(--border);
        padding:12px 0 0; margin-top:8px; max-height:260px
    }
    .chat{ height:420px }
}


/* DM unread badge */
.dm-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:#ff4d6d;
    color:#fff;
    border-radius:999px;
    font-size:11px;
    line-height:1;
    padding:2px 6px;
    margin-left:6px;
    border:1px solid color-mix(in oklab, #000 20%, transparent);
    box-shadow:0 1px 0 rgba(0,0,0,.2);
}
