:root {
    --bg:#0f0f0f;
    --card:#1c1c1c;
    --text:#fff;
    --accent:#3ea6ff;
    --green:#22c55e;
}

* { box-sizing:border-box; }

body {
    margin:0;
    font-family:system-ui;
    background:var(--bg);
    color:var(--text);
}

.header {
    padding:14px;
    display:flex;
    gap:12px;
    border-bottom:1px solid #222;
}

.logo { font-weight:600; }

#searchInput {
    flex:1;
    padding:8px 12px;
    border-radius:8px;
    border:none;
    background:#222;
    color:#fff;
}

.container { padding:16px; }

.video-grid {
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
    gap:16px;
}

.video-card {
    background:var(--card);
    border-radius:12px;
    overflow:hidden;
}

.thumb {
    position:relative;
    height:160px;
    background:#000;
    cursor:pointer;
}

.thumb img {
    width:100%;
    height:100%;
    object-fit:cover;
}

.play {
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:48px;
    color:var(--accent);
}

.info { padding:12px; }

.title {
    font-size:14px;
    margin-bottom:10px;
    word-break:break-word;
}

.download {
    width:100%;
    background:var(--green);
    border:none;
    padding:8px;
    border-radius:8px;
    font-size:14px;
}

.modal {
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.9);
    display:flex;
    align-items:center;
    justify-content:center;
    z-index:999;
}

.modal video {
    width:90%;
    max-height:80vh;
    background:#000;
}

.close {
    position:absolute;
    top:20px;
    right:20px;
    background:none;
    border:none;
    color:#fff;
    font-size:24px;
}

.hidden { display:none; }

@media(max-width:480px){
    .video-grid{grid-template-columns:1fr;}
    .thumb{height:140px;}
}
