/* ==========================================================================
   HP Study - Clean Minimal Sarkari Exam Tools Stylesheet
   Super Clean, Distraction-Free, Mobile-First Responsive
   ========================================================================== */

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

:root {
  --hp-primary: #1e40af;
  --hp-primary-hover: #1e3a8a;
  --hp-primary-light: rgba(30, 64, 175, 0.08);
  --hp-gradient: linear-gradient(135deg, #1e40af 0%, #0369a1 100%);
  --hp-gradient-success: linear-gradient(135deg, #10b981 0%, #047857 100%);
  
  --hp-bg-card: #ffffff;
  --hp-bg-subtle: #f8fafc;
  --hp-border: #e2e8f0;
  --hp-text-main: #0f172a;
  --hp-text-muted: #64748b;
  
  --hp-radius-md: 12px;
  --hp-radius-lg: 16px;
  --hp-radius-full: 9999px;
  --hp-transition: all 0.2s ease-in-out;
}

/* Minimal Container */
.hp-tool-card {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--hp-bg-card);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-lg);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.08);
  max-width: 800px;
  margin: 1.5rem auto;
  padding: 1.5rem;
  box-sizing: border-box;
  color: var(--hp-text-main);
  width: 100%;
}

.hp-tool-card * {
  box-sizing: border-box;
}

.hp-tool-title {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 800;
  margin: 0 0 0.25rem 0;
  color: var(--hp-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hp-tool-subtitle {
  font-size: 0.88rem;
  color: var(--hp-text-muted);
  margin: 0 0 1.25rem 0;
}

/* Upload Dropzone */
.hp-dropzone {
  border: 2px dashed #93c5fd;
  background: #f0f9ff;
  border-radius: var(--hp-radius-md);
  padding: 2.25rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--hp-transition);
}

.hp-dropzone:hover, .hp-dropzone.hp-dragover {
  border-color: var(--hp-primary);
  background: #e0f2fe;
}

.hp-dropzone-icon {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.hp-dropzone-text {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
}

.hp-dropzone-subtext {
  font-size: 0.8rem;
  color: var(--hp-text-muted);
  margin: 0 0 1rem 0;
}

.hp-btn-browse {
  background: var(--hp-gradient);
  color: white;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: var(--hp-radius-full);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
  transition: var(--hp-transition);
}

.hp-btn-browse:hover {
  transform: translateY(-1px);
}

.hp-file-input {
  display: none;
}

/* Options Bar */
.hp-options-bar {
  margin-top: 1.25rem;
  background: var(--hp-bg-subtle);
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-md);
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  align-items: center;
}

.hp-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hp-form-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--hp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.hp-select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--hp-text-main);
  background: white;
  outline: none;
}

.hp-select:focus {
  border-color: var(--hp-primary);
}

.hp-input-number {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--hp-border);
  border-radius: var(--hp-radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  outline: none;
}

.hp-input-number:focus {
  border-color: var(--hp-primary);
}

/* Thumbnail Grid */
.hp-thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
  max-height: 320px;
  overflow-y: auto;
  padding: 0.5rem;
  background: #f8fafc;
  border-radius: var(--hp-radius-md);
  border: 1px solid var(--hp-border);
}

.hp-thumb-card {
  background: white;
  border-radius: 8px;
  border: 1px solid var(--hp-border);
  overflow: hidden;
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.hp-thumb-box {
  width: 100%;
  height: 100px;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hp-thumb-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.hp-thumb-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(0,0,0,0.75);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 99px;
}

.hp-thumb-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ef4444;
  color: white;
  border: none;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Action Button */
.hp-btn-action {
  margin-top: 1.25rem;
  width: 100%;
  background: var(--hp-gradient);
  color: white;
  border: none;
  padding: 0.85rem;
  border-radius: var(--hp-radius-full);
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
  transition: var(--hp-transition);
}

.hp-btn-action:hover {
  transform: translateY(-1px);
}

/* Result Box */
.hp-result-card {
  display: none;
  margin-top: 1.25rem;
  text-align: center;
  padding: 1.5rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--hp-radius-md);
}

.hp-stat-badge {
  display: inline-block;
  background: white;
  padding: 0.4rem 0.85rem;
  border-radius: var(--hp-radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  color: #15803d;
  margin-bottom: 1rem;
  border: 1px solid #86efac;
}

.hp-btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--hp-gradient-success);
  color: white;
  text-decoration: none;
  padding: 0.75rem 1.75rem;
  border-radius: var(--hp-radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.hp-btn-download:hover {
  transform: translateY(-1px);
}

@media (max-width: 480px) {
  .hp-tool-card { padding: 1rem; }
  .hp-options-bar { grid-template-columns: 1fr; }
}
