/* ==========================================
   Hayeon Archive - Fromm v1.0
   Matches Gallery Theme
========================================== */

.fromm-wrapper{
    max-width:1400px;
    margin:auto;
    padding:70px 40px;
}
/* ==========================================
   LAYOUT
========================================== */

.fromm-controls{
    display:flex;
    gap:20px;
    align-items:center;
    justify-content:space-between;
    flex-wrap:wrap;
    margin-bottom:40px;
}

.fromm-search{
    flex:1;
    min-width:260px;
    padding:14px 18px;
    border-radius:14px;
    border:1px solid var(--border);
    background:var(--card);
    color:var(--text);
    font-size:16px;
    outline:none;
    transition:.25s;
}

.fromm-search:focus{
    border-color:var(--mint);
    box-shadow:0 0 0 4px rgba(82,217,187,.15);
}

.language-filter{
    display:flex;
    gap:10px;
}

.lang-btn{

    display:flex;

    justify-content:center;

    align-items:center;

    min-width:90px;

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

    background:var(--card);

    color:var(--text);

    padding:12px 18px;

    border-radius:999px;

    cursor:pointer;

    font-weight:600;

    transition:
        background .25s ease,
        color .25s ease,
        border-color .25s ease,
        transform .2s ease,
        box-shadow .2s ease;

}

.lang-btn:hover{

    border-color:var(--mint);

    transform:translateY(-2px);

    box-shadow:0 4px 12px rgba(0,0,0,.08);

}

.lang-btn.active{

    background:var(--mint);

    border-color:var(--mint);

    color:#0f172a !important;

    font-weight:700;

    box-shadow:0 6px 18px rgba(82,217,187,.18);

}

.fromm-stats{

    display:grid;

    grid-template-columns:repeat(2,1fr);

    gap:14px;

}

.stat-card{

    background:rgba(255,255,255,.03);

    border:1px solid rgba(255,255,255,.05);

    border-radius:18px;

    padding:18px;

    text-align:center;

    transition:.25s;

}

.stat-card:hover{
    transform:translateY(-4px);
    border-color:var(--mint);
}

.stat-card h3{

    font-size:30px;

    margin-bottom:6px;

}

.stat-card p{
    color:var(--text-light);
}

.fromm-container{

    width:100%;

    display:flex;

    flex-direction:column;

    gap:24px;

}

.fromm-year,
.fromm-month{

    background:var(--card);

    border-radius:18px;

    border:1px solid rgba(82,217,187,.12);

}

.fromm-year-header,
.fromm-month-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:18px 24px;
    cursor:pointer;
    user-select:none;
    transition:.25s;
}

.fromm-year-header:hover,
.fromm-month-header:hover{
    background:rgba(82,217,187,.08);
}

.fromm-year-content,
.fromm-month-content{

    max-height:0;

    overflow:hidden;

    opacity:0;

    transition:
        max-height .35s ease,
        opacity .25s ease;

}

.fromm-year-content.open,
.fromm-month-content.open{

    padding:0 24px 24px;

    max-height:50000px;

    opacity:1;

}

.fromm-conversation{

    display:flex;

    flex-direction:column;

    gap:14px;

    margin:0;

    padding:0;

    background:none;

    border:none;

    border-radius:0;

    animation:conversationFade .22s ease;

}
/* ==========================================
   CONVERSATION CARD
========================================== */

.fromm-conversation-card{

    background:var(--card);

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

    border-radius:16px;

    margin-bottom:18px;

    overflow:hidden;

    box-shadow:0 4px 12px rgba(0,0,0,.08);

}

.fromm-conversation-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:18px 22px;

    cursor:pointer;

    transition:
        background .25s ease,
        transform .2s ease;

}

.fromm-conversation-header:hover{

    background:rgba(82,217,187,.08);

    transform:translateY(-2px);

}

.conversation-info{

    display:flex;

    flex-direction:column;

    gap:6px;

}

.conversation-info strong{

    color:var(--text);

    font-size:17px;

}

.conversation-info small{

    color:var(--text-light);

}

.conversation-media{

    display:flex;

    gap:14px;

    margin-top:4px;

    font-size:13px;

    color:var(--text-light);

}


.fromm-conversation-body{

    max-height:0;

    overflow:hidden;

    transition:
        max-height .3s ease;

}

.fromm-conversation-body::-webkit-scrollbar{

    width:10px;

}

.fromm-conversation-body::-webkit-scrollbar-track{

    background:transparent;

}

.fromm-conversation-body::-webkit-scrollbar-thumb{

    background:var(--mint);

    border-radius:999px;

}

