/* ============================================
   DESIGN SYSTEM - Image Cloud
   ============================================ */

:root {
  /* Cores principais */
  --primary-50: #eef2ff;
  --primary-100: #e0e7ff;
  --primary-200: #c7d2fe;
  --primary-300: #a5b4fc;
  --primary-400: #818cf8;
  --primary-500: #6366f1;
  --primary-600: #4f46e5;
  --primary-700: #4338ca;

  /* Cores de superfície (dark mode) */
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-tertiary: #1a1a24;
  --bg-card: #15151f;
  --bg-card-hover: #1e1e2d;
  --bg-elevated: #1f1f2e;

  /* Bordas */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-focus: rgba(99, 102, 241, 0.5);

  /* Texto */
  --text-primary: #f1f1f4;
  --text-secondary: #a1a1b5;
  --text-tertiary: #6b6b80;
  --text-inverse: #0a0a0f;

  /* Status */
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.1);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --warning: #f59e0b;

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);

  /* Tipografia */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Transições */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET & BASE
   ============================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Fundo com gradiente sutil */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(139, 92, 246, 0.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.app {
  position: relative;
  z-index: 1;
}

/* ============================================
   HEADER
   ============================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.logo h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-300) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-subtitle {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.header-stats {
  display: flex;
  gap: 12px;
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-icon {
  font-size: 0.85rem;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ============================================
   UPLOAD ZONE
   ============================================ */

.upload-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.upload-zone {
  position: relative;
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-xl);
  padding: 48px 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  background: var(--bg-secondary);
  overflow: hidden;
}

.upload-zone::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, rgba(139, 92, 246, 0.03) 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--primary-500);
  background: var(--bg-tertiary);
  box-shadow: var(--shadow-glow);
}

.upload-zone:hover::before,
.upload-zone.drag-over::before {
  opacity: 1;
}

.upload-zone-content {
  position: relative;
  z-index: 1;
}

.upload-icon-wrapper {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-base);
}

.upload-zone:hover .upload-icon-wrapper {
  transform: translateY(-4px);
}

.upload-icon {
  color: var(--primary-400);
}

.upload-zone h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.upload-zone p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.upload-formats {
  display: inline-block;
  padding: 6px 16px;
  background: var(--bg-tertiary);
  border-radius: 100px;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* ============================================
   UPLOAD PREVIEW
   ============================================ */

.upload-preview {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.preview-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.preview-actions {
  display: flex;
  gap: 8px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

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

.preview-item .remove-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all var(--transition-fast);
  opacity: 0;
}

.preview-item:hover .remove-btn {
  opacity: 1;
}

.preview-item .remove-btn:hover {
  background: var(--danger);
}

/* Progress bar */
.progress-bar-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 100px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary-500), var(--primary-400));
  border-radius: 100px;
  transition: width var(--transition-fast);
}

.progress-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  min-width: 40px;
  text-align: right;
}

/* ============================================
   RESULTS SECTION
   ============================================ */

.results-section {
  background: var(--bg-card);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-lg);
  padding: 20px;
  animation: slideUp 0.3s ease;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.results-header h3 {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--success);
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.result-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.result-info {
  flex: 1;
  min-width: 0;
}

.result-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-url {
  font-size: 0.75rem;
  color: var(--primary-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.result-url:hover {
  text-decoration: underline;
}

.result-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ============================================
   GALLERY
   ============================================ */

.gallery-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.gallery-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.gallery-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  transition: all var(--transition-fast);
}

.search-box:focus-within {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.search-box svg {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-family);
  width: 180px;
}

.search-box input::placeholder {
  color: var(--text-tertiary);
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 24px;
  color: var(--text-tertiary);
}

.gallery-empty p {
  font-size: 1rem;
  font-weight: 500;
  margin-top: 16px;
  color: var(--text-secondary);
}

.gallery-empty span {
  font-size: 0.85rem;
}

/* Gallery Card */
.gallery-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-base);
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.gallery-card:hover {
  border-color: var(--primary-500);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.gallery-card-image {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-tertiary);
}

