.research-page{
    width:100%;
    max-width:1180px;
    margin:0 auto;
    padding:52px 20px 90px;
}

.research-gate,
.research-hero,
.research-status-panel,
.research-controls,
.research-debug,
.research-shell{
    border:1px solid var(--line);
    border-radius:var(--radius);
    background:
        linear-gradient(160deg,rgba(12,24,48,.8),rgba(3,7,16,.96)),
        var(--panel-deep);
    box-shadow:0 0 0 1px rgba(103,179,255,.04),var(--shadow);
}

.research-gate{
    position:relative;
    overflow:hidden;
    max-width:760px;
    margin:70px auto 40px;
    padding:38px;
}

.research-gate::before{
    position:absolute;
    inset:-1px;
    background:radial-gradient(circle at 50% 0,rgba(59,130,246,.2),transparent 50%);
    content:"";
    pointer-events:none;
}

.research-gate>*{
    position:relative;
}

.research-gate h1{
    color:var(--blue2);
    font-size:54px;
    line-height:1;
    margin-top:16px;
    text-shadow:0 0 24px rgba(103,179,255,.28);
}

.research-gate p{
    color:var(--muted-strong);
    margin-top:14px;
}

.research-gate-form{
    display:grid;
    gap:12px;
    margin-top:26px;
}

.research-gate-form label{
    color:var(--cyan);
    font-family:Consolas,monospace;
    font-size:12px;
    text-transform:uppercase;
}

.research-gate-controls{
    display:grid;
    grid-template-columns:1fr auto;
    gap:10px;
}

.research-gate-controls input{
    width:100%;
    min-height:54px;
    border:1px solid rgba(103,179,255,.28);
    border-radius:var(--radius);
    outline:none;
    background:rgba(2,6,14,.82);
    color:var(--text);
    font-family:Consolas,monospace;
    font-size:16px;
    padding:0 16px;
}

.research-gate-controls input:focus{
    border-color:var(--cyan);
    box-shadow:0 0 22px rgba(103,179,255,.16);
}

.research-gate-controls button{
    border:1px solid rgba(103,179,255,.42);
    border-radius:var(--radius);
    background:linear-gradient(180deg,rgba(59,130,246,.92),rgba(29,78,216,.92));
    color:var(--text);
    cursor:pointer;
    font-weight:800;
    padding:0 20px;
    transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}

.research-gate-controls button:hover,
.research-gate-controls button:focus-visible{
    border-color:rgba(128,215,255,.7);
    box-shadow:0 0 24px rgba(59,130,246,.28);
    transform:translateY(-1px);
}

.research-gate-error{
    color:var(--cyan);
    font-family:Consolas,monospace;
}

.research-hero{
    overflow:hidden;
    position:relative;
    padding:42px 28px;
    text-align:center;
}

.research-hero::before{
    position:absolute;
    inset:-1px;
    background:radial-gradient(circle at 50% 0,rgba(59,130,246,.2),transparent 46%);
    content:"";
    pointer-events:none;
}

.research-hero>*{
    position:relative;
}

.research-hero h1{
    color:var(--blue2);
    font-size:76px;
    line-height:1;
    text-shadow:0 0 24px rgba(103,179,255,.32);
}

.research-subtitle{
    color:var(--text);
    font-size:22px;
    margin-top:14px;
}

.research-copy{
    color:var(--muted-strong);
    margin-top:4px;
}

.research-status-strip{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:10px;
    margin-top:22px;
}

.research-status-strip span{
    border:1px solid rgba(103,179,255,.24);
    border-radius:999px;
    color:var(--cyan);
    font-family:Consolas,monospace;
    font-size:12px;
    padding:7px 10px;
}

.research-status-panel{
    display:grid;
    grid-template-columns:minmax(180px,.7fr) 1fr;
    gap:22px;
    margin:24px 0;
    padding:22px;
}

.research-status-panel h2{
    color:var(--blue2);
    font-size:30px;
    line-height:1;
    margin-top:8px;
}

.research-status-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(120px,1fr));
    gap:12px;
    margin:0;
}

.research-status-grid div{
    border:1px solid rgba(103,179,255,.15);
    border-radius:12px;
    background:rgba(2,6,14,.38);
    padding:12px;
}

.research-status-grid dt{
    color:var(--muted);
    font-size:12px;
}

.research-status-grid dd{
    color:var(--text);
    font-family:Consolas,monospace;
    font-size:15px;
    font-weight:800;
    margin:6px 0 0;
}

.research-controls{
    display:grid;
    gap:14px;
    margin:24px 0;
    padding:20px;
}

.research-search-label{
    color:var(--cyan);
    font-family:Consolas,monospace;
    font-size:12px;
    text-transform:uppercase;
}

