:root {
  --primary: #1da1f2;
  --dark: #15202b;
  --light: #ffffff;
  --gray: #657786;
  --bg: #f5f8fa;
  --radius: 8px;
  --transition: 0.3s;
  font-size: 16px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--dark);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* Header */
header {
  background: var(--light);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

nav ul {
  display: flex;
  gap: 1rem;
}

nav ul li a:hover {
  color: var(--primary);
  transition: color var(--transition);
}

/* Main */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2rem 1rem;
}

.download-card {
  background: var(--light);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-width: 700px;
  width: 100%;
  text-align: center;
}

.download-card h1 {
  margin-bottom: 1rem;
  font-size: 1.75rem;
  color: var(--dark);
}

.input-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.input-group input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: border-color var(--transition);
}

.input-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.input-group button {
  padding: 0.75rem 1.25rem;
  background: var(--primary);
  color: var(--light);
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.input-group button:hover {
  transform: translateY(-2px);
}

/* Progress Bar */
#progress-container {
  width: 100%;
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  height: 10px;
  margin-bottom: 1rem;
  display: none;
}

#progress-bar {
  height: 100%;
  width: 0%;
  background: var(--primary);
  transition: width 0.1s linear;
}

/* Download Result */
#download-result {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  margin-top: 2rem;
  max-width: 800px;
  width: 100%;
}

.preview-container {
  flex: 2;
}

.preview-container video {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.formats-list {
  flex: 1;
}

.formats-list h2 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  color: var(--dark);
}

.formats-list ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.formats-list ul li {
  background: var(--light);
  border: 1px solid var(--gray);
  padding: 0.75rem;
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background var(--transition);
}

.formats-list ul li:hover {
  background: var(--bg);
}

/* Footer */
footer {
  background: var(--light);
  padding: 1.5rem 1rem;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}

.footer-container {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.footer-nav ul {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav ul li a {
  color: var(--gray);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-nav ul li a:hover {
  color: var(--primary);
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--gray);
}

/* Responsive */
@media (max-width: 768px) {
  .input-group {
    flex-direction: column;
  }

  .input-group button {
    width: 100%;
  }

  #download-result {
    flex-direction: column;
    gap: 1.5rem;
  }

  .formats-list {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .nav-container {
    flex-direction: column;
    gap: 0.5rem;
  }

  nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .download-card {
    padding: 1.5rem;
  }

  .download-card h1 {
    font-size: 1.5rem;
  }
}

/* === Modern tablo görünümü === */
#download-result {
  display: grid;
  grid-template-columns: 2fr 1.2fr;
  /* sol video daha geniş */
  gap: 2rem;
  margin-top: 2rem;
  width: 100%;
  max-width: 1000px;
}

.formats-table li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  /* Format | Görüntüle | İndir */
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--light);
  border: 1px solid var(--gray);
  border-radius: var(--radius);
  transition: background var(--transition);
}

.formats-table li:hover {
  background: var(--bg);
}

/* Ortak buton stili */
.btn-action {
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: transform var(--transition);
}

.btn-view {
  background: var(--gray);
  color: var(--light);
}

.btn-download {
  background: var(--primary);
  color: var(--light);
}

.btn-action:hover {
  transform: translateY(-2px);
}

/* Küçük ekran düzeni */
@media (max-width: 768px) {
  #download-result {
    grid-template-columns: 1fr;
  }

  .formats-table li {
    grid-template-columns: 1fr auto;
  }

  /* Format | ↓ 2 buton */
  .btn-action {
    padding: 0.5rem 0.6rem;
  }

  .btn-view,
  .btn-download {
    font-size: 0.8rem;
  }
}


/* === Format | Görüntüle | İndir satırı hizalama === */
.formats-table li{
  display:flex;                 /* grid yerine flex */
  align-items:center;           /* dikey hizalama */
  gap:0.75rem;
  justify-content:space-between;
}

.format-res{                   /* sol metin */
  flex:1 1 auto;               /* boş alanı kaplasın */
  white-space:nowrap;          /* taşarsa tek satır kalsın */
  overflow:hidden;
  text-overflow:ellipsis;
}

.btn-action{                   /* ortak butonlar */
  flex-shrink:0;               /* dar ekranlarda bile küçülmesin */
}

/* Küçük ekran ince ayarları */
@media (max-width:480px){
  .formats-table li{
    gap:0.5rem;               /* biraz daha sıkı */
  }
  .btn-action{
    padding:0.45rem 0.7rem;   /* buton daralsın */
    font-size:0.8rem;
  }
  .format-res{
    font-size:0.9rem;
  }
}


/* === Consent Banner === */
.consent-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9999;
  background: var(--light);
  color: var(--dark);
  border-top: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
}

.consent-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: start;
}

.consent-text {
  display: grid;
  gap: .25rem;
}
.consent-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--dark);
}
.consent-desc {
  font-size: .95rem;
  color: var(--gray);
}

.consent-details {
  background: var(--bg);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius);
  padding: .75rem .9rem;
}
.consent-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--dark);
  list-style: none;
}
.consent-details[open] {
  background: var(--light);
}
.consent-options {
  margin-top: .6rem;
  display: grid;
  gap: .5rem;
  font-size: .95rem;
  color: var(--dark);
}
.consent-options label {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.consent-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

/* Buttons – sitenin buton diliyle uyumlu */
.btn-consent {
  padding: .6rem .9rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: .95rem;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), color var(--transition);
}
.btn-consent:hover { transform: translateY(-2px); }

.btn-accept {
  background: var(--primary);
  color: var(--light);
}
.btn-accept:hover {
  filter: brightness(0.95);
}

.btn-reject {
  background: #ef4444; /* kırmızı ton – istersen değiştir */
  color: var(--light);
}
.btn-reject:hover {
  filter: brightness(0.95);
}

.btn-save {
  background: var(--light);
  color: var(--dark);
  border-color: rgba(0,0,0,0.12);
}
.btn-save:hover {
  background: var(--bg);
}

/* "Daha fazla bilgi" linki */
.consent-more {
  color: var(--gray);
  text-decoration: underline;
  font-size: .9rem;
}
.consent-more:hover { color: var(--primary); }

/* Responsive */
@media (max-width: 768px) {
  .consent-container {
    grid-template-columns: 1fr;
  }
  .consent-actions {
    justify-content: flex-start;
  }
}
