/* ============================================================
   RankRax — CSV to PDF Converter | style.css
   Theme: Deep Navy + Greenish Teal Glassmorphism
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --bg: #0D1117;
  --accent: #00C896;
  --accent-dim: rgba(0, 200, 150, 0.15);
  --accent-glow: rgba(0, 200, 150, 0.35);
  --text: #F0F4F8;
  --text-muted: #8A9BB0;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-hover: rgba(255, 255, 255, 0.07);
  --radius: 16px;
  --radius-sm: 10px;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --shadow: 0 8px 32px rgba(0,0,0,0.45);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(0,200,150,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(0,150,255,0.06) 0%, transparent 60%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- Background Orbs ---------- */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
  animation: orbFloat 12s ease-in-out infinite alternate;
}
.orb-1 { width: 480px; height: 480px; background: #00C896; top: -150px; left: -150px; animation-delay: 0s; }
.orb-2 { width: 360px; height: 360px; background: #0080FF; bottom: -100px; right: -100px; animation-delay: -4s; }
.orb-3 { width: 240px; height: 240px; background: #00C896; top: 50%; left: 50%; transform: translate(-50%,-50%); animation-delay: -8s; }

@keyframes orbFloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, 20px) scale(1.08); }
}

/* Everything above z-index:0 */
header, main, section, footer { position: relative; z-index: 1; }

/* ---------- Glassmorphism ---------- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
}
.logo-icon { font-size: 1.2rem; }
.logo em { color: var(--accent); font-style: normal; }

.header-nav { display: flex; gap: 24px; }
.header-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}
.header-nav a:hover { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 80px 24px 40px;
  max-width: 760px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  padding: 6px 18px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-glow);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 20px;
  animation: fadeDown 0.6s ease both;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  animation: fadeDown 0.7s ease 0.1s both;
}

.hero-title .accent { color: var(--accent); }

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  animation: fadeDown 0.7s ease 0.2s both;
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Tool Wrapper ---------- */
.tool-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 60px;
  animation: fadeUp 0.7s ease 0.3s both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tool-card {
  padding: 36px;
  box-shadow: var(--shadow);
}

/* ---------- Upload Zone ---------- */
.upload-zone {
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.upload-icon { font-size: 3rem; margin-bottom: 12px; display: block; }
.upload-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; }
.upload-sub { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; }

.file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.btn-upload {
  background: var(--accent);
  color: #0D1117;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 28px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  position: relative;
  z-index: 2;
}
.btn-upload:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
  background: #00e6ae;
}

/* ---------- File Info Bar ---------- */
.file-info-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-glow);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  margin-top: 16px;
}
.file-icon { font-size: 1.3rem; }
.file-name { font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { color: var(--text-muted); font-size: 0.85rem; white-space: nowrap; }
.btn-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}
.btn-clear:hover { color: #ff5a5a; background: rgba(255,90,90,0.1); }

/* ---------- Options Row ---------- */
.options-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.option-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.option-group select,
.option-group input[type="text"] {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem;
  outline: none;
  transition: border-color var(--transition);
  appearance: none;
}
.option-group select:focus,
.option-group input[type="text"]:focus {
  border-color: var(--accent);
}
.option-group select option { background: #1a2030; }

/* ---------- Preview ---------- */
.preview-section { margin-top: 24px; }

.preview-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  animation: pulse 1.5s ease infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50%       { box-shadow: 0 0 0 6px transparent; }
}

.table-scroll { overflow-x: auto; border-radius: var(--radius-sm); }

.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 400px;
}

.preview-table thead tr {
  background: rgba(0,200,150,0.12);
}
.preview-table th {
  padding: 10px 14px;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--glass-border);
  white-space: nowrap;
}
.preview-table td {
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: var(--text);
}
.preview-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.preview-table tbody tr:last-child td { border-bottom: none; }