.fromm-conversation-body::-webkit-scrollbar-thumb:hover{

    background:#44c8aa;

}
.message + .message{

    margin-top:10px;

}

/* ==========================================
   DATE SEPARATOR
========================================== */

.fromm-date-separator{

    display:flex;

    justify-content:center;

    align-items:center;

    margin:40px 0 20px;

    position:relative;

}

.fromm-date-separator::before,

.fromm-date-separator::after{

    content:"";

    flex:1;

    height:1px;

    background:var(--border);

}

.fromm-date-separator span{

    padding:0 18px;

    color:var(--text-light);

    font-size:14px;

    font-weight:600;

}

/* ==========================================
   SENDER GROUP
========================================== */

.sender-group{

    display:flex;

    flex-direction:column;

    margin-bottom:18px;

}

.sender-group.idol{
    align-items:flex-start;
}

.sender-group.fan{

    align-items:flex-end;

}
.sender-info{

    display:flex;

    align-items:flex-start;

    gap:10px;

    margin-bottom:6px;

}

.sender-group.fan .sender-info{

    flex-direction:row-reverse;

}
.sender-avatar{

width:42px;

height:42px;

    border-radius:50%;

    background-size:cover;

    background-position:center;

    background-repeat:no-repeat;

    flex-shrink:0;

}
.sender-group.idol .sender-avatar{

    background-image:url("../assets/fromm/avatar/hayeon.webp");

}

.sender-group.fan .sender-avatar{

    background-image:url("../assets/fromm/avatar/fan.webp");

}
.sender-meta{

    display:flex;

    flex-direction:column;

}
.sender-header{

    display:flex;

    align-items:center;

    gap:10px;

    margin-bottom:6px;

    font-size:13px;

    color:var(--text-light);

    font-weight:600;

}

.sender-group.fan .sender-header{

    flex-direction:row-reverse;

}

.sender-time{

    opacity:.65;

    font-size:12px;

}
.group-messages{

    display:flex;

    flex-direction:column;

    gap:2px;

    width:100%;

}
.message{

    position:relative;

    display:flex;

    flex-direction:column;

    gap:10px;

    align-self:flex-start;

    width:fit-content;

    max-width:min(88%,860px);

    padding:16px 20px;

    border-radius:20px;

    line-height:1.7;

    animation:fadeIn .25s ease;

    transition:
        transform .18s ease,
        background-color .25s ease,
        box-shadow .25s ease;

}

.message:hover{

    transform:translateY(-1px);

}
/* ==========================================
   CONNECTED CHAT BUBBLES
========================================== */

.message.single{

    border-radius:24px;

}

.message.first{

    margin-bottom:2px;

}

.message.middle{

    margin:2px 0;

}

.message.last{

    margin-top:2px;

}
/* ---------- HAYEON ---------- */

.message.idol.first{

    border-bottom-left-radius:8px;

}

.message.idol.middle{

    border-radius:10px;

    border-top-left-radius:8px;

    border-bottom-left-radius:8px;

}

.message.idol.last{

    border-top-left-radius:8px;

}
/* ---------- FAN ---------- */

.message.fan.first{

    border-bottom-right-radius:8px;

}

.message.fan.middle{

    border-radius:10px;

    border-top-right-radius:8px;

    border-bottom-right-radius:8px;

}

.message.fan.last{

    border-top-right-radius:8px;

}

.message-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    width:100%;

    gap:20px;

    font-size:12px;

    opacity:.65;

}

.message.idol{

    background:linear-gradient(
        180deg,
        rgba(82,217,187,.22),
        rgba(82,217,187,.12)
    );

    border:1px solid rgba(82,217,187,.20);

    margin-right:auto;

    box-shadow:none;

}

.message.fan{

    background:rgba(255,255,255,.035);

    border:1px solid rgba(255,255,255,.05);

    margin-left:auto;

    box-shadow:none;

}

.message-ko{

    font-weight:600;

    color:var(--text);

    transition:color .25s ease;

    margin-bottom:8px;

    white-space:pre-wrap;

}

.message-en{

    color:var(--text-light);

    transition:color .25s ease;

}
.message-content{

    display:flex;

    flex-direction:column;

    gap:10px;

}
.message-content:empty{

    display:none;

}
/* ==========================================
   SHARED MESSAGE MEDIA
========================================== */

.message-media{

    display:flex;

    flex-direction:column;

    gap:14px;

    margin-top:14px;

    width:fit-content;
    max-width:420px;

}

.message-image,
.message-video,
.message-voice{

    width:100%;

    border-radius:16px;

    overflow:hidden;

}

