:root {
  color-scheme: dark only;
  forced-color-adjust: none;
}

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

body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #0a0a0a 0%, #0f0f0f 50%, #0a0a0a 100%) !important;
  color: #ffffff !important;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 20%, rgba(255,215,0,0.03) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(255,215,0,0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.main-wrapper {
  width: min(920px, calc(100% - 20px));
  position: relative;
  z-index: 2;
  margin: 0 auto;
}

.container {
  width: 100%;
  background: #141414 !important;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.9), 0 0 0 1px #2a2a2a, 0 0 80px rgba(255,215,0,0.05);
  border: 1px solid #2a2a2a;
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(10px);
}

.container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffd700, transparent);
  z-index: 3;
}

.header {
  background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 50%, #1a1a1a 100%) !important;
  color: #ffffff !important;
  padding: 35px 20px 25px;
  text-align: center;
  position: relative;
  border-bottom: 1px solid #2a2a2a;
}

.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e6b800, transparent);
}

.app-title {
  font-size: 2.2em;
  font-weight: 900;
  letter-spacing: 4px;
  background: linear-gradient(135deg, #ffd700 0%, #ffed4a 30%, #e6b800 70%, #ffd700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px rgba(255,215,0,0.3);
  margin-bottom: 10px;
  animation: shimmer 3s infinite;
  color: transparent !important;
}

@keyframes shimmer {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2); }
}

.app-subtitle {
  font-size: 1em;
  color: #cccccc !important;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.content-area {
  padding: 30px 25px;
}

.shell {
  width: 100%;
  margin: 0;
  padding: 0;
}

.hero {
  text-align: center;
  margin-bottom: 24px;
}

.badge {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  color: #ffd700;
  background: rgba(255,215,0,0.05);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

h1 {
  font-size: clamp(22px, 5vw, 32px);
  line-height: 1.1;
  margin: 16px 0 10px;
  letter-spacing: -0.03em;
  color: #ffffff !important;
}

.hero p {
  color: #a0a0a0;
  font-size: 15px;
  margin-bottom: 0;
}

.card {
  padding: 24px;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  background: linear-gradient(135deg, #1a1a1a 0%, #151515 100%) !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: #cccccc;
  font-weight: 600;
}

.url-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input, select {
  width: 100%;
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 14px 16px;
  font: inherit;
  color: #fff;
  outline: none;
  transition: all 0.3s ease;
}

input:focus, select:focus {
  border-color: #ffd700;
  box-shadow: 0 0 0 3px rgba(255,215,0,0.1);
}

button, .result {
  color: #0a0a0a;
  background: linear-gradient(135deg, #ffd700, #e6b800);
  cursor: pointer;
  font-weight: 700;
  border: 0;
  border-radius: 12px;
  padding: 14px 24px;
  font: inherit;
  transition: all 0.3s ease;
  white-space: nowrap;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 20px rgba(255,215,0,0.2);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.media {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  margin-top: 20px;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border-radius: 14px;
  border: 1px solid #2a2a2a;
}

.media img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  background: #0a0a0a;
}

.meta h2 {
  font-size: 16px;
  margin: 5px 0;
  color: #ffffff;
}

.meta p {
  color: #a0a0a0;
  margin: 0;
  font-size: 13px;
}

.platform {
  color: #ffd700;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.options {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin-top: 16px;
}

.progress {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  background: rgba(255,215,0,0.03);
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255,215,0,0.1);
  border-top-color: #ffd700;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.result {
  display: block;
  text-align: center;
  text-decoration: none;
  margin-top: 16px;
}

.error {
  margin-top: 16px;
  color: #ff6b6b;
  background: rgba(255,107,107,0.08);
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
}

.note {
  text-align: center;
  color: #787d8b;
  font-size: 13px;
  margin-top: 16px;
}

.hidden {
  display: none !important;
}

/* Ana səhifəyə qayıt düyməsi */
.back-home {
  display: block;
  width: 100%;
  margin-top: 20px;
  text-align: center;
}

.back-home a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffd700;
  text-decoration: none;
  padding: 12px 24px;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  background: rgba(255,215,0,0.03);
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 14px;
}

.back-home a:hover {
  background: rgba(255,215,0,0.08);
  border-color: #ffd700;
  transform: translateY(-1px);
  box-shadow: 0 5px 20px rgba(255,215,0,0.1);
}

/* Responsive */
@media (max-width: 700px) {
  body {
    padding: 10px;
  }
  
  .header {
    padding: 25px 15px 20px;
  }
  
  .app-title {
    font-size: 1.8em;
  }
  
  .content-area {
    padding: 20px 15px;
  }
  
  .url-row,
  .options {
    grid-template-columns: 1fr;
  }
  
  .media {
    grid-template-columns: 80px 1fr;
  }
  
  .media img {
    width: 80px;
    height: 60px;
  }
  
  h1 {
    font-size: 20px;
  }
  
  .card {
    padding: 16px;
  }
}