.preview-note { font-size: 0.82rem; color: var(--text-muted); margin-top: 8px; text-align: right; }

/* ---------- Action Buttons ---------- */
.action-row {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.btn-convert {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #0D1117;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 32px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  flex: 1;
  justify-content: center;
  min-width: 220px;
}
.btn-convert:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px var(--accent-glow);
  background: #00e6ae;
}
.btn-convert:active { transform: translateY(0); }
.btn-icon { font-size: 1.1rem; }

.btn-secondary {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 14px 24px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.btn-secondary:hover {
  background: var(--glass-hover);
  color: var(--text);
  border-color: rgba(255,255,255,0.18);
}

/* ---------- Status Message ---------- */
.status-msg {
  margin-top: 16px;
  font-size: 0.9rem;
  min-height: 24px;
  text-align: center;
  transition: opacity 0.3s ease;
}
.status-msg.success { color: var(--accent); }
.status-msg.error   { color: #ff5a5a; }
.status-msg.loading { color: var(--text-muted); }

/* ---------- Content Sections ---------- */
.content-section {
  max-width: 1100px;
  margin: 0 auto 70px;
  padding: 0 24px;
}

.content-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 28px;
  position: relative;
  display: inline-block;
}
.content-section h2::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ---------- How It Works ---------- */
.how-section { text-align: center; }
.how-section h2::after { left: 50%; transform: translateX(-50%); }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.step-card {
  padding: 28px 22px;
  text-align: left;
  transition: transform var(--transition), box-shadow var(--transition);
}
.step-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,200,150,0.12);
}

.step-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 10px;
}
.step-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.step-card p { color: var(--text-muted); font-size: 0.9rem; }

/* ---------- SEO Grid ---------- */
.seo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.seo-block {
  padding: 30px;
}
.seo-block h2 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  display: block;
}
.seo-block h2::after { display: none; }
.seo-block p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 14px; }
.seo-block ul { padding-left: 0; list-style: none; }
.seo-block ul li {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 5px 0;
  border-bottom: 1px solid var(--glass-border);
}
.seo-block ul li:last-child { border-bottom: none; }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; }

.faq-item {
  padding: 0;
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.faq-item:hover { box-shadow: 0 4px 20px rgba(0,200,150,0.08); }

.faq-item summary {
  padding: 18px 22px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  user-select: none;
  font-size: 0.97rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--accent);
  font-weight: 400;
  flex-shrink: 0;
  transition: transform var(--transition);
}
.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item p {
  padding: 0 22px 18px;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--glass-border);
  padding-top: 14px;
}

/* ---------- Hub Grid ---------- */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.hub-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 14px;
  text-decoration: none;
  color: var(--text);
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.hub-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,200,150,0.12);
  border-color: var(--accent-glow);
}
.hub-icon { font-size: 1.6rem; }
.hub-name { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); line-height: 1.3; }
.hub-card:hover .hub-name { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  background: rgba(13,17,23,0.8);
  border-top: 1px solid var(--glass-border);
  padding: 32px 24px;
  text-align: center;
}
.footer-inner p { color: var(--text-muted); font-size: 0.87rem; margin-bottom: 8px; }
.footer-inner a { color: var(--accent); text-decoration: none; }
.footer-links a { margin: 0 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .hero { padding: 56px 20px 28px; }
  .tool-card { padding: 22px 18px; }
  .action-row { flex-direction: column; }
  .btn-convert { min-width: unset; }
  .hub-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .header-nav { gap: 14px; }
}

@media (max-width: 420px) {
  .options-row { grid-template-columns: 1fr; }
}

/* ---------- Print Styles ---------- */
@media print {
  body { background: #fff; color: #000; }
  .site-header, .hero-badge, .action-row, .hub-section, .site-footer,
  .upload-zone, .file-info-bar, .options-row, .bg-orb { display: none !important; }
  .tool-card { box-shadow: none; border: 1px solid #ddd; }
}