.message-image img{

    display:block;

    width:100%;

    max-width:100%;

    height:auto;

    border-radius:18px;

    cursor:pointer;

    transition:.25s;

}

.message-image img:hover{
    transform:scale(1.02);
}

/* ==========================================
   VIDEO
========================================== */

.message-video video{

    display:block;

    width:100%;

    max-width:100%;

    height:auto;

    border-radius:18px;

    background:#000;

}

/* ==========================================
   VOICE
========================================== */

.message-voice{

    display:flex;

    align-items:center;

    gap:12px;

    padding:10px 14px;

    max-width:100%;

    background:var(--card);

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

    border-radius:18px;

}

.voice-play{

    width:40px;

    height:40px;

    border:none;

    border-radius:50%;

    background:var(--mint);

    color:#111;

    cursor:pointer;

    display:flex;

    align-items:center;

    justify-content:center;

    font-size:16px;

    font-weight:700;

    flex-shrink:0;

    transition:
        transform .2s ease,
        box-shadow .2s ease;

}

.voice-play:hover{

    transform:scale(1.05);

    box-shadow:0 4px 14px rgba(82,217,187,.30);

}

.voice-progress{

    flex:1;

    cursor:pointer;

}
.voice-time{

    min-width:44px;

    text-align:right;

    font-size:13px;

    color:var(--text-light);

    font-variant-numeric:tabular-nums;

}

.message-voice-group{

    display:flex;

    flex-direction:column;

    gap:12px;

}
.hidden-ko .message-ko{display:none;}
.hidden-en .message-en{display:none;}

@keyframes fadeIn{
    from{opacity:0;transform:translateY(10px);}
    to{opacity:1;transform:none;}
}

/* ==========================================
   LIGHTBOX
========================================== */

#fromm-lightbox{

    position:fixed;
    inset:0;

    background:rgba(0,0,0,.92);

    display:flex;

    justify-content:center;

    align-items:center;

    opacity:0;

    pointer-events:none;

    transition:.25s;

    z-index:99999;

}

#fromm-lightbox.open{

    opacity:1;

    pointer-events:auto;

}

#fromm-lightbox img{

    max-width:90%;

    max-height:90%;

    border-radius:16px;

}


.archive-arrow{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    width:18px;

    height:18px;

    color:var(--mint);

    font-size:18px;

    flex-shrink:0;

    transition:transform .25s ease;

}

.archive-arrow.open{

    transform:rotate(90deg);

}

.notice-card{
    max-width:900px;
    margin:32px auto 48px;
    padding:24px 28px;

    background:var(--card);
    border:1px solid rgba(82,217,187,.15);
    border-left:5px solid var(--mint);
    border-radius:18px;

    box-shadow:0 4px 12px rgba(0,0,0,.08);
}

.notice-card h3{
    margin-bottom:16px;
    color:var(--mint);
    font-size:22px;
}

.notice-card p{
    margin:12px 0;
    line-height:1.7;
    color:var(--text-light);
}

/* ==========================================
   FROMM V3 LAYOUT
========================================== */

.fromm-layout{

    display:grid;

    grid-template-columns:280px minmax(0,1fr);

    gap:20px;

}

.fromm-sidebar{

    position:sticky;

    top:90px;

    display:flex;

    flex-direction:column;

    gap:18px;

    height:calc(100vh - 110px);

}

#fromm-sidebar{

    background:rgba(24,32,48,.72);

    backdrop-filter:blur(20px);

    border:1px solid rgba(255,255,255,.06);

    border-radius:22px;

    padding:18px;

    flex:1;

    min-height:180px;

    overflow:auto;

    scrollbar-width:thin;

}

#fromm-sidebar::-webkit-scrollbar{

    width:8px;

}

#fromm-sidebar::-webkit-scrollbar-thumb{

    background:rgba(82,217,187,.25);

    border-radius:999px;

}

.sidebar-placeholder{

    color:var(--text-light);

}

.fromm-viewer{

    background:rgba(20,28,42,.78);

    backdrop-filter:blur(18px);

    border-radius:24px;

    border:1px solid rgba(255,255,255,.06);

    padding:24px;

     height:calc(100vh - 110px);

    overflow:auto;

    overflow-x:hidden;

}

.fromm-topbar{
    
    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:20px;

    margin:40px 0;

position:sticky;
top:70px;
z-index:100;

background:rgba(20,28,42,.95);
backdrop-filter:blur(18px);

border-radius:18px;

padding:14px;
margin:-14px -14px 24px;

}

.fromm-topbar .fromm-search{

    flex:1;

}

