/* ========== CORE ========== */
:root {
  --bg-deep: #0a0a0f;
  --bg-card: #1c1c28;
  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --teal: #2a7b6f;
  --azure: #1a5276;
  --gcp-blue: #1a73e8;
  --aws-orange: #ff9900;
  --text-primary: #e4e4ec;
  --text-secondary: #9595a3;
  --border-subtle: rgba(255, 255, 255, 0.05);
  --radius: 12px;
  --transition: 0.25s;
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;
}

* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  cursor: none;
  overflow-x: hidden;
}
.noise-overlay { position:fixed; top:0; left:0; width:100%; height:100%; pointer-events:none; z-index:9999; opacity:0.4; mix-blend-mode:overlay; }
.grid-bg { position:fixed; top:0; left:0; width:100%; height:100%; background-image: linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px); background-size:60px 60px; z-index:-1; pointer-events:none; }

/* Cursor */
.cursor-dot, .cursor-ring { position:fixed; pointer-events:none; z-index:10000; transform:translate(-50%,-50%); }
.cursor-dot { width:8px; height:8px; background:var(--gold); border-radius:50%; box-shadow:0 0 10px var(--gold-light); }
.cursor-ring { width:30px; height:30px; border:2px solid var(--gold-light); border-radius:50%; transition:width 0.2s,height 0.2s,border-color 0.2s; opacity:0.6; }
.cursor-ring.hover { width:50px; height:50px; border-color:var(--teal); opacity:0.9; }

/* Nav */
.nav { position:sticky; top:0; z-index:100; background:rgba(10,10,15,0.7); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); border-bottom:1px solid rgba(201,168,76,0.15); transition:background 0.4s; }
.nav.scrolled { background:rgba(10,10,15,0.95); }
.nav-inner { max-width:1100px; margin:0 auto; padding:12px 20px; display:flex; align-items:center; justify-content:space-between; }
.nav-title { font-family:var(--font-heading); font-size:1.8rem; font-weight:600; color:var(--gold); }
.nav-link { color:var(--text-secondary); text-decoration:none; font-weight:500; }
.nav-link:hover { color:var(--gold-light); }

/* Container */
.container { max-width:1100px; margin:0 auto; padding: 20px 16px 60px; }

/* Hero */
.hero { text-align:center; margin-bottom: 32px; }
.hero h1 { font-family:var(--font-heading); font-size:clamp(2rem, 5vw, 3.2rem); font-weight:700; color:var(--gold-light); line-height:1.2; margin-bottom:12px; }
.subtitle { font-size:1.1rem; color:var(--text-secondary); max-width:600px; margin:0 auto; }

