/* ============================================
   ALTIN PINARI KUYUMCULUK - STYLE
   Premium Light Gold Theme
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ---- CSS Variables ---- */
:root {
  --bg-primary: #faf8f4;
  --bg-secondary: #f3f0e8;
  --bg-card: #ffffff;
  --bg-table-row: #fdfcfa;
  --bg-table-row-alt: #f8f6f1;
  --bg-table-hover: #f0ede4;

  --gold-dark: #8b6914;
  --gold: #b8941f;
  --gold-light: #d4a843;
  --gold-glow: rgba(184, 148, 31, 0.08);
  --gold-glow-strong: rgba(184, 148, 31, 0.15);

  --text-primary: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #888888;

  --green: #1a7a3a;
  --green-bg: rgba(26, 122, 58, 0.06);
  --red: #c0392b;
  --red-bg: rgba(192, 57, 43, 0.06);

  --border-color: rgba(0, 0, 0, 0.08);
  --border-color-strong: rgba(184, 148, 31, 0.25);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-gold: 0 0 20px rgba(184, 148, 31, 0.06);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

/* ---- Background Aesthetic ---- */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 600px 400px at 50% 0%, rgba(184, 148, 31, 0.04) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 0% 50%, rgba(184, 148, 31, 0.02) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 100% 80%, rgba(184, 148, 31, 0.02) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ---- Loading Screen ---- */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  animation: pulse-gold 1.5s ease-in-out infinite;
  margin-bottom: 24px;
}

.loading-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--gold-dark);
  letter-spacing: 2px;
}

.loading-bar {
  width: 200px;
  height: 2px;
  background: var(--bg-secondary);
  border-radius: 2px;
  margin-top: 16px;
  overflow: hidden;
}

.loading-bar::after {
  content: '';
  display: block;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light), var(--gold-dark));
  border-radius: 2px;
  animation: loading-slide 1.2s ease-in-out infinite;
}

@keyframes loading-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

@keyframes pulse-gold {
  0%, 100% { 
    box-shadow: 0 0 20px rgba(184, 148, 31, 0.15); 
    transform: scale(1);
  }
  50% { 
    box-shadow: 0 0 40px rgba(184, 148, 31, 0.25); 
    transform: scale(1.05);
  }
}

/* ---- TV Main Layout ---- */
.tv-main {
  padding: 8px 16px 4px;
  position: relative;
  z-index: 1;
  flex: 1;
}

.tv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.tv-right-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ---- TV Sections ---- */
.tv-section {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}

.tv-section:nth-child(1) { animation-delay: 0.05s; }
.tv-section:nth-child(2) { animation-delay: 0.1s; }
.tv-section:nth-child(3) { animation-delay: 0.15s; }

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

.tv-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color-strong);
}

.tv-section-icon {
  font-size: 1rem;
}

.tv-section-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--gold-dark);
  letter-spacing: 0.5px;
}

.tv-section-badge {
  margin-left: auto;
  font-size: 0.6rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

/* ---- TV Table ---- */
.tv-table-wrapper {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  position: relative;
}

.tv-table-wrapper::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.5;
}

.tv-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.tv-table thead th {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
  padding: 14px 20px;
  text-align: left;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-bottom: 2px solid var(--border-color-strong);
}

.tv-table thead th:nth-child(1) { width: 38%; }
.tv-table thead th:nth-child(2),
.tv-table thead th:nth-child(3) {
  width: 31%;
  text-align: right;
}

.tv-table tbody tr {
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: background var(--transition-fast);
}

.tv-table tbody tr:nth-child(even) {
  background: var(--bg-table-row-alt);
}

.tv-table tbody tr:hover {
  background: var(--bg-table-hover);
}

.tv-table tbody td {
  padding: 14px 20px;
  font-size: 1.7rem;
  vertical-align: middle;
}

