@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700;800&display=swap');

:root {
  --bg-color: #08060d;
  --panel-bg: rgba(18, 13, 30, 0.65);
  --border-color: rgba(255, 255, 255, 0.06);
  --text-primary: #f2eff7;
  --text-secondary: #9791af;
  
  /* Brand Palette */
  --neon-cyan: #00f2fe;
  --neon-cyan-glow: rgba(0, 242, 254, 0.3);
  --neon-purple: #9d4edd;
  --neon-purple-glow: rgba(157, 78, 221, 0.25);
  --youtube-red: #ff003c;
  --youtube-glow: rgba(255, 0, 60, 0.3);
  
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

body {
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(157, 78, 221, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 242, 254, 0.1) 0%, transparent 45%);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Header Design */
header {
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(16px);
  background: rgba(8, 6, 13, 0.6);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand i {
  font-size: 1.6rem;
}

.brand-dot {
  width: 8px;
  height: 8px;
  background-color: var(--neon-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--neon-cyan);
  display: inline-block;
  animation: pulse-cyan 2.5s infinite;
}

.header-links {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover, .nav-linkactive {
  color: var(--neon-cyan);
  text-shadow: 0 0 8px var(--neon-cyan-glow);
}

.nav-linkactive {
  text-decoration: none;
  font-weight: 600;
}

/* Main Layout Grid */
main {
  flex: 1;
  width: 100%;
  padding: 2rem 1.5rem;
}

.main-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 992px) {
  .main-container {
    grid-template-columns: 1.3fr 0.7fr;
  }
}

/* Glassmorphism Panel */
.panel {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.4);
  margin-bottom: 2rem;
}

.section-title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

/* Tab buttons switcher */
.tabs-container {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.tab-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1rem;
  padding: 1rem;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(157, 78, 221, 0.2), rgba(0, 242, 254, 0.08));
  border-color: var(--neon-purple);
  color: var(--text-primary);
  box-shadow: 0 0 15px rgba(157, 78, 221, 0.2);
}

/* Tab views */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Search Box & Inputs */
.search-box-container {
  display: flex;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.4rem;
  align-items: center;
  transition: all 0.3s ease;
}

.search-box-container:focus-within {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px var(--neon-cyan-glow);
  background: rgba(255, 255, 255, 0.05);
}

.input-icon {
  font-size: 1.4rem;
  color: var(--text-secondary);
  padding: 0 0.8rem;
}

#youtubeView .input-icon {
  color: var(--youtube-red);
}

#instagramView .input-icon {
  color: #ff007f;
}

.tool-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.8rem 0;
}

.tool-input::placeholder {
  color: var(--text-secondary);
}

.action-btn {
  background: linear-gradient(135deg, var(--youtube-red), #b30022);
  border: none;
  border-radius: 10px;
  color: #ffffff;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.85rem 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 15px var(--youtube-glow);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--youtube-glow);
}

.action-btn.btn-insta {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  box-shadow: 0 4px 15px rgba(220, 39, 67, 0.4);
}

.action-btn.btn-insta:hover {
  box-shadow: 0 6px 20px rgba(220, 39, 67, 0.5);
}

/* Spinner Loader */
.loader-container {
  text-align: center;
  padding: 2.5rem 0;
}

.loader-container p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 1rem;
}

.neon-ring {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.05);
  border-top-color: var(--neon-cyan);
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 10px var(--neon-cyan-glow);
}

/* Error Alerts */
.error-alert {
  background: rgba(255, 0, 60, 0.1);
  border: 1px solid var(--youtube-red);
  color: #ffb3c1;
  border-radius: 10px;
  padding: 1rem;
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

/* Dynamic Results Layout */
.result-section {
  margin-top: 2rem;
  animation: fade-in 0.4s ease;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .results-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
}

.card-title {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-title i {
  color: var(--neon-cyan);
}

/* Thumbnail Downloads Card */
.thumbnail-preview-box {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  margin-bottom: 1rem;
  background: #000;
}

.img-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.download-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.download-item-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.download-item-btn:hover {
  background: rgba(0, 242, 254, 0.08);
  border-color: var(--neon-cyan);
  color: #ffffff;
}

/* Tags Card */
.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.card-header-flex .card-title {
  margin-bottom: 0;
}

.btn-copy {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.3s ease;
}

.btn-copy:hover {
  background: rgba(255, 255, 255, 0.1);
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

/* Custom Scrollbar for Tags */
.tags-container::-webkit-scrollbar {
  width: 4px;
}
.tags-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.tag-badge {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
}

.no-tags-msg {
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-align: center;
  padding: 3rem 0;
}

/* Instagram Result Card */
.ig-card-center {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.ig-preview-box {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
  position: relative;
  background: #000;
}

.ig-media-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  letter-spacing: 0.05em;
}

.download-large-btn {
  background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-purple) 100%);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1rem;
  padding: 1.1rem;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.25);
  cursor: pointer;
  transition: all 0.3s ease;
}

