:root{
  --bg:#f6f4fb;
  --paper:#ffffff;
  --paper2:#faf9ff;
  --text:#17151f;
  --muted:#6f6a82;
  --line:#e8e4f3;
  --soft:#f0ecff;
  --primary:#673de6;
  --primary2:#7c5cff;
  --primary3:#ebe5ff;
  --danger:#dc3154;
  --shadow:0 22px 70px rgba(24,18,52,.10);
  --shadow2:0 10px 34px rgba(24,18,52,.08);
}

*{box-sizing:border-box}
html,body{min-height:100%}
body{
  margin:0;
  font-family:Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--text);
  background:
    radial-gradient(900px 500px at 7% 0%, rgba(103,61,230,.13), transparent 55%),
    radial-gradient(1000px 600px at 95% 8%, rgba(124,92,255,.11), transparent 60%),
    linear-gradient(180deg,#fff, var(--bg));
  overflow-x:hidden;
}

button,input{font:inherit}
button{user-select:none}
.hidden{display:none!important}

.login-overlay{
  position:fixed;
  inset:0;
  z-index:100;
  display:grid;
  place-items:center;
  background:rgba(246,244,251,.86);
  backdrop-filter:blur(18px);
  padding:24px;
}
.login-card{
  width:min(620px,100%);
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:28px;
  padding:34px;
  box-shadow:var(--shadow);
}
.eyebrow{
  display:inline-flex;
  padding:8px 12px;
  border-radius:999px;
  background:var(--primary3);
  color:var(--primary);
  font-weight:800;
  margin-bottom:16px;
}
.login-card h1{
  margin:0;
  font-size:42px;
  letter-spacing:-1.5px;
  line-height:1.05;
}
.login-card p{
  color:var(--muted);
  line-height:1.7;
  margin:16px 0 22px;
}
.login-form{
  display:flex;
  gap:10px;
  background:var(--paper2);
  border:1px solid var(--line);
  border-radius:18px;
  padding:8px;
}
.login-form input{
  flex:1;
  border:0;
  outline:0;
  background:transparent;
  padding:13px 12px;
}
.login-form button,
.input-row button,
.dark-btn{
  border:0;
  border-radius:14px;
  background:var(--primary);
  color:#fff;
  font-weight:900;
  padding:12px 18px;
  cursor:pointer;
}
.inline-error,.mini-error{
  margin-top:14px;
  color:var(--danger);
  font-weight:800;
}

.side{
  position:fixed;
  left:0;
  top:0;
  bottom:0;
  width:86px;
  background:rgba(255,255,255,.78);
  border-right:1px solid var(--line);
  backdrop-filter:blur(18px);
  z-index:10;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:20px 10px;
  gap:10px;
}
.side-mark{
  width:44px;
  height:44px;
  border-radius:14px;
  display:grid;
  place-items:center;
  color:#fff;
  background:var(--primary);
  font-weight:950;
  margin-bottom:18px;
}
.side-btn{
  width:64px;
  min-height:56px;
  border:1px solid transparent;
  background:transparent;
  color:var(--muted);
  border-radius:18px;
  cursor:pointer;
  font-weight:850;
}
.side-btn.active{
  background:var(--primary3);
  border-color:#d8ccff;
  color:var(--primary);
}
.side-btn.bottom{margin-top:auto}

.page{
  margin-left:86px;
  min-height:100vh;
  padding:22px 28px 60px;
}
.topbar{
  max-width:1220px;
  margin:0 auto 26px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}
.brand-title{
  font-size:22px;
  font-weight:950;
  letter-spacing:-.3px;
}
.brand-sub{
  color:var(--muted);
  margin-top:3px;
  font-size:13px;
}
.top-actions,.row-actions,.panel-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.ghost-btn,.outline-btn,.danger-btn{
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  border-radius:14px;
  padding:11px 16px;
  font-weight:900;
  cursor:pointer;
}
.outline-btn{
  color:var(--primary);
  border-color:#d9ccff;
  background:#fff;
}
.ghost-btn{
  background:rgba(255,255,255,.75);
}
.danger-btn{
  color:var(--danger);
  background:#fff5f7;
  border-color:#ffd1dc;
}

