@import url('https://fonts.googleapis.com/css2?family=Inter:wght@500;700&display=swap');

:root {
  --bg: #0f111a;
  --fg: #fff;
  --glass: rgba(255,255,255,0.08);
  --blur: 16px;
  --accent: #1db954;
}

/* =======================================================
   GENEL & OBS ŞEFFAFLIK FIX
   ======================================================= */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Inter', sans-serif;
  color: var(--fg);
  background: transparent !important; /* 🔥 OBS için tam şeffaflık */
  overflow-x: hidden;
}

/* Web sürümünde arka plan efekti (OBS'e yansımaz) */
@media screen {
  html, body {
    background: radial-gradient(circle at 30% 10%, #1db95422, transparent 60%), var(--bg);
  }
}

/* =======================================================
   GİRİŞ & CALLBACK SAYFALARI
   ======================================================= */
.index-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.glass-card {
  background: var(--glass);
  backdrop-filter: blur(var(--blur));
  border-radius: 20px;
  padding: 40px;
  width: 380px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,.4);
  animation: fadein .8s ease;
}

.logo {
  width: 64px;
  opacity: .9;
  margin-bottom: 10px;
}

h2 {
  margin: 8px 0 6px;
  font-size: 22px;
  letter-spacing: 0.3px;
}

.desc {
  font-size: 13px;
  color: #ccc;
  line-height: 1.5em;
  margin-bottom: 14px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

label {
  font-size: 13px;
  color: #bbb;
  text-align: left;
}

input[type=text],
input[type=color] {
  background: rgba(255,255,255,.07);
  border: none;
  border-radius: 8px;
  color: var(--fg);
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  width: 100%;
}

input[type=color] {
  height: 42px;
  cursor: pointer;
}

.connect-btn {
  margin-top: 10px;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--accent), #1ed760);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  font-size: 15px;
  transition: .3s;
}
.connect-btn:hover { filter: brightness(1.15); }

/* Başarı kutusu */
.success-box {
  background: rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
  color: #aaa;
  text-align: left;
  margin-top: 10px;
}

.success-box code {
  display: block;
  margin-top: 6px;
  padding: 8px;
  background: rgba(0,0,0,.3);
  border-radius: 6px;
  color: #1ed760;
  word-wrap: break-word;
  font-size: 13px;
}

/* Footer */
footer {
  text-align: center;
  font-size: 12px;
  color: #888;
}

/* =======================================================
   OBS WIDGET STİLİ
   ======================================================= */
.wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(0,0,0,0.35); /* 🔥 sadece kart görünür */
  backdrop-filter: blur(var(--blur));
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 8px 30px rgba(0,0,0,.35);
  width: 420px;
  height: 108px;
  border: 1px solid rgba(255,255,255,0.05);
}

.cover {
  width: 76px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(255,255,255,.1);
}

.meta {
  flex: 1;
  min-width: 0;
}

.title {
  font-weight: 700;
  font-size: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artist {
  font-size: 14px;
  color: #bbb;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar {
  margin-top: 10px;
  height: 4px;
  background: rgba(255,255,255,.16);
  border-radius: 2px;
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #1ed760);
  transition: width .2s linear;
}

.np {
  text-align: center;
  font-size: 16px;
  color: #888;
  width: 100%;
}

/* =======================================================
   Renk önizleme (Index formu)
   ======================================================= */
#previewBox {
  margin-top: 10px;
  text-align: center;
}
#previewBox small {
  display: block;
  font-size: 11px;
  color: #888;
  margin-top: 4px;
}
#previewBox .bar {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,.15);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
#previewBar {
  display: block;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, #1db954, #1ed760);
  transition: background .3s;
}

/* Fade-in animasyonu */
@keyframes fadein {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* Responsive */
@media (max-width: 480px) {
  .glass-card {
    width: 90%;
    padding: 30px 20px;
  }
  .card {
    width: 95%;
  }
  .title { font-size: 16px; }
  .artist { font-size: 13px; }
}
