@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700;800&family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&display=swap');

:root {
  --font-sans: 'Figtree', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
  --color-ground: #f7f1e6;
  --color-ground-deep: #efe6d3;
  --color-surface: #ffffff;
  --color-hairline: #e4d9c3;
  --color-ink: #1b2622;
  --color-muted: #5c5a52;
  --color-emerald-deep: #0f5a47;
  --color-emerald-night: #0a3d30;
  --color-emerald-soft: #dcebe4;
  --color-gold: #d4af37;
  --color-gold-soft: #f6ecd0;
  --color-live: #1e7a35;
  --color-danger: #c92a2a;
  --color-danger-soft: #ffe3e3;
  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --shadow-soft: 0 12px 34px -10px rgba(10, 61, 48, 0.10);
  --shadow-strong: 0 20px 50px -12px rgba(10, 61, 48, 0.22);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-ground);
  color: var(--color-ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .font-display {
  font-family: var(--font-display);
  line-height: 1.22;
  overflow-wrap: break-word;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Sacred 8-Pointed Star Pattern (from UmrahVoice CSS analysis) */
.star-field {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'><g fill='none' stroke='%230F5A47' stroke-opacity='0.075' stroke-width='1'><polygon points='32,6 39,25 58,32 39,39 32,58 25,39 6,32 25,25'/><circle cx='32' cy='32' r='10'/></g></svg>");
  background-size: 64px 64px;
}

.star-field-dark {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'><g fill='none' stroke='%23D4AF37' stroke-opacity='0.11' stroke-width='1'><polygon points='32,6 39,25 58,32 39,39 32,58 25,39 6,32 25,25'/><circle cx='32' cy='32' r='10'/></g></svg>");
  background-size: 64px 64px;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Top Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 241, 230, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-hairline);
  padding-top: env(safe-area-inset-top, 0px);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 10px 0;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  height: 46px;
  width: auto;
  flex-shrink: 0;
  border-radius: 10px;
  object-fit: contain;
  background: #ffffff;
  padding: 3px 6px;
  border: 1.5px solid rgba(212, 175, 55, 0.65);
  box-shadow: 0 2px 8px rgba(10, 61, 48, 0.08);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-emerald-night);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.3;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-ink);
}

.nav-links a {
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--color-emerald-deep);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-emerald-deep);
  color: #fff;
  box-shadow: 0 6px 18px rgba(15, 90, 71, 0.25);
}

.btn-primary:hover {
  background: var(--color-emerald-night);
  transform: translateY(-1px);
}

.btn-gold {
  background: linear-gradient(135deg, #d4af37, #b8911e);
  color: #16211d;
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.28);
}

.btn-gold:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--color-hairline);
  color: var(--color-emerald-night);
}

.btn-outline:hover {
  border-color: var(--color-emerald-deep);
  background: #fff;
}

.btn-danger {
  background: var(--color-danger);
  color: #fff;
}

.btn-sm {
  padding: 7px 13px;
  font-size: 0.8rem;
}

/* Badges & Pills */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.35;
  max-width: 100%;
}

.badge-live {
  background: rgba(30, 122, 53, 0.14);
  color: var(--color-live);
  border: 1px solid rgba(30, 122, 53, 0.3);
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-gold {
  background: var(--color-gold-soft);
  color: #7c5e08;
  border: 1px solid rgba(212, 175, 55, 0.45);
}

.badge-emerald {
  background: var(--color-emerald-soft);
  color: var(--color-emerald-night);
}

.live-dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  min-height: 8px;
  flex-shrink: 0;
  display: inline-block;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulse-live 1.6s infinite;
}

@keyframes pulse-live {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Cards */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}

.card-dark {
  background: linear-gradient(155deg, var(--color-emerald-night), #072920);
  color: #f7f1e6;
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-strong);
}

/* Audio Spectrum Bars */
.spectrum {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 44px;
}

.spectrum-bar {
  flex: 1;
  background: linear-gradient(to top, var(--color-emerald-deep), var(--color-gold));
  border-radius: 4px;
  min-height: 5px;
  transition: height 0.08s ease;
}

/* Grid helpers */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* Form Controls */
.input, .select, .textarea {
  width: 100%;
  padding: 12px 15px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-hairline);
  background: #fff;
  font-family: var(--font-sans);
  font-size: 16px; /* iOS Safari otomatik zoom yapmasını engeller */
  color: var(--color-ink);
  transition: border-color 0.2s;
}

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--color-emerald-deep);
  box-shadow: 0 0 0 3px rgba(15, 90, 71, 0.12);
}

.label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--color-emerald-night);
}

/* Table */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-hairline);
  font-size: 0.92rem;
}

th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  background: rgba(239, 230, 211, 0.45);
}

/* RTL Support for Arabic & Urdu */
[dir="rtl"] {
  text-align: right;
}

/* ==================== TABLET & MOBILE RESPONSIVE OPTIMIZATION ==================== */
@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }
}

@media (max-width: 960px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 14px;
  }

  .navbar-inner {
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
    padding: 10px 14px;
    gap: 10px;
  }

  .brand {
    width: 100%;
    justify-content: flex-start;
    gap: 10px;
  }

  .brand-logo {
    height: 38px;
    padding: 3px 6px;
  }

  .brand-title {
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-sub {
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: space-between;
  }

  .nav-actions .btn,
  .nav-actions .btn-sm {
    flex: 1 1 calc(50% - 6px);
    padding: 8px 10px;
    font-size: 0.76rem;
    border-radius: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .card {
    padding: 16px;
    border-radius: 16px;
  }

  .card-dark {
    padding: 18px;
    border-radius: 16px;
  }

  .badge {
    font-size: 0.73rem;
    padding: 5px 10px;
    border-radius: 10px;
  }

  .btn {
    padding: 11px 14px;
    font-size: 0.88rem;
    white-space: normal;
  }

  .btn-sm {
    padding: 7px 11px;
    font-size: 0.76rem;
    white-space: nowrap;
  }

  th, td {
    padding: 10px 12px;
    font-size: 0.82rem;
  }
}
