/* === palworldguide.lol — 3 Color Themes === */

/* THEME 1: Ocean Mist (soft teal) */
:root, [data-theme="teal"] {
  --bg: #131d1f;
  --bg-card: #1a2629;
  --bg-card-hover: #212f33;
  --bg-hero: linear-gradient(135deg, rgba(10,186,181,0.92) 0%, rgba(8,160,156,0.95) 100%);
  --text: #dce8e8;
  --text-muted: #8ca8a8;
  --text-heading: #e8f0f0;
  --accent: #5a9e8c;
  --accent-light: #8cc4b4;
  --accent-glow: rgba(90, 158, 140, 0.25);
  --border: rgba(90, 158, 140, 0.15);
  --border-light: rgba(140, 168, 168, 0.10);
  --green: #4ade80; --orange: #fb923c; --red: #f87171; --blue: #67c8ff; --yellow: #facc15;
}

/* THEME 2: Warm Sand (light) */
[data-theme="light"] {
  --bg: #f8f6f0;
  --bg-card: #ffffff;
  --bg-card-hover: #fef3e6;
  --bg-hero: linear-gradient(135deg, rgba(10,186,181,0.92) 0%, rgba(8,160,156,0.95) 100%);
  --text: #3d3529;
  --text-muted: #7a6e5e;
  --text-heading: #2d2619;
  --accent: #d4843a;
  --accent-light: #e8a95b;
  --accent-glow: rgba(212, 132, 58, 0.2);
  --border: rgba(212, 132, 58, 0.2);
  --border-light: rgba(122, 110, 94, 0.12);
  --green: #059669; --orange: #d4843a; --red: #dc2626; --blue: #3b82f6; --yellow: #ca8a04;
}

/* THEME 3: Midnight Amber (dark warm) */
[data-theme="amber"] {
  --bg: #1a1510;
  --bg-card: #241e16;
  --bg-card-hover: #2f261c;
  --bg-hero: linear-gradient(135deg, rgba(10,186,181,0.92) 0%, rgba(8,160,156,0.95) 100%);
  --text: #ede4d8;
  --text-muted: #a89a84;
  --text-heading: #f5efe5;
  --accent: #d4843a;
  --accent-light: #f0b368;
  --accent-glow: rgba(212, 132, 58, 0.25);
  --border: rgba(212, 132, 58, 0.18);
  --border-light: rgba(168, 154, 132, 0.10);
  --green: #4ade80; --orange: #f0b368; --red: #f87171; --blue: #67c8ff; --yellow: #facc15;
}

/* Theme buttons */
.theme-switch { display: flex; align-items: center; gap: 4px; margin-right: 6px; }
.theme-btn {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border-light);
  cursor: pointer; transition: all 0.25s; background: transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; padding: 0; line-height: 1;
}
.theme-btn:hover { transform: scale(1.2); border-color: var(--accent-light); }
.theme-btn.active { border-color: var(--accent-light); box-shadow: 0 0 10px var(--accent-glow); }

/* Smooth theme transitions */
html, body, .site-header, .card, .btn, .hero, .data-table, 
.priority-card, .faq-item, .calc-box, .tracker-item, footer.site-footer,
nav.main-nav a, .lang-btn, .lang-dropdown {
  transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

/* System Dark Mode Preference */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="amber"]) {
    --bg: #131d1f;
    --bg-card: #1a2629;
    --bg-card-hover: #212f33;
    --text: #dce8e8;
    --text-muted: #8ca8a8;
    --text-heading: #e8f0f0;
    --accent: #5a9e8c;
    --accent-light: #8cc4b4;
  }
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="teal"]):not([data-theme="amber"]) {
    --bg: #f8f6f0;
    --bg-card: #ffffff;
    --bg-card-hover: #fef3e6;
    --text: #3d3529;
    --text-muted: #7a6e5e;
    --text-heading: #2d2619;
    --accent: #d4843a;
    --accent-light: #e8a95b;
  }
}

/* === AdSense Containers === */
.ad-container {
  transition: all 0.4s ease;
}
.ad-container::before {
  content: "Ad";
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.5;
  z-index: 0;
}
.ad-hero-bottom { margin-top: 0; border-top: none; border-radius: 0 0 8px 8px; }
.ad-mid-content { min-height: 250px; }
.ad-footer-top { margin-bottom: 0; border-bottom: none; border-radius: 8px 8px 0 0; }

@media (max-width: 768px) {
  .ad-container { min-height: 60px !important; margin: 16px auto !important; }
  .ad-mid-content { min-height: 200px !important; }
}


/* ========== GALLERY STYLES ========== */
.gallery-hero { text-align: center; padding: 48px 16px 32px; }
.gallery-hero h1 { font-size: 2.2rem; margin-bottom: 8px; }
.gallery-hero p { color: var(--text-muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* Filter bar */
.filter-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; justify-content: center; }
.filter-btn { padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text); cursor: pointer; font-size: 0.82rem; transition: all 0.2s; }
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Showcase grid */
.showcase-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; padding: 8px 0 24px; }
.showcase-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 16px 10px; text-align: center; transition: transform 0.2s, box-shadow 0.2s; position: relative; }
.showcase-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
.rarity-badge { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; font-size: 0.7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; color: #fff; }
.rarity-S { background: #f59e0b; }
.rarity-A { background: #8b5cf6; }
.rarity-B { background: #3b82f6; }
.pal-icon { font-size: 2.4rem; display: block; margin: 4px 0 8px; }
.pal-name { font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; }
.pal-type { font-size: 0.75rem; color: var(--text-muted); display: flex; align-items: center; justify-content: center; gap: 4px; }
.element-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.el-Fire { background: #ef4444; } .el-Water { background: #3b82f6; } .el-Grass { background: #22c55e; }
.el-Electric { background: #eab308; } .el-Ice { background: #06b6d4; } .el-Ground { background: #a16207; }
.el-Dragon { background: #7c3aed; } .el-Dark { background: #6b21a8; } .el-Neutral { background: #9ca3af; }

/* Layout grid */
.layout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; padding: 8px 0 24px; }
.layout-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
.layout-card h3 { margin: 0 0 12px; font-size: 1.05rem; }
.layout-diagram { display: grid; gap: 4px; margin-bottom: 12px; min-height: 120px; }
.layout-diagram .cell { padding: 8px 4px; border-radius: 6px; font-size: 0.7rem; text-align: center; font-weight: 600; color: #fff; display: flex; align-items: center; justify-content: center; }
.cell-palbox { background: #7c3aed; } .cell-storage { background: #d97706; } .cell-def { background: #6b7280; }
.cell-mine { background: #92400e; } .cell-craft { background: #dc2626; } .cell-farm { background: #16a34a; }
.cell-breed { background: #db2777; }
.layout-desc { font-size: 0.82rem; color: var(--text-muted); margin: 0; }

/* Community grid */
.community-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; padding: 8px 0 24px; }
.community-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 20px; text-align: center; }
.comm-icon { font-size: 2rem; display: block; margin-bottom: 8px; }
.community-card h4 { margin: 0 0 6px; font-size: 1rem; }
.community-card p { font-size: 0.82rem; color: var(--text-muted); margin: 0 0 12px; line-height: 1.4; }
.comm-link { display: inline-block; padding: 6px 16px; background: var(--accent); color: #fff; border-radius: 6px; text-decoration: none; font-size: 0.82rem; font-weight: 600; transition: opacity 0.2s; }
.comm-link:hover { opacity: 0.85; }