.research-controls input{
    width:100%;
    min-height:54px;
    border:1px solid rgba(103,179,255,.28);
    border-radius:var(--radius);
    outline:none;
    background:rgba(2,6,14,.82);
    color:var(--text);
    font-family:Consolas,monospace;
    font-size:16px;
    padding:0 16px;
}

.research-controls input:focus{
    border-color:var(--cyan);
    box-shadow:0 0 22px rgba(103,179,255,.16);
}

.research-filters{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}

.research-filter{
    border:1px solid rgba(103,179,255,.22);
    border-radius:var(--radius);
    background:rgba(59,130,246,.08);
    color:var(--muted-strong);
    padding:8px 11px;
    transition:background .2s ease,border-color .2s ease,color .2s ease;
}

.research-filter.is-laboratory,
.research-badge.is-laboratory{
    border-color:rgba(180,120,255,.48);
    color:#cba6ff;
}

.research-badge.is-official{
    border-color:rgba(128,215,255,.42);
    color:var(--cyan);
}

.research-badge.is-team{
    border-color:rgba(96,165,250,.4);
    color:#93c5fd;
}

.research-badge.is-builders{
    border-color:rgba(90,242,155,.35);
    color:var(--green);
}

.research-badge.is-protocols{
    border-color:rgba(56,189,248,.4);
    color:#7dd3fc;
}

.research-badge.is-funds{
    border-color:rgba(250,204,21,.34);
    color:#fde68a;
}

.research-badge.is-community{
    border-color:rgba(165,180,252,.34);
    color:#c7d2fe;
}

.research-filter.is-laboratory[aria-pressed="true"]{
    background:rgba(139,92,246,.22);
    box-shadow:0 0 18px rgba(139,92,246,.18);
}

.research-filter[aria-pressed="true"]{
    border-color:rgba(128,215,255,.55);
    background:rgba(59,130,246,.22);
    color:var(--text);
}

.research-debug{
    margin:0 0 24px;
    padding:18px;
}

.research-debug pre{
    overflow:auto;
    margin:10px 0 0;
    color:var(--muted-strong);
    font-family:Consolas,monospace;
    font-size:12px;
    white-space:pre-wrap;
}

.research-shell{
    padding:24px;
}

.research-shell-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
    border-bottom:1px solid rgba(103,179,255,.18);
    margin-bottom:18px;
    padding-bottom:18px;
}

.research-shell-header h2{
    color:var(--blue2);
    font-size:34px;
    line-height:1;
}

.research-count{
    color:var(--cyan);
    font-family:Consolas,monospace;
    font-size:12px;
    white-space:nowrap;
}

.research-feed{
    display:grid;
    gap:14px;
    min-width:0;
}

.research-card{
    border:1px solid rgba(103,179,255,.2);
    border-radius:var(--radius);
    background:rgba(5,10,22,.78);
    padding:18px;
    width:100%;
    min-width:0;
    max-width:100%;
    overflow:hidden;
    animation:researchIn .28s ease both;
    transition:border-color .2s ease,box-shadow .2s ease;
}

.research-card:hover{
    border-color:rgba(128,215,255,.42);
    box-shadow:0 0 20px rgba(59,130,246,.14);
}

.research-card.is-laboratory{
    border-color:rgba(180,120,255,.34);
    box-shadow:0 0 24px rgba(139,92,246,.1);
}

.research-card-header{
    display:flex;
    align-items:flex-start;
    gap:12px;
    margin-bottom:12px;
}

.research-avatar{
    display:grid;
    width:46px;
    height:46px;
    place-items:center;
    border:1px solid rgba(103,179,255,.28);
    border-radius:999px;
    background:rgba(2,5,12,.8);
    color:var(--cyan);
    flex:0 0 auto;
    font-family:Consolas,monospace;
    font-weight:800;
    overflow:hidden;
}

.research-avatar img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.research-identity{
    min-width:0;
    max-width:100%;
}

.research-name-row{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:8px;
}

.research-author{
    color:var(--text);
    font-weight:800;
    overflow-wrap:anywhere;
}

.research-username,
.research-time,
.research-network{
    color:var(--muted);
    font-family:Consolas,monospace;
    font-size:12px;
}

.research-badge{
    border:1px solid rgba(103,179,255,.26);
    border-radius:999px;
    color:var(--cyan);
    font-family:Consolas,monospace;
    font-size:11px;
    padding:4px 7px;
    text-transform:uppercase;
}

.research-network,
.research-partner{
    border:1px solid rgba(103,179,255,.18);
    border-radius:999px;
    color:var(--muted-strong);
    font-family:Consolas,monospace;
    font-size:11px;
    padding:4px 7px;
}

.research-verified{
    border:1px solid rgba(90,242,155,.34);
    border-radius:999px;
    color:var(--green);
    font-family:Consolas,monospace;
    font-size:10px;
    padding:3px 6px;
}