.tv-table tbody td:first-child {
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tv-table tbody td:nth-child(2),
.tv-table tbody td:nth-child(3) {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 1.85rem;
  letter-spacing: 0.3px;
}

.tv-table tbody td:nth-child(2) { color: var(--green); }
.tv-table tbody td:nth-child(3) { color: var(--red); }

/* ---- Ticker ---- */
.ticker-bar {
  background: linear-gradient(90deg, var(--bg-secondary), var(--bg-card), var(--bg-secondary));
  border-bottom: 1px solid var(--border-color);
  padding: 5px 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.ticker-content {
  display: flex;
  align-items: center;
  gap: 28px;
  animation: ticker-scroll 40s linear infinite;
  white-space: nowrap;
  width: max-content;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.ticker-item .label { color: var(--gold-dark); font-weight: 600; }
.ticker-item .value { color: var(--text-primary); font-weight: 500; font-variant-numeric: tabular-nums; }
.ticker-divider { color: var(--text-muted); opacity: 0.3; }

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---- Header TV compact ---- */
.header {
  padding: 10px 16px;
  border-bottom: 2px solid var(--border-color-strong);
  position: relative;
  z-index: 1;
  background: var(--bg-card);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  box-shadow: 0 0 12px rgba(184, 148, 31, 0.15);
  transition: var(--transition-normal);
}

.header-logo:hover {
  box-shadow: 0 0 20px rgba(184, 148, 31, 0.25);
  transform: scale(1.05);
}

.header-title {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--gold-dark);
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.header-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-top: 1px;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.live-clock {
  font-family: var(--font-body);
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}

.live-date {
  font-size: 0.68rem;
  color: var(--text-secondary);
}

.update-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 1.1rem;
  color: var(--text-muted);
}

.update-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ---- TV Footer ---- */
.tv-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 6px 16px;
  border-top: 2px solid var(--border-color-strong);
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  background: var(--bg-card);
}

.footer-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.footer-brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.footer-logo {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--gold);
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-dark);
  letter-spacing: 0.5px;
}

.footer-contact {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  color: var(--text-secondary);
}

.footer-contact-item .icon {
  font-size: 0.72rem;
}

.footer-copy {
  font-size: 0.55rem;
  color: var(--text-muted);
  opacity: 0.5;
  align-self: flex-end;
}

.iban-holder-inline {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-left: 4px;
}

/* ---- Product Icon (no emoji, text-based) ---- */
.product-icon {
  display: none;
}

.product-name {
  line-height: 1.3;
  font-weight: 600;
}

.product-code {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 1px;
}

/* Price update animation */
.price-flash {
  animation: flash-gold 0.6s ease;
}

@keyframes flash-gold {
  0% { background-color: rgba(184, 148, 31, 0.12); }
  100% { background-color: transparent; }
}

/* ---- Separator Satırı ---- */
.table-separator td {
  padding: 6px 16px;
  background: rgba(184, 148, 31, 0.06);
  border-top: 1px solid var(--border-color-strong);
  border-bottom: 1px solid var(--border-color-strong);
  text-align: center;
}

.separator-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.7;
}

.separator-label::before,
.separator-label::after {
  content: '';
  display: inline-block;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
  opacity: 0.4;
}

.separator-label::after {
  background: linear-gradient(90deg, var(--gold), transparent);
}

/* ---- Eski Satır & Etiketi ---- */
.row-eski {
  opacity: 0.6;
}

.row-eski:hover {
  opacity: 1;
}

.row-yeni {
  font-weight: 600;
}

/* Pair grup arka planları */
.pair-group-1 {
  background: rgba(184, 148, 31, 0.04) !important;
}

.eski-tag {
  display: inline-block;
  font-size: 0.52rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 3px;
  padding: 1px 5px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-left: 5px;
  vertical-align: middle;
}

.yeni-tag {
  display: inline-block;
  font-size: 0.52rem;
  font-weight: 700;
  color: var(--gold-dark);
  background: rgba(184, 148, 31, 0.1);
  border: 1px solid rgba(184, 148, 31, 0.25);
  border-radius: 3px;
  padding: 1px 5px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-left: 5px;
  vertical-align: middle;
}

#section-eski {
  margin-top: 8px;
  padding: 0 16px;
}

