/* Husnain Ali Poster Studio — Deep Slate & Midnight Newsroom Theme */

@font-face {
  font-family: "Headline";
  src: url("fonts/FuturaStdSmallCapsMedium.otf") format("opentype"),
       url("fonts/FuturaStdSmallCapsMedium.ttf") format("truetype"),
       url("fonts/Jost.ttf") format("truetype");
  font-weight: 100 900;
  font-display: block;
}
@font-face {
  font-family: "InterUI";
  src: url("fonts/Inter.ttf") format("truetype");
  font-weight: 100 900;
  font-display: block;
}
@font-face {
  font-family: "Jameel Noori Nastaleeq";
  src: url("fonts/JameelNooriNastaleeq.ttf") format("truetype"),
       url("https://cdn.jsdelivr.net/npm/jameel-noori/fonts/jameel-noori-nastaleeq4.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Jameel Noori Nastaleeq Regular";
  src: url("fonts/JameelNooriNastaleeq.ttf") format("truetype"),
       url("https://cdn.jsdelivr.net/npm/jameel-noori/fonts/jameel-noori-nastaleeq4.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-main: #080c14;
  --bg-surface: #0f172a;
  --bg-card: #131d31;
  --bg-card-sub: #1e293b;
  --border: #1e2e4a;
  --border-focus: #3b82f6;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-blue: #2563eb;
  --accent-blue-hover: #1d4ed8;
  --accent-amber: #f59e0b;
  --nastaleeq: "Jameel Noori Nastaleeq", "Noto Nastaliq Urdu", serif;
  --sans: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.studio-unlocked #gateModal {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-main);
  color: var(--text-main);
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
}

/* Page scrolling: natural and responsive across all screens */
.admin-html,
.admin-page,
body.admin-body {
  height: auto !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* Typography Helpers */
.font-urdu {
  font-family: var(--nastaleeq) !important;
  direction: rtl !important;
  text-align: right;
  line-height: 1.75;
}

.font-urdu-title {
  font-family: var(--nastaleeq) !important;
  direction: rtl !important;
  line-height: 1.6;
}

/* Custom Scrollbars */
.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #25334d;
  border-radius: 9999px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #3b82f6;
}

/* Buttons and Touch Targets */
.btn-touch {
  min-height: 42px;
  touch-action: manipulation;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-touch:active {
  transform: scale(0.98);
}

/* Poster Canvas Frame */
#poster {
  touch-action: pan-y pinch-zoom;
  cursor: grab;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08);
  border-radius: 6px;
}
#poster.dragging {
  touch-action: none !important;
  cursor: grabbing !important;
}

.preview-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(circle at center, #0e1626 0%, #060910 100%);
  border: 1px solid #1a2538;
}

input[type="range"] {
  accent-color: #3b82f6;
}

/* Tabs */
.tab {
  transition: all 0.18s ease;
}
.tab.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}
.pane {
  display: none !important;
}
.pane.active {
  display: flex !important;
}

/* Image Thumbnails */
.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.thumbs img,
.thumb-item {
  width: 54px !important;
  height: 54px !important;
  max-width: 54px !important;
  max-height: 54px !important;
  object-fit: cover !important;
  border-radius: 10px !important;
  border: 1px solid #1e2e4a !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  flex-shrink: 0 !important;
  background-color: #0c121e;
}
.thumbs img:hover,
.thumb-item:hover {
  border-color: #3b82f6 !important;
  transform: translateY(-1px);
}
.thumbs img.active,
.thumb-item.active {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px #3b82f6, 0 4px 12px rgba(59, 130, 246, 0.4) !important;
}

/* Glass & Card Surfaces */
.news-card {
  background: linear-gradient(180deg, #111a2c 0%, #0c1322 100%);
  border: 1px solid #1b2840;
  transition: all 0.2s ease;
}
.news-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 15px rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
}

/* Admin Card */
.admin-card {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 16px;
  padding: 18px;
}