.research-badge.is-partner{
    border-color:rgba(90,242,155,.35);
    color:var(--green);
}

.research-partner{
    border-color:rgba(90,242,155,.35);
    color:var(--green);
}

.research-text{
    color:var(--muted-strong);
    white-space:pre-wrap;
    overflow-wrap:anywhere;
    word-break:break-word;
}

.research-media{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:10px;
    margin-top:12px;
    min-width:0;
    max-width:100%;
}

.research-media-button{
    position:relative;
    overflow:hidden;
    width:100%;
    min-width:0;
    min-height:180px;
    border:1px solid rgba(103,179,255,.18);
    border-radius:var(--radius);
    background:
        linear-gradient(110deg,rgba(59,130,246,.05),rgba(128,215,255,.12),rgba(59,130,246,.05));
    cursor:zoom-in;
    padding:0;
}

.research-media-button::before{
    position:absolute;
    inset:0;
    background:linear-gradient(90deg,transparent,rgba(128,215,255,.08),transparent);
    animation:researchShimmer 1.8s ease-in-out infinite;
    content:"";
}

.research-media-button img{
    position:relative;
    display:block;
    width:100%;
    height:100%;
    max-height:360px;
    opacity:0;
    object-fit:cover;
    transition:opacity .25s ease,transform .25s ease;
}

.research-media-button img.is-loaded{
    opacity:1;
}

.research-media-button:hover img{
    transform:scale(1.015);
}

.research-video{
    width:100%;
    max-width:100%;
    max-height:360px;
    border:1px solid rgba(103,179,255,.18);
    border-radius:var(--radius);
    object-fit:cover;
}

.research-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:12px;
    border-top:1px solid rgba(103,179,255,.14);
    margin-top:14px;
    padding-top:12px;
}

.research-stats{
    color:var(--muted);
    font-family:Consolas,monospace;
    font-size:12px;
}

.research-open{
    border:1px solid rgba(103,179,255,.32);
    border-radius:var(--radius);
    color:var(--blue2);
    font-family:Consolas,monospace;
    padding:8px 11px;
    text-decoration:none;
    transition:border-color .2s ease,box-shadow .2s ease;
}

.research-open:hover{
    border-color:rgba(128,215,255,.55);
    box-shadow:0 0 16px rgba(59,130,246,.18);
}

.research-empty{
    border:1px solid rgba(103,179,255,.18);
    border-radius:var(--radius);
    background:rgba(2,5,12,.78);
    color:var(--muted-strong);
    font-family:Consolas,monospace;
    padding:18px;
}

.research-sentinel{
    height:1px;
}

.research-modal{
    position:fixed;
    inset:0;
    z-index:1000;
    display:grid;
    place-items:center;
    background:rgba(1,5,12,.88);
    backdrop-filter:blur(14px);
    padding:28px;
}

.research-modal[hidden]{
    display:none;
}

.research-modal img{
    max-width:min(1100px,94vw);
    max-height:88vh;
    border:1px solid rgba(128,215,255,.38);
    border-radius:var(--radius);
    box-shadow:0 0 40px rgba(59,130,246,.28);
    object-fit:contain;
}

.research-modal-close{
    position:absolute;
    top:18px;
    right:18px;
    width:42px;
    height:42px;
    border:1px solid rgba(103,179,255,.35);
    border-radius:999px;
    background:rgba(2,6,14,.86);
    color:var(--text);
    cursor:pointer;
    font-size:26px;
}

.research-modal-open{
    overflow:hidden;
}

@keyframes researchIn{
    from{
        opacity:0;
        transform:translateY(8px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

@keyframes researchShimmer{
    from{
        transform:translateX(-100%);
    }
    to{
        transform:translateX(100%);
    }
}

@media(max-width:700px){
    .research-page{
        overflow-x:hidden;
        padding:42px 12px 72px;
    }

    .research-gate{
        margin-top:28px;
        padding:24px;
    }

    .research-gate h1{
        font-size:38px;
    }

    .research-gate-controls{
        grid-template-columns:1fr;
    }

    .research-gate-controls button{
        min-height:50px;
    }

    .research-hero,
    .research-status-panel,
    .research-shell{
        padding:16px;
    }

    .research-card{
        padding:14px;
    }

    .research-card-header{
        gap:10px;
    }

    .research-avatar{
        width:38px;
        height:38px;
    }

    .research-media{
        grid-template-columns:minmax(0,1fr);
    }

    .research-status-panel{
        grid-template-columns:1fr;
    }

    .research-status-grid{
        grid-template-columns:1fr;
    }

    .research-hero h1{
        font-size:48px;
    }

    .research-shell-header,
    .research-actions{
        flex-direction:column;
        align-items:flex-start;
    }

    .research-actions,
    .research-open{
        width:100%;
    }

    .research-open{
        text-align:center;
    }

    .research-count{
        white-space:normal;
    }
}
