/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #f0f4f8;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f8fafc;
  --text-primary: #1a1a2e;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 20px 35px -12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --accent-primary: #4f46e5;
  --accent-secondary: #8b5cf6;
  --gradient-primary: linear-gradient(135deg, #4f46e5, #8b5cf6);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
}

[data-theme="dark"] {
  --bg-primary: #0a0e1a;
  --bg-secondary: #1a1f2e;
  --bg-tertiary: #222838;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 20px 35px -12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
}

body {
  background: var(--bg-primary);
  font-family: 'Inter', 'Poppins', system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  padding: 0;
  transition: background 0.3s ease, color 0.3s ease;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* ===== CONTAINER ===== */
.nur-container {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  background: var(--bg-secondary);
  box-shadow: none;
  overflow: hidden;
  border: none;
  border-radius: 0;
}

.nur-inner {
  padding: 0;
}

/* Body */
body {
  padding: 0;
}

/* ===== TOP BAR - Fixed Left ===== */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 1.2rem;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-secondary);
}

.logo h1 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #4f46e5;
  font-family: 'Poppins', sans-serif;
  white-space: nowrap;
  margin: 0;
  padding-left: 0;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

* 👇 EIKHANE ADD KORBEN */
.logo-icon {
  margin-right: 0.3rem;
  color: #4f46e5;
  vertical-align: middle;
}

[data-theme="dark"] .logo-icon {
  color: #a5b4fc;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.upload-btn {
  background: var(--gradient-primary);
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: 2rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.upload-btn:active {
  transform: scale(0.97);
}

.hamburger {
  position: relative;
}

.hamburger-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 0.8rem;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 45px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  min-width: 200px;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.dropdown-menu.show {
  display: block;
  animation: slideDown 0.2s ease;
}

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

.dropdown-item {
  padding: 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.15s ease;
}

.dropdown-item:last-child { border-bottom: none; }

.dropdown-item:hover {
  background: var(--accent-primary);
  color: white;
}

.dropdown-item i { width: 22px; }

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.25rem 0;
}

/* ===== PREVIEW BOX - Agekar moto border soho ===== */
.preview-box {
  background: var(--bg-tertiary);
  border-radius: 1.2rem;
  padding: 1.2rem;
  margin: 1rem 1.2rem;
  border: 2px dashed var(--border-color);
  transition: all 0.3s ease;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-box.has-image {
  border: 2px solid var(--accent-primary);
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.03), var(--bg-tertiary));
}

.preview-placeholder {
  text-align: center;
  color: var(--text-muted);
}

.preview-placeholder i {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

.preview-placeholder p {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: var(--text-secondary);
}

.preview-placeholder span {
  font-size: 0.75rem;
}

.preview-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.preview-content img {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 0.8rem;
  background: var(--bg-secondary);
}

.preview-info {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}

.dimension-badge, .size-badge {
  background: var(--bg-secondary);
  padding: 0.3rem 1rem;
  border-radius: 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.dimension-badge i, .size-badge i {
  color: var(--accent-primary);
  font-size: 0.7rem;
}

/* ===== TOOLS AREA ===== */
.tools-area {
  padding: 0 1.2rem 1.2rem 1.2rem;
}


.tool-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tool-panel.active-panel { display: block; }

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

.controls-card {
  margin: 0;
  padding: 3.5rem 1.5rem 1.5rem;
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border-color);
  border-radius: 1.5rem;  /* Tool panel er moto same */
  box-shadow: none;
}

.section-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1rem;
  border-left: 3px solid var(--accent-primary);
  padding-left: 0.8rem;
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title i { color: var(--accent-primary); }

.input-group { margin-bottom: 1rem; }

.input-group label {
  font-size: 0.75rem;
  font-weight: 500;
  display: block;
  margin-bottom: 0.3rem;
  color: var(--text-secondary);
}

.dim-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-secondary);
  border-radius: 1rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border-color);
}

.dim-box input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  width: 100%;
  outline: none;
  font-size: 0.9rem;
}

.dim-box span {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.crop-input, .format-select {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 0.5rem 1rem;
  width: 100%;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
}

.crop-input:focus, .format-select:focus {
  border-color: var(--accent-primary);
}

.preset-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.8rem 0;
}

