@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Crimson+Pro:ital,wght@0,300;0,400;1,300&display=swap');

:root {
  --gold: #c9a84c;
  --gold-light: #e8c96a;
  --dark: #0d0b08;
  --dark2: #1a1610;
  --dark3: #252018;
  --cream: #f5edd8;
  --cream-dim: #c4b89a;
  --accent: #8b4513;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--dark);
  color: var(--cream);
  font-family: 'Crimson Pro', serif;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(201,168,76,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 80%, rgba(139,69,19,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 100% 100% at 50% 50%, #0d0b08 0%, #0a0806 100%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

/* ─── Layout ─── */
.container {
  position: relative;
  z-index: 1;
  max-width: 940px;
  margin: 0 auto;
  padding: 50px 24px 100px;
}

/* ─── Header ─── */
header {
  text-align: center;
  margin-bottom: 56px;
  animation: fadeDown 1s ease both;
}

.cross-icon {
  font-size: 2.2rem;
  color: var(--gold);
  margin-bottom: 14px;
  display: block;
  opacity: 0.85;
}

header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

header p {
  margin-top: 14px;
  font-size: 1.1rem;
  color: var(--cream-dim);
  font-style: italic;
  letter-spacing: 0.1em;
}

.header-divider {
  width: 140px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  margin: 20px auto 0;
}

/* ─── Tabs ─── */
.tabs-wrapper {
  margin-bottom: 40px;
}

.tabs {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: 14px;
  padding: 6px;
  flex-wrap: wrap;
}

.tab-btn {
  flex: 1;
  min-width: 110px;
  padding: 11px 16px;
  background: transparent;
  border: none;
  border-radius: 9px;
  color: var(--cream-dim);
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn.active {
  background: rgba(201,168,76,0.15);
  color: var(--gold-light);
}

/* ─── Verses Grid ─── */
.tab-content { display: none; }
.tab-content.active { display: block; }

.verses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ─── Card ─── */
.verse-card {
  background: linear-gradient(145deg, rgba(26,22,16,0.95), rgba(18,15,10,0.95));
  border: 1px solid rgba(201,168,76,0.18);
  border-radius: 16px;
  padding: 30px 26px 24px;
  position: relative;
  transition: transform 0.35s ease;
}

.verse-card:hover {
  transform: translateY(-5px);
}

.verse-text {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.75;
  margin-bottom: 20px;
}

.verse-ref {
  font-size: 0.82rem;
  text-transform: uppercase;
  color: var(--gold);
}

/* ─── Copy Button ─── */
.copy-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--gold);
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-transform: uppercase;
}

.copy-btn:hover {
  background: rgba(201,168,76,0.2);
}

.copy-btn.copied {
  background: rgba(201,168,76,0.25);
}

/* ─── Loading Screen ─── */
#loading-screen {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #1a1610 0%, #0d0b08 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.8s ease, visibility 0.8s;
}

#loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-content {
  text-align: center;
}

.loading-cross {
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 20px;
  animation: pulse 2s infinite;
}

.loading-text {
  color: var(--cream-dim);
  margin-bottom: 20px;
  letter-spacing: 0.1em;
}

.loading-bar {
  width: 220px;
  height: 4px;
  background: rgba(201,168,76,0.1);
  border-radius: 10px;
  overflow: hidden;
}

.loading-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, var(--gold-light), var(--gold));
  animation: loadingAnim 2.5s ease forwards;
}

@keyframes loadingAnim {
  to { width: 100%; }
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* ─── Animations ─── */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