/* ---- Eski Satır & Etiketi ---- */
.iban-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(0, 120, 90, 0.08), rgba(0, 80, 60, 0.04));
  border: 1px solid rgba(0, 120, 90, 0.2);
  border-radius: var(--radius-lg);
  padding: 18px 25px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  max-width: 450px;
}

.iban-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 120, 90, 0.3), transparent);
}

.iban-qr-section {
  flex-shrink: 0;
}

.iban-qr-img {
  display: block;
  border-radius: 8px;
  border: 2px solid rgba(0, 120, 90, 0.2);
  background: #fff;
}

.iban-info-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.iban-bank {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.iban-bank-logo {
  font-size: 1rem;
}

.iban-bank-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0d7a52;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.iban-holder {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.3px;
}

.iban-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  flex-wrap: wrap;
}

.iban-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: #0d7a52;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  flex-shrink: 0;
}

.iban-number {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  font-family: var(--font-body);
}

.iban-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 120, 90, 0.08);
  border: 1px solid rgba(0, 120, 90, 0.2);
  color: #0d7a52;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  font-family: var(--font-body);
  letter-spacing: 0.3px;
}

.iban-copy-btn:hover {
  background: rgba(0, 120, 90, 0.15);
  border-color: rgba(0, 120, 90, 0.4);
  transform: translateY(-1px);
}

.iban-copy-btn.copied {
  background: rgba(0, 120, 90, 0.18);
  border-color: #0d7a52;
  color: #0d7a52;
}

@media (max-width: 640px) {
  .iban-card {
    flex-direction: column;
    text-align: center;
    padding: 16px;
  }
  .iban-row {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  .iban-number {
    font-size: 0.75rem;
    letter-spacing: 0.5px;
  }
}


/* ---- Error State ---- */
.error-banner {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--red-bg);
  border: 1px solid rgba(192, 57, 43, 0.15);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  margin: 16px 0;
  font-size: 0.8rem;
  color: var(--red);
}

.error-banner.visible {
  display: flex;
}

/* ---- Shimmer / Skeleton ---- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-table-row) 25%, var(--bg-table-hover) 50%, var(--bg-table-row) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  height: 18px;
  width: 80px;
  display: inline-block;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- Responsive ---- */
/* ---- Responsive (Mobil Uyumluluk) ---- */
@media (max-width: 768px) {
  .tv-main {
    padding: 8px 8px;
  }

  .tv-grid {
    grid-template-columns: 1fr; /* Mobilde tek sütun */
    gap: 16px;
  }

  .tv-right-col {
    gap: 16px;
  }

  .tv-table thead th {
    font-size: 0.75rem;
    padding: 8px 10px;
  }

  /* Yazı boyutlarını küçült (fiyatlar birbirine girmesin) */
  .tv-table tbody td {
    padding: 8px 10px;
    font-size: 0.95rem; 
  }

  .tv-table tbody td:nth-child(2),
  .tv-table tbody td:nth-child(3) {
    font-size: 1rem;
  }

  .tv-section-title {
    font-size: 1.1rem;
  }

  .header {
    padding: 8px 12px;
  }

  .header-inner {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    gap: 16px;
  }

  .header-right {
    align-items: center;
    width: 100%;
  }

  .header-brand {
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    margin-bottom: 8px;
  }

  .header-title {
    font-size: 1.4rem;
  }

  .live-clock {
    font-size: 1.3rem;
  }

  #section-eski {
    margin-top: 16px;
    padding: 0 8px;
  }

  /* Tablo sütun oranlarını mobilde ayarla */
  .tv-table thead th:nth-child(1) { width: 40%; }
  .tv-table thead th:nth-child(2),
  .tv-table thead th:nth-child(3) {
    width: 30%;
  }
}

/* Tablet / Orta Ekranlar */
@media (min-width: 769px) and (max-width: 1200px) {
  .tv-table tbody td {
    font-size: 1.1rem;
    padding: 10px 14px;
  }
  
  .tv-table tbody td:nth-child(2),
  .tv-table tbody td:nth-child(3) {
    font-size: 1.2rem;
  }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-dark);
}

/* ---- Selection ---- */
::selection {
  background: var(--gold);
  color: #fff;
}