/* Scrape Row */
.scrape-row { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.input-group { display: flex; flex: 1; gap: 10px; min-width: 250px; }
.input-group input { flex: 1; }
button { padding: 12px 22px; border: none; border-radius: var(--radius); font-size: 1rem; font-weight: 600; font-family: var(--font-body); cursor: none; transition: all var(--transition); position: relative; overflow: hidden; }
.btn-accent { background: var(--gold); color: #0a0a0f; box-shadow: 0 4px 15px rgba(201,168,76,0.3); }
.btn-accent:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(201,168,76,0.4); }
.btn-save { background: var(--teal); color: #fff; box-shadow: 0 4px 10px rgba(42,123,111,0.3); }
.btn-save:hover { background: #2f8b7c; transform: translateY(-2px); }
.btn-export { background: var(--gcp-blue); color: white; box-shadow: 0 4px 10px rgba(26,115,232,0.3); }
.btn-export:hover { background: #4285f4; transform: translateY(-2px); }
.btn-clear { background: rgba(255,255,255,0.08); color: var(--text-secondary); border: 1px solid rgba(255,255,255,0.1); }
.btn-clear:hover { background: rgba(255,255,255,0.15); color: var(--text-primary); }
button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

input[type="text"], textarea {
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: var(--radius);
  font-size: 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  outline: none;
  transition: border-color var(--transition);
}
input[type="text"]:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.15); }
textarea { resize: vertical; width: 100%; }

.status { padding: 12px 16px; margin-bottom: 16px; border-radius: var(--radius); font-weight:500; }
.status-loading { background:rgba(26,115,232,0.12); color:var(--gcp-blue); border-left:4px solid var(--gcp-blue); }
.status-success { background:rgba(42,123,111,0.15); color:var(--teal); border-left:4px solid var(--teal); }
.status-error { background:rgba(255,87,34,0.1); color:#ff5722; border-left:4px solid #ff5722; }
.status-info { background:rgba(201,168,76,0.1); color:var(--gold-light); border-left:4px solid var(--gold); }

/* Post panel */
.post-panel { background:var(--bg-card); border-radius:var(--radius); padding:24px; margin-bottom:24px; border:1px solid var(--border-subtle); }
.section-title { font-family:var(--font-heading); font-size:1.7rem; font-weight:600; color:var(--gold); margin-bottom:16px; cursor:pointer; }
.meta-grid { display:grid; grid-template-columns: 140px 1fr; gap:12px 20px; }
.meta-label { font-weight:600; color:var(--text-secondary); font-family:var(--font-mono); }

/* Table */
.table-wrapper { background:var(--bg-card); border-radius:var(--radius); border:1px solid var(--border-subtle); overflow-x:auto; margin-bottom:16px; }
table { width:100%; border-collapse:collapse; font-family:var(--font-body); }
th, td { padding:12px 16px; text-align:left; }
th { background:rgba(201,168,76,0.08); color:var(--gold); font-weight:600; font-family:var(--font-heading); font-size:1rem; letter-spacing:0.5px; border-bottom:1px solid rgba(201,168,76,0.2); }
td { border-bottom:1px solid var(--border-subtle); }
.url-cell, .prompt-cell, .desc-cell { max-width:180px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.table-empty { text-align:center; color:var(--text-secondary); font-style:italic; }
.actions { display:flex; gap:10px; flex-wrap:wrap; }

/* Badges */
.badge { display:inline-block; padding:3px 8px; border-radius:20px; font-size:0.7rem; font-weight:600; font-family:var(--font-mono); text-transform:uppercase; letter-spacing:0.5px; }
.badge-metadata { background:rgba(42,123,111,0.25); color:var(--teal); }
.badge-gemini { background:rgba(26,115,232,0.25); color:var(--gcp-blue); }
.badge-video-gemini { background:rgba(255,153,0,0.2); color:var(--aws-orange); }
.badge-error, .badge-none { background:rgba(255,87,34,0.15); color:#ff5722; }

/* Batch section */
.batch-section { margin-bottom: 24px; border: 1px solid var(--border-subtle); border-radius: var(--radius); background:var(--bg-card); padding: 16px 20px; }
.batch-inner { margin-top: 12px; }
.batch-controls { display: flex; gap: 10px; margin: 12px 0; }
.batch-progress { margin: 10px 0; }
.progress-bar { height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--gold); width: 0%; transition: width 0.3s; }
.batch-list { list-style: decimal; padding-left: 24px; max-height: 250px; overflow-y: auto; }
.batch-list li { padding: 6px 0; border-bottom: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: space-between; }
.batch-list .done { color: var(--teal); text-decoration: line-through; opacity: 0.7; }
.batch-list .failed { color: #ff5722; }
.batch-list button { padding: 2px 10px; font-size:0.8rem; background:none; border:1px solid var(--text-secondary); color:var(--text-secondary); border-radius:4px; }
.batch-list button:hover { background:rgba(255,255,255,0.1); }

/* Search */
.search-section { margin-bottom: 16px; }
.search-section input { width: 100%; }

/* Collection */
.collection-section { margin-top: 32px; }
.collection-actions { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap:wrap; }
.collection-list { background:var(--bg-card); border:1px solid var(--border-subtle); border-radius:var(--radius); padding:16px; }
.collection-item { padding:12px 0; border-bottom:1px solid var(--border-subtle); position:relative; }
.collection-item:last-child { border-bottom:none; }
.collection-meta { display:flex; align-items:center; gap:12px; margin-bottom:6px; font-size:0.85rem; flex-wrap:wrap; }
.collection-desc { font-size:0.85rem; color:var(--text-secondary); margin-bottom:4px; }
.collection-url a { color:var(--teal); font-family:var(--font-mono); font-size:0.8rem; text-decoration:none; }
.tag-badge { display:inline-block; padding:2px 8px; background:rgba(201,168,76,0.2); color:var(--gold-light); border-radius:20px; font-size:0.7rem; font-family:var(--font-mono); margin-left:6px; }
.delete-saved-btn { position:absolute; top:8px; right:8px; background:none; border:1px solid rgba(255,255,255,0.15); color:var(--text-secondary); width:26px; height:26px; border-radius:50%; font-size:14px; display:flex; align-items:center; justify-content:center; padding:0; }
.delete-saved-btn:hover { background:rgba(255,87,34,0.2); color:#ff5722; }

/* Reveal animations */
.reveal { opacity:0; transform:translateY(20px); transition:opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity:1; transform:translateY(0); }

/* Responsive */
@media (max-width: 768px) {
  .scrape-row { flex-direction: column; align-items: stretch; }
  .input-group { flex-direction: column; }
  button { padding: 10px 18px; }
  .meta-grid { grid-template-columns: 1fr; }
  .batch-list { max-height: 180px; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .nav-title { font-size: 1.4rem; }
}

/* JSON Prompts */
.json-actions { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.json-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.json-card { background: rgba(28, 28, 40, 0.7); border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: 16px; }
.json-card h4 { font-family: var(--font-heading); color: var(--teal); margin-bottom: 8px; }
.json-card .json-tool { font-family: var(--font-mono); font-size: 0.8rem; color: var(--gold); margin-bottom: 8px; }
.json-card pre { background: rgba(0,0,0,0.3); padding: 10px; border-radius: 6px; font-size: 0.75rem; overflow-x: auto; max-height: 200px; color: var(--text-secondary); }
.json-card .card-actions { margin-top: 10px; display: flex; gap: 8px; }
.json-card .card-actions button { padding: 6px 14px; font-size: 0.8rem; border-radius: 6px; }
.btn-teal { background: var(--teal); color: white; }
.btn-teal:hover { background: #2f8b7c; }

/* Tabs & Profile Progress */
.tabs { display: flex; gap: 0; margin-bottom: 16px; }
.tab {
  padding: 10px 24px;
  background: transparent;
  border: 1px solid rgba(201,168,76,0.3);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition);
}
.tab.active {
  background: var(--bg-card);
  color: var(--gold);
  border-color: rgba(201,168,76,0.6);
  border-bottom: 1px solid var(--bg-card);
}
.tab-content { background: var(--bg-card); padding: 16px; border-radius: 0 var(--radius) var(--radius) var(--radius); border: 1px solid var(--border-subtle); border-top: none; }
.profile-progress { margin-top: 12px; }