@media (max-width:1300px){

.fromm-layout{

    grid-template-columns:clamp(220px,22vw,280px) minmax(0,1fr);

}

    .fromm-stats{

        gap:10px;

    }

    .stat-card{

        padding:14px;

    }

    .stat-card h3{

        font-size:26px;

    }

}


.viewer-placeholder{

    height:100%;

    min-height:700px;

    display:flex;

    justify-content:center;

    align-items:center;

    flex-direction:column;

}

.sidebar-date{

    width:100%;

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:14px 16px;

    margin-bottom:8px;

    background:transparent;

    border:none;

    border-radius:14px;

    color:var(--text);

    cursor:pointer;

    transition:.25s;

}

.sidebar-date:hover{

    background:rgba(82,217,187,.12);

    transform:translateX(6px);

}

.sidebar-date.active{

    background:rgba(82,217,187,.18);

    border:1px solid rgba(82,217,187,.35);

}

.timeline-toggle{

    display:none;

}

.timeline-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:20px;

}

.timeline-header h3{

    margin:0;

    font-size:20px;

}

#timeline-count{

    color:var(--mint);

    font-weight:700;

}

.timeline-year{

    margin-bottom:28px;

}

.timeline-year-title{

    display:flex;

    align-items:center;

    gap:12px;

    margin-bottom:16px;

    color:var(--mint);

    font-size:20px;

    font-weight:700;

}

.timeline-year-title::after{

    content:"";

    flex:1;

    height:1px;

    background:rgba(255,255,255,.08);

}

.timeline-month{

    margin-left:8px;

    margin-bottom:22px;

}

.timeline-month-title{

    text-transform:none;
    letter-spacing:1px;
    font-size:12px;
    font-weight:600;

    color:#7e8ca3;

    margin-bottom:10px;

}

.timeline-date{

    width:100%;

    display:flex;

    align-items:center;

    gap:12px;

    padding:12px 14px;

    margin-bottom:6px;

    background:none;

    border:none;

    border-radius:14px;

    color:var(--text);

    cursor:pointer;

    transition:.2s;

    font-size:15px;
font-weight:500;

}

.timeline-date::before{

    content:"";

    width:8px;

    height:8px;

    border-radius:50%;

    background:rgba(255,255,255,.18);

    transition:.2s;

}

.timeline-date:hover{

    background:rgba(82,217,187,.10);

}

.timeline-date:hover::before{

    background:var(--mint);

}

.timeline-date.active{

    background:rgba(82,217,187,.18);

    color:white;

}

.timeline-date.active::before{

    background:var(--mint);

    box-shadow:0 0 10px rgba(82,217,187,.5);

}

.conversation-header{

    position:sticky;

    top: -24px;

    margin:-24px -24px 24px;

    padding:24px;

    background:rgba(18,25,40,.98);

    backdrop-filter:blur(20px);

    border-bottom:1px solid rgba(255,255,255,.06);

    z-index:100;

}

.conversation-header h2{

    margin:0;

    font-size:30px;

    font-weight:700;

    letter-spacing:-.5px;

}

.conversation-header::after{

    content:"";

    display:block;

    margin-top:18px;

    height:1px;

    background:rgba(255,255,255,.06);

}

.viewer-info{

    display:flex;

    align-items:center;

    gap:10px;

    margin-top:8px;

    font-size:14px;

    color:#8fa0b7;

    letter-spacing:.3px;

}

.conversation-nav{

    display:flex;

    justify-content:space-between;

    gap:12px;

    margin-top:18px;

}

.nav-btn{

    padding:10px 18px;

    border:none;

    border-radius:12px;

    background:rgba(255,255,255,.04);

    color:var(--text);

    cursor:pointer;

    transition:.2s;

}

.nav-btn:hover:not(:disabled){

    background:rgba(82,217,187,.18);

}

.nav-btn:disabled{

    opacity:.35;

    cursor:default;

}

/* ==========================================
   Custom Scrollbars
========================================== */

.fromm-viewer::-webkit-scrollbar,
#fromm-sidebar::-webkit-scrollbar{

    width:10px;

}

.fromm-viewer::-webkit-scrollbar-track,
#fromm-sidebar::-webkit-scrollbar-track{

    background:transparent;

}

.fromm-viewer::-webkit-scrollbar-thumb,
#fromm-sidebar::-webkit-scrollbar-thumb{

    background:rgba(82,217,187,.22);

    border-radius:999px;

    border:2px solid transparent;

    background-clip:padding-box;

}

.fromm-viewer::-webkit-scrollbar-thumb:hover,
#fromm-sidebar::-webkit-scrollbar-thumb:hover{

    background:rgba(82,217,187,.45);

    background-clip:padding-box;

}