.view{
  max-width:1220px;
  margin:0 auto;
}
.hero{
  min-height:240px;
  border-radius:34px;
  background:
    linear-gradient(135deg, rgba(103,61,230,.96), rgba(124,92,255,.93)),
    radial-gradient(700px 400px at 70% -20%, rgba(255,255,255,.35), transparent 60%);
  color:#fff;
  padding:42px;
  display:flex;
  align-items:center;
  box-shadow:var(--shadow);
  margin-bottom:22px;
}
.hero h1{
  max-width:830px;
  margin:8px 0 12px;
  font-size:48px;
  line-height:1.05;
  letter-spacing:-1.8px;
}
.hero p{
  color:rgba(255,255,255,.82);
  max-width:680px;
  line-height:1.65;
  margin:0;
}
.badge{
  display:inline-flex;
  padding:8px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.25);
  font-weight:850;
}

.grid-2{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:18px;
}
.panel{
  background:rgba(255,255,255,.86);
  border:1px solid var(--line);
  border-radius:28px;
  box-shadow:var(--shadow2);
  padding:22px;
}
.panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:16px;
}
.panel h2,.page-head h1{
  margin:0 0 6px;
  font-size:24px;
  letter-spacing:-.4px;
}
.panel p,.page-head p{
  margin:0;
  color:var(--muted);
  line-height:1.55;
}
.input-row{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px;
  border:1px solid var(--line);
  background:#fff;
  border-radius:18px;
}
.input-row span{
  min-width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:12px;
  background:var(--primary3);
  color:var(--primary);
  font-weight:900;
}
.input-row input{
  flex:1;
  border:0;
  outline:0;
  padding:13px 8px;
  background:transparent;
}
.status,.alert{
  margin-top:14px;
  padding:13px 14px;
  border-radius:16px;
  background:var(--paper2);
  border:1px solid var(--line);
  color:var(--muted);
  font-weight:800;
}
.alert{
  color:var(--danger);
  background:#fff4f7;
  border-color:#ffd2dc;
}
.profile-card,.video-info-card,.archive-profile-card,.archive-video-card{
  margin-top:16px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  padding:16px;
  display:flex;
  gap:16px;
  box-shadow:0 10px 28px rgba(24,18,52,.05);
}
.avatar{
  width:78px;
  height:78px;
  border-radius:22px;
  object-fit:cover;
  background:var(--primary3);
}
.profile-main{min-width:0}
.profile-name{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.profile-name b{
  font-size:20px;
}
.profile-name span{
  color:var(--muted);
  font-weight:800;
}
.verified{
  width:21px;
  height:21px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#20d5ec;
  color:#fff!important;
}
.bio{
  margin-top:8px;
  color:var(--text);
}
.mini{
  margin-top:8px;
  color:var(--muted);
  font-size:13px;
}
.stats-grid{
  margin-top:16px;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
}
.stat{
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  padding:16px;
}
.stat small{
  color:var(--muted);
  font-weight:900;
}
.stat b{
  display:block;
  font-size:25px;
  margin:8px 0 4px;
  letter-spacing:-.5px;
}
.stat span{
  color:var(--muted);
  font-size:12px;
}
.panel-actions{
  margin-top:16px;
}
.empty-state{
  min-height:180px;
  border:1px dashed #d8d2e8;
  border-radius:20px;
  display:grid;
  place-items:center;
  text-align:center;
  color:var(--muted);
  padding:22px;
}
.empty-state b{
  display:block;
  color:var(--text);
  font-size:20px;
  margin-bottom:6px;
}
.live-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
}
.countik-box{
  width:100%;
  overflow:hidden;
  border-radius:18px;
  border:1px solid var(--line);
  background:#fff;
}
.countik-box iframe{
  width:100%;
  min-height:330px;
  border:0;
}
.video-panel{
  max-width:820px;
  margin:22px auto 0;
}
.video-result{
  margin-top:16px;
}
.thumb{
  width:98px;
  height:98px;
  border-radius:22px;
  object-fit:cover;
  background:var(--primary3);
  flex:0 0 auto;
}
.video-info-card h3{
  margin:0 0 6px;
}
.video-info-card b{
  display:block;
  margin-bottom:8px;
}
.video-info-card p{
  color:var(--muted);
  margin-bottom:14px;
}
.video-stats{
  grid-template-columns:repeat(3,1fr);
}