.preset-group span {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.preset-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.3rem 0.8rem;
  border-radius: 1.5rem;
  font-size: 0.7rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.preset-btn:hover {
  background: var(--accent-primary);
  color: white;
}

.action-btn {
  background: var(--gradient-primary);
  border: none;
  width: 100%;
  padding: 0.7rem;
  border-radius: 1.5rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: white;
  cursor: pointer;
  margin: 0.8rem 0;
  transition: all 0.2s ease;
  font-family: 'Poppins', sans-serif;
}

.action-btn:active { transform: scale(0.98); }

.download-row {
  display: flex;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.download-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.6rem;
  border-radius: 1.5rem;
  text-align: center;
  flex: 1;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.download-btn:hover {
  background: var(--accent-primary);
  color: white;
}

.instruction-box {
  background: var(--bg-secondary);
  border-radius: 0.8rem;
  padding: 0.8rem;
  margin-top: 1rem;
  font-size: 0.75rem;
  border-left: 3px solid var(--accent-primary);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-hint {
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.status-text {
  font-size: 0.7rem;
  margin: 0.5rem 0;
  color: var(--text-secondary);
}

.info-text {
  font-size: 0.7rem;
  margin-top: 0.5rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.quality-group {
  margin: 1rem 0;
}

.quality-group label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.range-slider {
  width: 100%;
  margin-top: 0.3rem;
}

/* ===== ABOUT PANEL REDESIGN ===== */
.about-hero {
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 1.5rem 0 0.5rem;
}

.about-hero h2 {
  font-size: 1.6rem;
  font-weight: 700;
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  margin-bottom: 0.3rem;
  font-family: 'Poppins', sans-serif;
}

.about-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* About Cards */
.about-card {
  background: var(--bg-tertiary);
  border-radius: 1rem;
  padding: 1.2rem;
  margin-bottom: 0.8rem;
  border: 1px solid var(--border-color);
}

.about-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.about-card-header i {
  font-size: 1.2rem;
  color: var(--accent-primary);
  width: 24px;
  text-align: center;
}

.about-card-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
}

.about-card p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Developer Card */
.developer-info {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.developer-avatar {
  width: 60px;
  height: 60px;
  min-width: 60px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
}

.developer-details h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.1rem;
}

.dev-title {
  font-size: 0.7rem;
  color: var(--accent-primary);
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.dev-bio {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.6rem;
}

.dev-social {
  display: flex;
  gap: 0.6rem;
}

.dev-social-link {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.dev-social-link:hover {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

/* Published Apps */
.apps-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.app-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--bg-secondary);
  border-radius: 0.8rem;
  padding: 0.8rem;
  text-decoration: none;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.app-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.app-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
}

.quran-icon {
  background: linear-gradient(135deg, #10b981, #059669);
}

.app-details h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.1rem;
}

.app-details p {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
}

.app-link {
  font-size: 0.65rem;
  color: var(--accent-primary);
  font-weight: 500;
}

.app-link i {
  font-size: 0.55rem;
}

/* Contact Card */
.contact-card {
  text-align: center;
}

.contact-card .about-card-header {
  justify-content: center;
}

.contact-links {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 0.8rem;
  flex-wrap: wrap;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.2rem;
  border-radius: 1.5rem;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.2s ease;
  background: var(--accent-primary);
  color: white;
}

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

.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.about-footer-note {
  text-align: center;
  margin-top: 1rem;
  padding: 0.8rem;
}

.about-footer-note p {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.about-footer-note span {
  font-weight: 600;
  color: var(--text-secondary);
}

/* ===== FOOTER ===== */
/* ===== FOOTER ===== */
.main-footer {
  margin: 1rem 0 0 0;
  padding: 2.5rem 1.5rem 1.5rem;
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border-color);
  border-radius: 1.5rem 1.5rem 0 0;
  box-shadow: none;
}

/* Dark theme footer */
[data-theme="dark"] .main-footer {
  background: var(--bg-tertiary);
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

/* Social Media Icons */
.footer-social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  flex-wrap: nowrap;
}

.social-icon-link {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  text-decoration: none;
  transition: all 0.3s ease;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .social-icon-link {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.social-icon-link:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

/* Footer Links */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.footer-links a {
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 400;
  transition: color 0.2s ease;
  color: var(--text-muted);
}

[data-theme="dark"] .footer-links a {
  color: rgba(255, 255, 255, 0.5);
}

.footer-links a:hover {
  color: var(--accent-primary);
}

[data-theme="dark"] .footer-links a:hover {
  color: #ffffff;
}

.footer-links span {
  font-size: 0.7rem;
  color: var(--border-color);
}

[data-theme="dark"] .footer-links span {
  color: rgba(255, 255, 255, 0.15);
}

/* Copyright */
.footer-copyright p {
  font-size: 0.75rem;
  margin: 0;
  color: var(--text-muted);
  white-space: nowrap;
}

[data-theme="dark"] .footer-copyright p {
  color: rgba(255, 255, 255, 0.35);
}

.footer-copyright span {
  font-weight: 500;
  color: var(--text-secondary);
}

[data-theme="dark"] .footer-copyright span {
  color: rgba(255, 255, 255, 0.6);
}

/* ===== FOOTER RESPONSIVE ===== */
@media (max-width: 640px) {
  .main-footer {
    padding: 2rem 1rem 1.2rem;
  }
  
  .footer-social-icons {
    gap: 1rem;
  }
  
  .social-icon-link {
    width: 42px;
    height: 42px;
    font-size: 0.95rem;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 0.3rem;
  }
  
  .footer-links span {
    display: none;
  }
  
  .footer-links a {
    font-size: 0.8rem;
    padding: 0.3rem;
  }
  
  .footer-copyright p {
    white-space: normal;
    font-size: 0.7rem;
  }
}

@media (max-width: 380px) {
  .footer-social-icons {
    gap: 0.8rem;
  }
  
  .social-icon-link {
    width: 38px;
    height: 38px;
    font-size: 0.85rem;
  }
}

/* ===== RANGE INPUT ===== */
input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  height: 5px;
  background: var(--border-color);
  border-radius: 5px;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--accent-primary);
  border-radius: 50%;
}

/* ===== MOBILE OPTIMIZATION ===== */
@media (max-width: 480px) {
  .nur-inner { padding: 0.8rem; }
  .logo h1 { font-size: 1.3rem; }
  .upload-btn span { display: none; }
  .upload-btn { padding: 0.5rem 0.8rem; }
  .preview-box { min-height: 160px; }
  .services-grid { grid-template-columns: 1fr; }
}

/* ===== LEGAL POPUP ===== */
.legal-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}

.legal-popup.active {
  display: block;
}

.legal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.legal-modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-secondary);
  border-radius: 1.2rem;
  padding: 1.5rem;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.legal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-color);
}

.legal-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
}

.legal-close {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.legal-close:hover {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.legal-body {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

@media (max-width: 480px) {
  .legal-modal {
    padding: 1.2rem;
    border-radius: 1rem;
  }
}