.download-large-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 242, 254, 0.35);
}

/* Ad Placement Containers (Google AdSense Ready) */
/* Ad Placement Containers (Google AdSense Ready) */
.ad-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 1.5rem 0;
}

.ad-slot {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.01) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.ad-slot:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.05) 100%);
}

.ad-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.1em;
  position: absolute;
  top: 6px;
  left: 10px;
  text-transform: uppercase;
}

.ad-placeholder-text {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ad-top-banner {
  width: 100%;
  max-width: 970px;
  height: 90px;
  margin-top: 1rem;
}

.ad-bottom-banner {
  width: 100%;
  max-width: 970px;
  height: 90px;
}

.ad-sidebar {
  width: 100%;
  height: 250px;
  margin-bottom: 2rem;
}

.ad-inline {
  width: 100%;
  height: 80px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.01) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 1.5rem;
  transition: border-color 0.3s ease;
}

.ad-inline:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.ad-label-inline {
  font-size: 0.6rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.25);
  position: absolute;
  top: 6px;
  left: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Sidebar Info Cards */
.sidebar-panel {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
}

.sidebar-panel-title {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-panel-title i {
  color: var(--neon-cyan);
}

.features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.features-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.features-list li i {
  font-size: 1rem;
  margin-top: 0.15rem;
}

.features-list li strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.features-list li p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.text-neon-cyan {
  color: var(--neon-cyan);
}

/* Utility Margins */
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.w-100 { width: 100%; }

/* Footer Design */
footer {
  background: rgba(8, 6, 13, 0.8);
  border-top: 1px solid var(--border-color);
  padding: 2.5rem 1.5rem;
  text-align: center;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

footer p {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.footer-disclaimer {
  font-size: 0.75rem;
  opacity: 0.6;
}

/* Animations */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse-cyan {
  0% { box-shadow: 0 0 5px var(--neon-cyan-glow); }
  50% { box-shadow: 0 0 15px var(--neon-cyan); }
  100% { box-shadow: 0 0 5px var(--neon-cyan-glow); }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile and Tablet Responsiveness Updates */
@media (max-width: 767px) {
  .ad-top-banner, .ad-bottom-banner {
    height: 60px;
    max-width: 320px;
  }
  
  .ad-top-banner .ad-placeholder-text, .ad-bottom-banner .ad-placeholder-text {
    font-size: 0.65rem;
  }
  
  .ad-sidebar {
    height: 250px;
    max-width: 300px;
    margin: 0 auto 1.5rem auto;
  }
  
  .ad-inline {
    height: 60px;
    max-width: 320px;
    margin: 0 auto 1rem auto;
  }
  
  .ad-inline .ad-placeholder-text {
    font-size: 0.65rem;
  }
}

@media (max-width: 575px) {
  header {
    padding: 1rem;
  }
  
  .header-container {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  
  .header-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem 1.2rem;
  }
  
  .brand {
    font-size: 1.35rem;
  }
  
  main {
    padding: 1rem 0.75rem;
  }
  
  .panel {
    padding: 1.25rem 1rem;
    border-radius: 14px;
    margin-bottom: 1.25rem;
  }
  
  .section-title {
    font-size: 1.3rem;
  }
  
  .tabs-container {
    gap: 0.5rem;
  }
  
  .tab-btn {
    font-size: 0.85rem;
    padding: 0.75rem 0.5rem;
    border-radius: 8px;
  }
  
  .search-box-container {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem;
  }
  
  .tool-input {
    width: 100%;
    text-align: center;
    padding: 0.5rem 0;
  }
  
  .action-btn {
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1.25rem;
  }
  
  .download-large-btn {
    font-size: 0.9rem;
    padding: 0.95rem;
  }
}