.report-panel{
  margin-top:22px;
}
.report-content h3{
  margin:0 0 14px;
  font-size:26px;
}
.report-score{
  display:flex;
  align-items:center;
  gap:16px;
  background:var(--primary3);
  border-radius:20px;
  padding:16px;
  margin-bottom:14px;
}
.report-score b{
  font-size:38px;
  color:var(--primary);
}
.report-score span{
  font-weight:950;
}
.report-metrics{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin:16px 0;
}
.report-metrics div{
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
}
.report-metrics small{
  color:var(--muted);
  font-weight:850;
}
.report-metrics b{
  display:block;
  margin-top:6px;
  font-size:22px;
}
.report-block{
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  padding:16px;
  margin-top:12px;
}
.report-block h4{
  margin:0 0 10px;
}
.report-block ul{
  margin:0;
  padding-left:18px;
  color:var(--muted);
  line-height:1.7;
}
.ai-text{
  white-space:pre-wrap;
  margin:0;
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  padding:18px;
  line-height:1.7;
}

.page-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:18px;
  margin-bottom:18px;
}
.refresh-log{
  margin-bottom:14px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  padding:13px 14px;
  color:var(--muted);
  font-weight:850;
}
.archive-layout{
  display:grid;
  grid-template-columns:310px 1fr;
  gap:18px;
}
.archive-list-card,.archive-detail{
  background:rgba(255,255,255,.86);
  border:1px solid var(--line);
  border-radius:28px;
  box-shadow:var(--shadow2);
  padding:18px;
  min-height:580px;
}
.archive-list-card h3{
  margin:0 0 14px;
}
.history-list{
  display:grid;
  gap:10px;
}
.history-item{
  border:1px solid var(--line);
  background:#fff;
  border-radius:18px;
  padding:12px;
  display:flex;
  align-items:center;
  gap:12px;
  text-align:left;
  cursor:pointer;
}
.history-item.active{
  border-color:#cbbcff;
  background:#f7f3ff;
}
.history-item img{
  width:42px;
  height:42px;
  border-radius:14px;
  object-fit:cover;
  background:var(--primary3);
}
.history-item b{
  display:block;
}
.history-item small{
  color:var(--muted);
}
.archive-profile-card{
  margin-top:0;
}
.archive-profile-card img{
  width:76px;
  height:76px;
  border-radius:20px;
  object-fit:cover;
  background:var(--primary3);
}
.archive-profile-main{
  flex:1;
}
.archive-profile-main h2{
  margin:0 0 4px;
}
.archive-stats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin:14px 0;
}
.archive-stat{
  position:relative;
  background:var(--paper2);
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
}
.archive-stat small{
  color:var(--muted);
  font-weight:850;
}
.archive-stat b{
  display:block;
  margin-top:6px;
  font-size:19px;
}
.archive-stat em{
  position:absolute;
  right:10px;
  top:10px;
  font-style:normal;
  color:#0f9f6e;
  font-weight:950;
  background:#e9fff6;
  border-radius:999px;
  padding:3px 7px;
}
.archive-section-title{
  font-size:20px;
  font-weight:950;
  margin:26px 0 12px;
}
.archive-video-list{
  display:grid;
  gap:12px;
}
.archive-video-card{
  align-items:flex-start;
  cursor:pointer;
}
.archive-video-card img{
  width:110px;
  height:140px;
  border-radius:18px;
  object-fit:cover;
  background:var(--primary3);
  flex:0 0 auto;
}
.archive-video-body{
  min-width:0;
  flex:1;
}
.archive-video-body h3{
  margin:0 0 8px;
  font-size:17px;
}
.archive-video-body p{
  color:var(--muted);
  margin:0;
}
.archive-video-body .archive-stats{
  grid-template-columns:repeat(5,1fr);
}
.archive-video-actions{
  display:flex;
  gap:8px;
  flex-direction:column;
  min-width:92px;
}
.empty-line{
  border:1px dashed #d8d2e8;
  background:#fff;
  border-radius:16px;
  padding:16px;
  color:var(--muted);
}

