﻿:root{
  --bg:#0b1117;
  --bg-accent:linear-gradient(180deg,#071220 0%, #081226 100%);
  --card:rgba(255,255,255,0.03);
  --glass:rgba(255,255,255,0.04);
  --accent:#ff6b6b;
  --accent-2:#ff9a9a;
  --muted:#98a6b7;
  --text:#e9f3fb;
  --shadow:0 6px 18px rgba(2,6,23,0.6);
}

body.light-mode{
  --bg:#f5f7fb;
  --bg-accent:linear-gradient(180deg,#f8fbff 0%, #eef2f9 100%);
  --card:rgba(0,0,0,0.03);
  --glass:rgba(0,0,0,0.04);
  --accent:#ff5c70;
  --accent-2:#ff8aa1;
  --muted:#5c6675;
  --text:#0e1828;
  --shadow:0 6px 18px rgba(10,25,56,0.12);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'SF Pro Display', 'SF Pro Text', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(180deg, #171c26 0%, #111622 100%);
  color:var(--text);
  margin:0;
  padding:28px;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

body.light-mode{
  background:var(--bg-accent);
}

.container{max-width:960px;margin:0 auto}

#videoList{display:none !important;list-style:none;padding:0;margin:12px 0}

h1{
  margin:0 0 16px;
  font-size:20px;
  letter-spacing:0.2px;
}

.brand{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.brand-logo{
  width:40px;height:40px;
  object-fit:contain;
  border-radius:10px;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.28));
}
.light-mode .brand-logo{filter: drop-shadow(0 6px 12px rgba(0,0,0,0.12));}
.settings-btn{
  position:fixed;
  top:18px;
  left:18px;
  width:38px;
  height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border:1px solid rgba(255,255,255,0.08);
  border-radius:12px;
  color:var(--text);
  box-shadow:0 10px 30px rgba(0,0,0,0.4);
  cursor:pointer;
  transition:transform .12s, box-shadow .12s, background .15s;
  z-index:120;
}
.settings-btn:hover{transform:translateY(-2px);background:rgba(255,255,255,0.08)}
.settings-btn:active{transform:translateY(-1px)}
.light-mode .settings-btn{
  background:linear-gradient(180deg, rgba(0,0,0,0.03), rgba(0,0,0,0.02));
  border:1px solid rgba(0,0,0,0.06);
  box-shadow:0 10px 26px rgba(0,0,0,0.14);
}
.light-mode .settings-btn:hover{background:rgba(0,0,0,0.05)}
.brand-text{display:flex;flex-direction:column;gap:2px}
.brand-name{font-weight:800;font-size:16px;letter-spacing:0.3px}
.brand-sub{color:var(--muted);font-size:12px;text-transform:uppercase;letter-spacing:0.6px}

.auth-links{
  position:fixed;
  top:20px;
  right:20px;
  display:flex;
  gap:12px;
  font-size:13px;
  z-index:100;
}
.auth-link{
  color:var(--muted);
  cursor:pointer;
  text-decoration:none;
  transition:color 0.2s;
}
.auth-link:hover{color:var(--text)}

#userDisplay{
  color:var(--text);
  font-size:13px;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-right: 10px;
  white-space: nowrap;
}

.private-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 11px;
  color: var(--muted);
  transition: color 0.2s;
  white-space: nowrap;
}

.private-toggle:hover {
  color: var(--text);
}

.private-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--accent);
}

