.simple-page {
    width: 90%;
    max-width: 500px;
    margin: 40px auto;
    background: var(--card);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.profile-box {
    width: 90%;
    max-width: 380px;
    margin: 40px auto;
    background: var(--card);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

/* ========== CORE ========== */
:root { --blue:#00A3FF; }
body{ margin:0; font-family:Arial, sans-serif; background:var(--bg); color:var(--text); }

/* HEADER */
.header{ display:flex; align-items:center; justify-content:space-between; padding:10px 14px; background:var(--header); border-bottom:1px solid var(--border); position:sticky; top:0; z-index:50; }
.logo{ font-weight:900; font-size:20px; }
.blue{ color:var(--blue); }
.search-box input{ padding:8px 12px; border-radius:20px; border:1px solid var(--border); background:var(--input-bg); color:var(--text); width:260px; }

/* layout container that holds sidebar + feed */
.container{ display:flex; min-height:calc(100vh - 56px); }

/* SIDEBAR (desktop) */
.sidebar{ width:72px; background:var(--sidebar); border-right:1px solid var(--border); padding-top:10px; position:sticky; top:56px; height:calc(100vh - 56px); display:flex; flex-direction:column; align-items:center; gap:6px; }
.side-link{ width:100%; display:flex; justify-content:center; align-items:center; height:64px; text-decoration:none; font-size:0; }
.icon{ width:26px; height:26px; object-fit:contain; display:block; }
.side-link.active, .side-link:hover{ background:rgba(0,163,255,0.12); }

/* MAIN FEED */
.main-feed{ flex:1; padding:18px; }
.section-title{ margin:0 0 12px 0; font-size:18px; }

/* VIDEO CARD */
.video-card{ background:var(--card); border-radius:10px; margin-bottom:18px; overflow:hidden; box-shadow:0 1px 0 rgba(0,0,0,0.06); }
.thumbnail{ width:100%; height:220px; object-fit:cover; display:block; }
.video-meta{ padding:10px 12px; }
.video-title{ font-weight:700; margin-bottom:6px; }
.video-sub{ color:gray; font-size:13px; }

/* ACTIONS (like/dislike/comment/share) */
.video-actions{ display:flex; gap:8px; padding:10px 12px 16px 12px; align-items:center; flex-wrap:wrap; }
.action-btn{ display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:8px; border:1px solid transparent; background:transparent; cursor:pointer; color:var(--text); font-size:14px; text-decoration:none; }
.action-btn img.small-icon{ width:18px; height:18px; display:inline-block; object-fit:contain; }

/* WATCH PAGE */
.watch-main{ display:flex; gap:20px; padding:18px; align-items:flex-start; }
.video-area{ flex:2; }
.video-player{ width:100%; height:420px; background:#000; border-radius:8px; }
.watch-title{ margin:12px 0 6px; font-size:20px; }
.watch-sub{ color:gray; margin-bottom:8px; }
.watch-actions{ display:flex; gap:10px; margin:12px 0; }

/* SUGGESTED */
.suggested{ width:320px; }
.suggest-card{ display:flex; gap:10px; margin-bottom:12px; text-decoration:none; color:var(--text); background:var(--card); padding:8px; border-radius:8px; }
.suggest-thumb{ width:120px; height:68px; object-fit:cover; border-radius:6px; }

/* SHORTS */
.shorts-container{ height:100vh; overflow-y:scroll; scroll-snap-type:y mandatory; }
.short-box{ height:100vh; scroll-snap-align:start; position:relative; background:#000; }
.short-video{ width:100%; height:100%; object-fit:cover; }
.short-actions{ position:absolute; right:18px; bottom:120px; display:flex; flex-direction:column; gap:18px; }
.act img.small-icon{ width:34px; height:34px; }

/* ========== BOTTOM NAV (mobile) ========== */
.bottom-nav{ display:none; position:fixed; left:0; right:0; bottom:0; height:64px; background:var(--header); border-top:1px solid var(--border); z-index:60; align-items:center; justify-content:space-between; padding:0 6px; gap:8px; }
.bottom-item{ flex:1; text-align:center; text-decoration:none; color:var(--text); font-size:12px; padding:6px 4px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; }
.b-icon{ width:22px; height:22px; }
.b-icon-large{ width:42px; height:42px; border-radius:50%; box-shadow:0 2px 8px rgba(0,0,0,0.12); }

/* center add button style */
.add-center{ transform:translateY(-6px); }

/* small device: hide desktop sidebar and show bottom nav */
@media (max-width: 900px) {
    .sidebar{ display:none; }
    .container{ display:block; }
    .main-feed{ padding-bottom:84px; } /* to avoid overlap with bottom nav */
    .bottom-nav{ display:flex; }
    .watch-main{ padding-bottom:84px; }
}

/* ========== THEME VARIABLES (light/dark files will set these) ========== */
/* keep fallback so page not broken */
:root{ --bg:#F5F5F5; --text:#000; --header:#fff; --sidebar:#fff; --border:#e5e5e5; --input-bg:#fff; --card:#fff; }

/* basic button hover */
.action-btn:hover{ background: rgba(0,163,255,0.06); border-color: rgba(0,163,255,0.08); }

/* small helpers */
a { color:inherit; }
button { background:none; border:none; cursor:pointer; font-family:inherit; }

/* AUTH PAGES */
.auth-box {
    width: 90%;
    max-width: 380px;
    margin: 40px auto;
    background: var(--card);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.auth-input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
}

.auth-btn {
    width: 100%;
    padding: 12px;
    background: var(--blue);
    color: white;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    cursor: pointer;
}

.msg {
    background: #ff4444;
    color: white;
    padding: 10px;
    border-radius: 8px;
}

.auth-switch a {
    color: var(--blue);
    text-decoration: none;
    font-weight: bold;
}

/* comments + channel small helpers */
.comment-item { background: var(--card); padding:10px; margin:8px 0; border-radius:8px;}
.comments-list { margin-top:10px; }


/* CHANNEL PAGE STYLES */
.channel-top {
    display:flex;
    align-items:center;
    gap:16px;
    padding:18px;
    background:var(--card);
    border-bottom:1px solid var(--border);
}
.avatar-circle{
    width:72px;height:72px;border-radius:50%;background:var(--blue);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:28px;
}
.channel-name{ margin:0;font-size:20px; }
.channel-subs{ margin:4px 0;color:gray; }
.channel-right{ margin-left:auto; }

.subscribe-btn {
    background:var(--blue); color:#fff; padding:10px 14px; border-radius:8px; border:none; cursor:pointer; font-weight:700;
}
.subscribe-btn.subscribed { background:#ddd; color:#111; }
.subscribe-btn.own { background:#444; }

/* channel menu */
.channel-menu{ display:flex; gap:12px; padding:12px 18px; background:var(--card); border-bottom:1px solid var(--border); }

/* channel videos grid */
.channel-videos{ display:grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap:16px; padding:18px; }

/* small helpers */
.simple-page{ padding:40px; text-align:center; background:var(--card); border-radius:10px; margin:18px; }