.settings-card{
  max-width:760px;
}
.settings-card label{
  display:block;
  margin:16px 0 8px;
  font-weight:900;
}
.settings-input{
  width:100%;
  border:1px solid var(--line);
  background:#fff;
  border-radius:16px;
  padding:14px 15px;
  outline:0;
}

@media(max-width:1000px){
  .grid-2,.archive-layout{grid-template-columns:1fr}
  .hero h1{font-size:34px}
  .stats-grid,.video-stats,.report-metrics{grid-template-columns:repeat(2,1fr)}
  .archive-video-body .archive-stats{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:700px){
  .side{position:static;width:100%;height:auto;flex-direction:row;justify-content:center}
  .side-btn.bottom{margin-top:0}
  .page{margin-left:0;padding:16px}
  .topbar,.page-head{align-items:flex-start;flex-direction:column}
  .hero{padding:26px}
  .hero h1{font-size:30px}
  .login-form,.input-row{flex-direction:column;align-items:stretch}
  .stats-grid,.video-stats,.archive-stats,.report-metrics{grid-template-columns:1fr}
  .profile-card,.video-info-card,.archive-profile-card,.archive-video-card{flex-direction:column}
  .archive-video-card img{width:100%;height:260px}
}


/* =========================================================
   MOBIL UYUMLULUK PATCH - mevcut kodu bozmaz, sadece responsive düzeltir
   ========================================================= */

img, video, iframe{
  max-width:100%;
}

body{
  -webkit-text-size-adjust:100%;
}

button, input{
  max-width:100%;
}

@media (max-width: 900px){
  .topbar,
  .page-head{
    width:100%;
  }

  .top-actions,
  .row-actions,
  .panel-actions{
    width:100%;
  }

  .top-actions > button,
  .row-actions > button,
  .panel-actions > button{
    flex:1 1 160px;
  }

  .video-panel{
    max-width:100%;
  }
}

@media (max-width:700px){
  body{
    background:linear-gradient(180deg,#fff,var(--bg));
  }

  .login-overlay{
    padding:14px;
    align-items:start;
    padding-top:28px;
  }

  .login-card{
    border-radius:22px;
    padding:22px;
  }

  .login-card h1{
    font-size:clamp(28px,8vw,36px);
    line-height:1.08;
    letter-spacing:-1px;
  }

  .login-card p{
    font-size:14px;
    line-height:1.55;
  }

  .login-form{
    gap:8px;
  }

  .login-form input,
  .login-form button,
  .input-row input,
  .input-row button{
    width:100%;
  }

  .side{
    position:sticky;
    top:0;
    z-index:50;
    width:100%;
    overflow-x:auto;
    justify-content:flex-start;
    padding:10px;
    gap:8px;
    border-right:0;
    border-bottom:1px solid var(--line);
  }

  .side::-webkit-scrollbar{
    display:none;
  }

  .side-mark{
    width:42px;
    height:42px;
    min-width:42px;
    margin:0 6px 0 0;
  }

  .side-btn{
    min-width:82px;
    width:auto;
    min-height:42px;
    padding:0 14px;
    border-radius:14px;
  }

  .side-btn span{
    white-space:nowrap;
  }

  .page{
    width:100%;
    padding:14px;
    padding-bottom:34px;
  }

  .view{
    width:100%;
  }

  .topbar,
  .page-head{
    gap:12px;
    margin-bottom:14px;
  }

  .brand-title{
    font-size:20px;
  }

  .brand-sub{
    word-break:break-word;
  }

  .top-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
  }

  .top-actions button{
    width:100%;
    padding:11px 10px;
    font-size:13px;
  }

  .hero{
    min-height:auto;
    border-radius:24px;
    padding:24px;
    margin-bottom:14px;
  }

  .badge{
    font-size:12px;
    padding:7px 10px;
  }

  .hero h1{
    font-size:clamp(28px,8vw,34px);
    line-height:1.08;
    letter-spacing:-1px;
  }

  .hero p{
    font-size:14px;
    line-height:1.55;
  }

  .grid-2{
    gap:14px;
  }

  .panel,
  .archive-list-card,
  .archive-detail{
    border-radius:22px;
    padding:16px;
    min-height:auto;
  }

  .panel-head{
    flex-direction:column;
    gap:10px;
  }

  .panel h2,
  .page-head h1{
    font-size:22px;
  }

  .panel p,
  .page-head p{
    font-size:14px;
  }

  .input-row{
    gap:8px;
    padding:8px;
  }

  .input-row span{
    width:100%;
    height:34px;
  }

  .profile-card,
  .video-info-card,
  .archive-profile-card,
  .archive-video-card{
    gap:12px;
    border-radius:20px;
    padding:14px;
  }

  .avatar,
  .archive-profile-card img{
    width:70px;
    height:70px;
    border-radius:18px;
  }

  .profile-name{
    align-items:flex-start;
  }

  .profile-name b,
  .profile-name span,
  .bio,
  .mini,
  .video-info-card b,
  .video-info-card p,
  .archive-video-body h3,
  .archive-video-body p{
    overflow-wrap:anywhere;
    word-break:break-word;
  }

  .stats-grid,
  .video-stats,
  .archive-stats,
  .report-metrics,
  .archive-video-body .archive-stats{
    grid-template-columns:1fr;
    gap:10px;
  }

  .stat,
  .archive-stat{
    padding:14px;
  }

  .stat b{
    font-size:23px;
  }

  .empty-state{
    min-height:145px;
    padding:18px;
  }

  .countik-box iframe{
    min-height:360px;
  }

  .video-panel{
    margin-top:14px;
  }

  .thumb{
    width:100%;
    height:220px;
    border-radius:20px;
  }

  .row-actions,
  .panel-actions{
    display:grid;
    grid-template-columns:1fr;
    width:100%;
    gap:8px;
  }

  .row-actions button,
  .panel-actions button,
  .ghost-btn,
  .outline-btn,
  .danger-btn,
  .dark-btn{
    width:100%;
    justify-content:center;
    text-align:center;
  }

  .report-score{
    align-items:flex-start;
    flex-direction:column;
  }

  .report-score b{
    font-size:34px;
  }

  .report-content h3{
    font-size:22px;
  }

  .ai-text{
    padding:14px;
    font-size:14px;
    overflow-x:auto;
  }

  .archive-layout{
    gap:14px;
  }

  .history-item{
    border-radius:16px;
  }

  .archive-video-card img{
    width:100%;
    height:auto;
    max-height:360px;
    aspect-ratio:9/12;
    object-fit:cover;
  }

  .archive-video-actions{
    width:100%;
    min-width:0;
  }
}

@media (max-width:420px){
  .page{
    padding:10px;
  }

  .top-actions{
    grid-template-columns:1fr;
  }

  .hero,
  .panel,
  .archive-list-card,
  .archive-detail,
  .login-card{
    border-radius:18px;
  }

  .hero{
    padding:20px;
  }

  .hero h1{
    font-size:27px;
  }

  .panel h2,
  .page-head h1{
    font-size:20px;
  }

  .side-btn{
    min-width:74px;
    padding:0 12px;
    font-size:13px;
  }

  .stat b{
    font-size:21px;
  }

  .thumb{
    height:190px;
  }
}
.input-row{
  position:relative;
}

.clear-input-btn{
  width:32px;
  height:32px;
  min-width:32px;
  border:0;
  border-radius:50%;
  background:#ff3b5c;
  color:white;
  font-size:17px;
  font-weight:900;
  cursor:pointer;
  display:none;
  align-items:center;
  justify-content:center;
  padding:0;
}

/* PC */
@media(min-width:701px){
  .clear-input-btn{
    position:absolute;
    right:105px;
    top:50%;
    transform:translateY(-50%);
  }
}

/* MOBİL */
@media(max-width:700px){
  .input-row{
    display:grid;
    grid-template-columns:38px 1fr 44px;
    align-items:center;
  }

  .input-row span{
    width:38px !important;
    height:38px !important;
  }

  .input-row input{
    width:100%;
  }

  .input-row > button[type="submit"]{
    grid-column:1 / -1;
    width:100%;
  }

  .clear-input-btn{
    position:static;
    display:flex;
    grid-column:3;
    grid-row:1;
  }
}