.fromm-viewer,
#fromm-sidebar{

    scrollbar-width:thin;

    scrollbar-color:rgba(82,217,187,.35) transparent;

}

@keyframes conversationFade{

    from{

        opacity:0;

        transform:translateY(8px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}

.timeline-arrow{

    display:inline-block;

    width:18px;

    color:var(--mint);

    font-size:12px;

    transition:.2s;

}

.mobile-language-filter{

    display:none;

}

/* ==========================================
   NOTICE
========================================== */

.fromm-notice{

    margin:0 0 36px;

}

.notice-card{

    max-width:760px;

    margin:0 auto;

    padding:24px 28px;

    background:var(--card);

    border:1px solid rgba(82,217,187,.25);

    border-left:4px solid var(--mint);

    border-radius:20px;

    text-align:center;

    box-shadow:var(--shadow);

}

.notice-card h3{

    margin:0 0 16px;

    color:var(--mint);

    font-size:28px;

}

.notice-card p{

    margin:10px 0;

    color:var(--muted);

    line-height:1.8;

}

.notice-small{

    font-size:14px;

    opacity:.9;

    font-style:italic;

}

/* ==========================================
   MOBILE
========================================== */

@media (max-width:768px){

    .fromm-wrapper{

        padding:24px 16px;

    }

    .fromm-topbar{

        
        flex-direction:column;

        align-items:stretch;

        gap:14px;

        margin:24px 0;

    }

    .language-filter{

        display:grid;

        grid-template-columns:repeat(3,1fr);

        gap:10px;

    }

    .lang-btn{

        min-width:0;

        padding:12px;

    }

.fromm-layout{

    display:flex;

    flex-direction:column;

    gap:0;

}

    .fromm-sidebar{

        position:static;

        top:auto;

            display:flex;

    flex-direction:column;

    }

#fromm-sidebar:not(.collapsed){

    margin-bottom:20px;

}

#fromm-sidebar{

    margin-bottom:20px;

    transition:
        max-height .3s ease,
        margin-bottom .3s ease;

}

#fromm-sidebar.collapsed{

    max-height:64px;

    margin-bottom:0;

}

.fromm-viewer{

    margin-top:0;

    height:calc(100vh - 120px);

    overflow:auto;

}

    .fromm-stats{

        grid-template-columns:repeat(2,1fr);

        gap:16px;

    }

    .stat-card{

        padding:18px;

    }

    .stat-card h3{

        font-size:32px;

    }

.conversation-header{

    top:-24px;

    margin:-24px -18px 18px;

    padding-top:24px;

}

    .conversation-header h2{

        font-size:24px;

    }

    .message{

        width:94%;

        max-width:none;

        padding:14px 16px;

    }

    .sender-avatar{

        width:38px;

        height:38px;

    }

    .fromm-conversation{

        padding:16px 0;

    }

    .message-image img,

    .message-video video{

        width:100%;

        max-width:none;

    }

    .message-voice{

        width:100%;

    }

    .timeline-date{

        min-height:48px;

        padding:14px 16px;

    }

}

.timeline-actions{

    display:flex;

    align-items:center;

    gap:10px;

}

.timeline-action{

    border:none;

    background:rgba(82,217,187,.12);

    color:var(--mint);

    border-radius:999px;

    padding:6px 12px;

    cursor:pointer;

    font-size:12px;

    transition:.2s;

}

.timeline-action:hover{

    background:rgba(82,217,187,.25);

}

.timeline-date-title{

    display:flex;

    flex-direction:column;

    font-weight:500;

}

.timeline-match-count{

    display:block;

    margin-top:2px;

    font-size:11px;

    color:var(--mint);

    opacity:.8;

}

.timeline-toggle{

    display:flex;

    justify-content:space-between;

    align-items:center;

    width:100%;

    padding:14px 18px;

    margin-bottom:16px;

    background:rgba(82,217,187,.12);

    border:1px solid rgba(82,217,187,.18);

    border-radius:14px;

    color:var(--text);

    font-size:16px;

    font-weight:600;

    cursor:pointer;

}

#timeline-content{

    overflow:hidden;

}

#fromm-sidebar.collapsed{

    max-height:64px;

}

#timeline-content.collapsed{

    display:none;

}

.timeline-header{

    margin-bottom:12px;

}

.mobile-language-filter{

    display:grid;

    grid-template-columns:repeat(3,1fr);

    gap:10px;

    margin:14px 0 8px;

}

.mobile-language-filter .lang-btn{

    min-width:0;

    padding:10px;

}

.notice-card{

    padding:20px 18px;

}

.notice-card h3{

    font-size:24px;

}

.notice-card p{

    font-size:14px;

}