.auth-modal{
  display:none;
  position:fixed;
  top:50px;
  right:20px;
  background:linear-gradient(180deg, #1a1f2e 0%, #141923 100%);
  padding:16px;
  border-radius:8px;
  box-shadow:0 8px 24px rgba(0,0,0,0.6);
  width:220px;
  z-index:1000;
  border:1px solid rgba(255,255,255,0.1);
}
.light-mode .auth-modal{
  background:linear-gradient(180deg, #ffffff 0%, #eef2f8 100%);
  border:1px solid rgba(0,0,0,0.06);
  box-shadow:0 10px 34px rgba(0,0,0,0.12);
}
.auth-modal.show{display:block}

.auth-modal-content{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.auth-close{
  display:none;
}

.auth-modal-content h3{
  display:none;
}

.auth-modal-content input{
  padding:10px 12px;
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.1);
  border-radius:6px;
  color:var(--text);
  font-size:14px;
  font-family:inherit;
}
.auth-modal-content input:focus{
  outline:none;
  border-color:rgba(255,255,255,0.25);
  background:rgba(255,255,255,0.08);
}

.auth-modal-buttons{
  display:flex;
  gap:8px;
}
.auth-modal-buttons button{
  flex:1;
  padding:10px;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.15);
  border-radius:6px;
  color:var(--text);
  font-weight:600;
  cursor:pointer;
  font-size:13px;
  transition:all 0.2s;
}
.auth-modal-buttons button:hover{
  background:rgba(255,255,255,0.14);
  border-color:rgba(255,255,255,0.25);
}

.settings-modal{
  display:none;
  position:fixed;
  top:70px;
  left:18px;
  background:linear-gradient(180deg, #1a1f2e 0%, #141923 100%);
  padding:14px;
  border-radius:10px;
  box-shadow:0 16px 40px rgba(0,0,0,0.55);
  width:240px;
  z-index:110;
  border:1px solid rgba(255,255,255,0.12);
}
.light-mode .settings-modal{
  background:linear-gradient(180deg, #ffffff 0%, #f1f4fa 100%);
  border:1px solid rgba(0,0,0,0.06);
  box-shadow:0 16px 32px rgba(0,0,0,0.12);
}
.settings-modal.show{display:block}

.settings-modal-content{display:flex;flex-direction:column;gap:12px}
.settings-modal-header{display:flex;align-items:center;justify-content:space-between;font-weight:700;font-size:14px}
.settings-body{font-size:13px;line-height:1.5;color:var(--muted)}
.light-mode .settings-body{color:var(--muted)}

.settings-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 6px;border-radius:10px;background:rgba(255,255,255,0.02)}
.light-mode .settings-row{background:rgba(0,0,0,0.03)}
.settings-meta{display:flex;flex-direction:column;gap:2px}
.settings-title{font-weight:700;color:var(--text);font-size:13px}
.settings-hint{color:var(--muted);font-size:12px}

.icon-btn{
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.12);
  border-radius:10px;
  color:var(--text);
  width:32px;
  height:32px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:background .12s, transform .12s;
}
.icon-btn:hover{background:rgba(255,255,255,0.1)}
.icon-btn:active{transform:translateY(1px)}
.light-mode .icon-btn{
  background:rgba(0,0,0,0.04);
  border:1px solid rgba(0,0,0,0.08);
  box-shadow:0 6px 16px rgba(0,0,0,0.1);
}
.light-mode .icon-btn:hover{background:rgba(0,0,0,0.07)}

.switch{position:relative;display:inline-block;width:46px;height:26px}
.switch input{opacity:0;width:0;height:0}
.slider{
  position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;
  background:#606b7a;
  transition:0.2s;
  border-radius:20px;
  box-shadow:inset 0 1px 3px rgba(0,0,0,0.35);
}
.light-mode .slider{background:#a6afc2;}
.slider:before{
  position:absolute;content:"";height:18px;width:18px;left:4px;bottom:4px;
  background:white;
  transition:0.2s;
  border-radius:50%;
  box-shadow:0 1px 3px rgba(0,0,0,0.35);
}
.switch input:checked + .slider{background:linear-gradient(180deg, #e63946, #ff6b6b);}
.switch input:checked + .slider:before{transform:translateX(20px)}
.slider:active:before{width:20px}

.report-flag{display:inline-block;margin-left:6px;cursor:pointer;color:var(--muted);transition:color 0.2s;font-size:12px}
.report-flag:hover{color:var(--accent)}
.report-flag.reported{color:var(--accent)}

.report-toast{
  position:absolute;
  top:-26px;
  left:0;
  background:var(--glass);
  border:1px solid rgba(255,255,255,0.08);
  color:var(--text);
  padding:4px 8px;
  border-radius:8px;
  font-size:11px;
  white-space:nowrap;
  box-shadow:0 8px 20px rgba(0,0,0,0.35);
  pointer-events:none;
  opacity:0;
  animation:toastFade 2s ease forwards;
}
@keyframes toastFade{
  0%{opacity:0;transform:translateY(4px);}
  10%{opacity:1;transform:translateY(0);}
  90%{opacity:1;transform:translateY(0);}
  100%{opacity:0;transform:translateY(-2px);}
}

.report-modal{display:none;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);background:linear-gradient(180deg, #1a1f2e 0%, #141923 100%);padding:20px;border-radius:12px;box-shadow:0 20px 60px rgba(0,0,0,0.7);width:90%;max-width:380px;z-index:2000;border:1px solid rgba(255,255,255,0.12)}
.light-mode .report-modal{background:linear-gradient(180deg, #ffffff 0%, #f1f4fa 100%);border:1px solid rgba(0,0,0,0.06)}
.report-modal.show{display:block}
.report-modal-content{display:flex;flex-direction:column;gap:14px}
.report-modal-header{display:flex;align-items:center;justify-content:space-between;font-weight:700;font-size:15px}
.report-body{display:flex;flex-direction:column;gap:10px;font-size:13px}
.report-body select,.report-body textarea{padding:10px 12px;background:rgba(255,255,255,0.05);border:1px solid rgba(255,255,255,0.1);border-radius:6px;color:var(--text);font-family:inherit;font-size:13px;outline:none;transition:border-color 0.2s}
.report-body select:focus,.report-body textarea:focus{border-color:rgba(255,255,255,0.25)}
.light-mode .report-body select,.light-mode .report-body textarea{background:rgba(255,255,255,0.5);border:1px solid rgba(0,0,0,0.08)}
.light-mode .report-body select:focus,.light-mode .report-body textarea:focus{border-color:rgba(0,0,0,0.15)}
.report-submit-btn{background:var(--accent) !important;color:#fff !important;border:0 !important;padding:10px 14px !important;border-radius:6px !important;font-weight:600;cursor:pointer;box-shadow:none !important;transition:opacity 0.2s}
.report-submit-btn:hover{opacity:0.9}
.report-submit-btn:disabled{opacity:0.5;cursor:not-allowed}

.lede{
  margin:4px 0 18px;
  color:var(--muted);
  font-size:14px;
  max-width:720px;
}

.controls{display:flex;gap:10px;margin:14px 0;align-items:center}
input{
  flex:1;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.04);
  background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  color:var(--text);
  outline:none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
  transition:box-shadow .18s, transform .12s, border-color .12s;
}
input:focus{box-shadow:0 6px 18px rgba(2,6,23,0.6);border-color:rgba(255,255,255,0.06);transform:translateY(-1px);background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)) !important}
.light-mode input:focus{box-shadow:0 6px 18px rgba(10,25,56,0.12);border-color:rgba(0,0,0,0.15);background:linear-gradient(180deg, rgba(255,255,255,0.5), rgba(255,255,255,0.45)) !important}

button{
  padding:10px 14px;
  border-radius:999px;
  border:0;
  background:linear-gradient(180deg,var(--accent),var(--accent-2));
  color:#071320;
  cursor:pointer;
  font-weight:600;
  box-shadow:var(--shadow);
  transition:transform .12s, box-shadow .12s, opacity .12s;
}
button:hover{transform:translateY(-3px);opacity:0.98}
button:active{transform:translateY(-1px)}

/* Make the Add and Random buttons look like simple links */
#addBtn,#randomBtn{
  background:transparent !important;
  box-shadow:none !important;
  color:var(--accent);
  padding:0 6px;
  border-radius:6px;
  text-decoration:underline;
  font-weight:700;
}
#addBtn:hover,#randomBtn:hover{opacity:0.9;transform:none}

.msg{min-height:22px;margin:10px 0;color:var(--muted);font-size:13px;line-height:1.4}

.list{list-style:none;padding:0;margin:12px 0}
.list li{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px;
  background:var(--glass);
  margin:8px 0;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.02);
  box-shadow:0 8px 20px rgba(2,6,23,0.45);
}

#videoList li{padding:10px;background:rgba(255,255,255,0.02);margin:6px 0;border-radius:8px;border:1px solid rgba(255,255,255,0.04);cursor:pointer;transition:background 0.2s;font-size:13px}
#videoList li:hover{background:rgba(255,255,255,0.04)}
#videoList strong{font-size:13px;display:inline}
#videoList small{display:none}
.light-mode #videoList li{background:rgba(0,0,0,0.03);border:1px solid rgba(0,0,0,0.05)}
.light-mode #videoList li:hover{background:rgba(0,0,0,0.06)}

.player{
  height:420px;
  width:100%;
  max-width:920px;
  background:linear-gradient(180deg, rgba(14,18,26,0.85), rgba(6,8,12,0.9));
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  margin:20px auto 12px;
  padding:12px;
  border:1px solid rgba(255,255,255,0.05);
  box-shadow:0 22px 60px rgba(0,0,0,0.55), 0 8px 18px rgba(0,0,0,0.35);
}
.light-mode .player{
  background:linear-gradient(180deg, rgba(255,255,255,0.95), rgba(240,244,250,0.94));
  border:1px solid rgba(0,0,0,0.05);
  box-shadow:0 22px 50px rgba(0,0,0,0.12), 0 8px 18px rgba(0,0,0,0.08);
}

section{
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:20px 0 32px;
}

.nav-buttons{
  display:flex;
  gap:12px;
  margin-top:12px;
  width:100%;
  max-width:920px;
}

#prevBtn, #nextBtn{
  flex:1;
  background:rgba(255,255,255,0.08) !important;
  color:var(--text) !important;
  box-shadow:none !important;
  border:1px solid rgba(255,255,255,0.06) !important;
  padding:10px 16px !important;
}

#prevBtn:disabled{
  opacity:0.3;
  cursor:not-allowed;
}

#prevBtn:hover:not(:disabled), #nextBtn:hover{
  background:rgba(255,255,255,0.12) !important;
}

.vid-actions{display:flex;gap:8px}
.link{
  background:transparent;
  border:1px solid rgba(255,255,255,0.06);
  padding:8px 10px;
  border-radius:10px;
  color:var(--muted);
  cursor:pointer;
}
.link:hover{background:rgba(255,255,255,0.01);color:var(--text)}

@media (max-width:720px){
  .player{height:220px}
  .controls{flex-direction:column;align-items:stretch}
  button{width:100%}
}

/* small utility */
.muted{color:var(--muted)}