.gallery-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery-card:hover .gallery-card-image img {
  transform: scale(1.05);
}

.gallery-card-info {
  padding: 12px;
}

.gallery-card-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.gallery-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

.gallery-card-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.gallery-card:hover .gallery-card-overlay {
  opacity: 1;
}

.overlay-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.overlay-btn:hover {
  background: var(--primary-600);
  transform: scale(1.1);
}

.overlay-btn.delete:hover {
  background: var(--danger);
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.page-info {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ============================================
   MODAL
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeInModal 0.2s ease;
}

@keyframes fadeInModal {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-content {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.25s ease;
}

@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--danger);
}

.modal-content img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  background: var(--bg-primary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-url-group label {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-bottom: 6px;
  display: block;
}

.url-copy-box {
  display: flex;
  gap: 8px;
}

.url-copy-box input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--primary-400);
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
  outline: none;
}

.url-copy-box input:focus {
  border-color: var(--primary-500);
}

.modal-actions {
  display: flex;
  gap: 8px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-family);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: white;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-400), var(--primary-500));
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-focus);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-ghost:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn-copy {
  background: var(--primary-600);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
}

.btn-copy:hover {
  background: var(--primary-500);
}

.btn-copy.copied {
  background: var(--success);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: var(--danger);
  color: white;
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--primary-500);
}

.btn-icon.spinning svg {
  animation: spin 0.8s linear infinite;
}

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

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
  min-width: 280px;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast.toast-exit {
  animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
  to {
    opacity: 0;
    transform: translateX(100px);
  }
}

.toast.success {
  border-color: rgba(34, 197, 94, 0.3);
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.3);
}

.toast.info {
  border-color: rgba(99, 102, 241, 0.3);
}

.toast-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ============================================
   HEADER NAVIGATION (TABS)
   ============================================ */

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-nav {
  display: flex;
  gap: 4px;
  background: var(--bg-tertiary);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-tertiary);
  font-family: var(--font-family);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
}

.nav-tab.active {
  background: var(--primary-600);
  color: white;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* ============================================
   TAB CONTENT
   ============================================ */

.tab-content {
  display: none;
  flex-direction: column;
  gap: 32px;
  animation: fadeInTab 0.35s ease;
}

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

@keyframes fadeInTab {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   DOCUMENTATION SECTION
   ============================================ */

.docs-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.docs-hero {
  text-align: center;
  padding: 40px 24px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.06) 100%);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
}

.docs-hero-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

.docs-hero-icon.playground-icon {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.3);
}

.docs-hero h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 6px;
  background: linear-gradient(135deg, var(--text-primary), var(--primary-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.docs-hero p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Docs Cards */
.docs-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.docs-card:hover {
  border-color: var(--border-default);
}

.docs-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
  flex-wrap: wrap;
  gap: 8px;
}

.docs-card-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.docs-card-body {
  padding: 20px;
}

.docs-card-body h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 20px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.docs-card-body h4:first-child {
  margin-top: 0;
}

.docs-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

/* Badges */
.docs-badge {
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-post {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.badge-get {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.badge-delete {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-info {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-400);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

/* Endpoint URL */
.endpoint-url {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  border: 1px solid var(--border-subtle);
}

.endpoint-url code {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.method-tag {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.method-tag.post {
  background: #3b82f6;
  color: white;
}

.method-tag.get {
  background: #22c55e;
  color: white;
}

.method-tag.delete {
  background: #ef4444;
  color: white;
}

/* Code Blocks */
.code-block {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border-subtle);
}

.code-lang {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.code-lang.success {
  color: var(--success);
}

.btn-copy-code {
  padding: 3px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 0.7rem;
  font-family: var(--font-family);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-copy-code:hover {
  background: var(--primary-600);
  color: white;
  border-color: var(--primary-600);
}

.btn-copy-code.copied {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.code-block pre {
  padding: 14px 16px;
  background: var(--bg-primary);
  overflow-x: auto;
  margin: 0;
}

.code-block code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #c9d1d9;
  white-space: pre;
}

/* Params Table */
.params-table {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.param-row {
  display: grid;
  grid-template-columns: 140px 80px 1fr;
  gap: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  align-items: center;
}

.param-row:last-child {
  border-bottom: none;
}

.param-row.header {
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.param-row span {
  color: var(--text-secondary);
}

.param-row code {
  color: var(--primary-400);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
}

/* Auth Methods */
.auth-methods {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.auth-method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.auth-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-400);
  text-transform: uppercase;
  min-width: 55px;
  letter-spacing: 0.03em;
}

.auth-method code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Docs Note */
.docs-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.docs-note svg {
  color: var(--primary-400);
  flex-shrink: 0;
  margin-top: 1px;
}

.docs-note code {
  color: var(--primary-400);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}

/* ============================================
   PLAYGROUND SECTION
   ============================================ */

.playground-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.playground-card {
  border-color: rgba(34, 197, 94, 0.15);
}

.playground-card:hover {
  border-color: rgba(34, 197, 94, 0.25);
}

/* Key Generator */
.keygen-controls {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.keygen-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.keygen-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.keygen-label select {
  padding: 8px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.82rem;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition-fast);
}

.keygen-label select:focus {
  border-color: var(--primary-500);
}

.keygen-result {
  animation: slideUp 0.3s ease;
  margin-top: 4px;
}

.keygen-result label {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  font-weight: 500;
  margin-bottom: 6px;
  display: block;
}

/* Playground Form */
.playground-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.playground-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.playground-row label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.playground-method-url {
  display: flex;
  gap: 8px;
}

.playground-method-url select,
.pg-input {
  padding: 10px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.playground-method-url select:focus,
.pg-input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.playground-method-url select:first-child {
  width: 100px;
  flex-shrink: 0;
}

.playground-method-url select:last-child {
  flex: 1;
}

.pg-input {
  width: 100%;
}

.pg-input::placeholder {
  color: var(--text-tertiary);
}

.pg-textarea {
  padding: 12px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
  resize: vertical;
  outline: none;
  line-height: 1.6;
  transition: border-color var(--transition-fast);
  width: 100%;
}

.pg-textarea:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.pg-textarea::placeholder {
  color: var(--text-tertiary);
}

/* cURL Generator */
.curl-generator {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  animation: slideUp 0.3s ease;
}

.curl-generator h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Playground Response */
.playground-response {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  animation: slideUp 0.3s ease;
}

.playground-response h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.response-status {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 4px;
}

.response-status.success {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.response-status.error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* ============================================
   RESPONSIVE
   ============================================ */


@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 12px;
  }

  .header-right {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .header-nav {
    width: 100%;
    justify-content: center;
  }

  .header-stats {
    width: 100%;
    justify-content: center;
  }

  .main {
    padding: 20px 16px 48px;
  }

  .upload-zone {
    padding: 32px 20px;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }

  .gallery-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .gallery-controls {
    width: 100%;
  }

  .search-box {
    flex: 1;
  }

  .search-box input {
    width: 100%;
  }

  .modal-content {
    max-width: 100%;
    margin: 12px;
  }

  .url-copy-box {
    flex-direction: column;
  }

  .modal-actions {
    flex-direction: column;
  }

  .result-item {
    flex-direction: column;
    text-align: center;
  }

  .result-info {
    width: 100%;
  }

  .result-actions {
    width: 100%;
    justify-content: center;
  }

  /* Docs responsive */
  .param-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .param-row.header {
    display: none;
  }

  .playground-method-url {
    flex-direction: column;
  }

  .playground-method-url select:first-child {
    width: 100%;
  }

  .keygen-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-method {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .auth-method code {
    font-size: 0.72rem;
    word-break: break-all;
  }

  .endpoint-url {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .preview-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .nav-tab span {
    display: none;
  }
}