/*
Theme Name: Liquid Glass
Theme URI: https://example.com/liquid-glass
Author: Your Studio
Author URI: https://example.com
Description: A liquid glass ("glassmorphism") WordPress theme for game/app download & mod sites — 4-image hero slider, search bar, popular downloads, latest apps list, articles, and an animated sign in / create account modal.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: liquid-glass
Tags: one-column, custom-menu, custom-colors, featured-images, translucent, gradient
*/

/* ============================
   1. Reset & Base
============================ */
*,
*::before,
*::after { box-sizing: border-box; }

:root {
  --lg-bg-1: #0f1420;
  --lg-bg-2: #1a2036;
  --lg-accent: #7dd3fc;
  --lg-accent-2: #c084fc;
  --lg-text: #eef2ff;
  --lg-muted: #9aa4c7;
  --lg-glass-bg: rgba(255, 255, 255, 0.08);
  --lg-glass-bg-strong: rgba(255, 255, 255, 0.14);
  --lg-glass-border: rgba(255, 255, 255, 0.25);
  --lg-radius: 22px;
  --lg-blur: 18px;
  --lg-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --lg-maxw: 1180px;
  --lg-new: #34d399;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--lg-text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(125, 211, 252, 0.20), transparent 60%),
    radial-gradient(1000px 700px at 110% 10%, rgba(192, 132, 252, 0.18), transparent 60%),
    linear-gradient(180deg, var(--lg-bg-1), var(--lg-bg-2));
  background-attachment: fixed;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: var(--lg-accent); text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

.lg-container {
  max-width: var(--lg-maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================
   2. Glass panel utility
============================ */
.lg-glass {
  background: var(--lg-glass-bg);
  border: 1px solid var(--lg-glass-border);
  border-radius: var(--lg-radius);
  backdrop-filter: blur(var(--lg-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(160%);
  box-shadow: var(--lg-shadow);
}
.lg-glass-strong { background: var(--lg-glass-bg-strong); }

/* ============================
   3. Header
============================ */
.lg-header {
  position: sticky;
  top: 16px;
  z-index: 100;
  margin: 16px auto 0;
  max-width: var(--lg-maxw);
  padding: 0 24px;
}
.lg-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-radius: 999px;
}
.lg-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--lg-text);
  letter-spacing: 0.02em;
}
.lg-logo-badge {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--lg-accent), var(--lg-accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.lg-logo span { color: var(--lg-accent); }

.lg-nav ul { display: flex; gap: 6px; align-items: center; }
.lg-nav a {
  color: var(--lg-muted);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  transition: 0.25s ease;
}
.lg-nav a:hover,
.lg-nav .current-menu-item a {
  color: var(--lg-text);
  background: rgba(255,255,255,0.12);
}

.lg-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--lg-text);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 780px) {
  .lg-nav { display: none; width: 100%; }
  .lg-nav.is-open {
    display: block;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--lg-glass-border);
  }
  .lg-nav.is-open ul { flex-direction: column; align-items: flex-start; }
  .lg-header-inner { flex-wrap: wrap; }
  .lg-menu-toggle { display: block; }
}

/* ============================
   4. Hero Slider (4 full-bleed images)
============================ */
.lg-hero {
  position: relative;
  height: 78vh;
  min-height: 520px;
  margin: 24px auto 0;
  max-width: var(--lg-maxw);
  padding: 0 24px;
}
.lg-slider {
  position: relative;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--lg-shadow);
  background: linear-gradient(135deg, #1b2440, #2a1f45);
}
.lg-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1s ease; }
.lg-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.lg-slide-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.lg-slide-overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(10,14,26,0.35) 0%, rgba(10,14,26,0.85) 100%); }
.lg-slide-content {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 30px;
}
.lg-slide-content .lg-tag { display: inline-block; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lg-accent); margin-bottom: 10px; }
.lg-slide-content h2 { margin: 0 0 10px; font-size: clamp(1.5rem, 3.4vw, 2.6rem); font-weight: 800; max-width: 760px; }
.lg-slide-content p { margin: 0 0 24px; color: var(--lg-muted); max-width: 600px; }

.lg-btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.05rem;
  color: #0b0f1a;
  background: linear-gradient(120deg, var(--lg-accent), var(--lg-accent-2));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.lg-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(125,211,252,0.35); color: #0b0f1a; }
.lg-btn-ghost { color: var(--lg-text); background: var(--lg-glass-bg-strong); border: 1px solid var(--lg-glass-border); }

.lg-slider-nav { position: absolute; bottom: 20px; right: 28px; z-index: 3; display: flex; gap: 10px; }
.lg-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.35); border: none; cursor: pointer; transition: 0.25s; }
.lg-dot.is-active { background: var(--lg-text); width: 26px; border-radius: 6px; }

.lg-slider-arrows { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; pointer-events: none; }
.lg-arrow {
  pointer-events: all; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--lg-text); font-size: 1.1rem; cursor: pointer;
  border: 1px solid var(--lg-glass-border); background: rgba(255,255,255,0.10);
  backdrop-filter: blur(10px);
}
.lg-arrow:hover { background: rgba(255,255,255,0.2); }

/* ============================
   5. Search bar (standalone, after hero)
============================ */
.lg-search-section { padding: 28px 0 8px; }
.lg-search {
  width: 100%; max-width: 640px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 16px 26px; border-radius: 999px;
}
.lg-search input { flex: 1; background: none; border: none; outline: none; color: var(--lg-text); font-size: 1rem; font-family: inherit; }
.lg-search input::placeholder { color: var(--lg-muted); }
.lg-search svg { flex-shrink: 0; opacity: 0.8; }
.lg-search button {
  flex-shrink: 0; padding: 10px 22px; border-radius: 999px; border: none;
  font-weight: 600; cursor: pointer; color: #0b0f1a;
  background: linear-gradient(120deg, var(--lg-accent), var(--lg-accent-2));
}

/* ============================
   6. Sections generic
============================ */
.lg-section { padding: 70px 0; }
.lg-section-head-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 30px; }
.lg-section-head-row h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 0; }
.lg-section-head-row a { font-size: 0.9rem; color: var(--lg-accent); }

/* Popular downloads: featured + grid with number badges */
.lg-featured { position: relative; border-radius: var(--lg-radius); overflow: hidden; height: 260px; margin-bottom: 20px; }
.lg-featured img { width: 100%; height: 100%; object-fit: cover; }
.lg-featured-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,14,26,0.05) 40%, rgba(10,14,26,0.85) 100%); }
.lg-num-badge {
  position: absolute; top: 0; left: 0; z-index: 2;
  padding: 10px 20px 10px 16px; font-weight: 800; font-size: 1.1rem;
  background: linear-gradient(120deg, var(--lg-accent), var(--lg-accent-2));
  color: #0b0f1a; border-bottom-right-radius: 16px;
}
.lg-featured-title { position: absolute; left: 20px; bottom: 16px; z-index: 2; font-size: 1.3rem; font-weight: 700; }

.lg-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .lg-grid-2 { grid-template-columns: 1fr; } }
.lg-mini-card { position: relative; border-radius: 18px; overflow: hidden; height: 150px; }
.lg-mini-card img { width: 100%; height: 100%; object-fit: cover; }
.lg-mini-card .lg-num-badge { font-size: 0.9rem; padding: 8px 16px 8px 12px; }
.lg-mini-card .lg-featured-title { font-size: 1.05rem; bottom: 12px; left: 14px; }

/* Latest apps list */
.lg-app-list { display: flex; flex-direction: column; gap: 14px; }
.lg-app-row { display: flex; align-items: center; gap: 16px; padding: 14px 18px; }
.lg-app-icon { width: 60px; height: 60px; border-radius: 14px; overflow: hidden; flex-shrink: 0; }
.lg-app-icon img { width: 100%; height: 100%; object-fit: cover; }
.lg-app-info { flex: 1; min-width: 0; }
.lg-app-info h3 { margin: 0 0 8px; font-size: 1.05rem; }
.lg-app-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.lg-badge { font-size: 0.78rem; padding: 4px 12px; border-radius: 999px; background: var(--lg-glass-bg-strong); border: 1px solid var(--lg-glass-border); color: var(--lg-muted); }
.lg-badge-version { color: var(--lg-accent); }
.lg-badge-new { background: rgba(52,211,153,0.18); border-color: rgba(52,211,153,0.4); color: var(--lg-new); font-weight: 600; }

/* Articles */
.lg-articles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .lg-articles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .lg-articles { grid-template-columns: 1fr; } }
.lg-article-card { overflow: hidden; }
.lg-article-img { height: 150px; overflow: hidden; }
.lg-article-img img { width: 100%; height: 100%; object-fit: cover; }
.lg-article-body { padding: 18px 20px; }
.lg-article-body h3 { margin: 0 0 10px; font-size: 1rem; line-height: 1.4; }
.lg-article-date { font-size: 0.82rem; color: var(--lg-muted); display: flex; align-items: center; gap: 6px; }

/* ============================
   7. Footer
============================ */
.lg-footer { padding: 50px 0 30px; margin-top: 20px; }
.lg-footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px; padding: 26px 30px;
}
.lg-footer-social a {
  display: inline-flex; width: 38px; height: 38px;
  align-items: center; justify-content: center; border-radius: 50%;
  background: var(--lg-glass-bg); border: 1px solid var(--lg-glass-border);
  margin-left: 8px; color: var(--lg-text);
}

/* ============================
   8. Auth Modal — liquid morph entrance
============================ */
.lg-auth-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(6,9,18,0.55);
  backdrop-filter: blur(0px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s ease, backdrop-filter 0.4s ease, visibility 0.4s;
}
.lg-auth-overlay.is-open { opacity: 1; visibility: visible; backdrop-filter: blur(10px); }

.lg-auth-card {
  position: relative;
  width: 100%; max-width: 420px;
  padding: 38px 34px 34px;
  background: var(--lg-glass-bg-strong);
  border: 1px solid var(--lg-glass-border);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  overflow: hidden;
  border-radius: 42% 58% 63% 37% / 45% 40% 60% 55%;
  transform: scale(0.8) translateY(30px);
  opacity: 0;
}
.lg-auth-overlay.is-open .lg-auth-card { animation: lg-liquid-in 0.85s cubic-bezier(.34,1.56,.64,1) forwards; }
@keyframes lg-liquid-in {
  0%   { border-radius: 42% 58% 63% 37% / 45% 40% 60% 55%; transform: scale(0.75) translateY(40px); opacity: 0; }
  35%  { border-radius: 60% 40% 44% 56% / 38% 62% 38% 62%; transform: scale(1.04) translateY(-6px); opacity: 1; }
  60%  { border-radius: 48% 52% 38% 62% / 55% 45% 55% 45%; transform: scale(0.99) translateY(2px); }
  100% { border-radius: 24px; transform: scale(1) translateY(0); opacity: 1; }
}

.lg-auth-close {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--lg-glass-border);
  background: rgba(255,255,255,0.08);
  color: var(--lg-text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; transition: 0.2s ease;
}
.lg-auth-close:hover { background: rgba(255,255,255,0.18); transform: rotate(90deg); }

.lg-auth-logo { text-align: center; margin-bottom: 22px; }
.lg-auth-logo span { font-weight: 800; font-size: 1.3rem; }
.lg-auth-logo span em { color: var(--lg-accent); font-style: normal; }

.lg-auth-tabs {
  position: relative; display: flex;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--lg-glass-border);
  border-radius: 999px; padding: 4px; margin-bottom: 26px;
}
.lg-auth-tab {
  flex: 1; text-align: center; padding: 10px 0;
  font-size: 0.92rem; font-weight: 600; color: var(--lg-muted);
  cursor: pointer; border-radius: 999px; position: relative; z-index: 2;
  background: none; border: none; font-family: inherit; transition: color 0.3s ease;
}
.lg-auth-tab.is-active { color: #0b0f1a; }
.lg-auth-pill {
  position: absolute; top: 4px; left: 4px;
  width: calc(50% - 4px); height: calc(100% - 8px);
  border-radius: 999px;
  background: linear-gradient(120deg, var(--lg-accent), var(--lg-accent-2));
  transition: transform 0.4s cubic-bezier(.65,0,.35,1);
  z-index: 1;
}
.lg-auth-tabs[data-active="signup"] .lg-auth-pill { transform: translateX(100%); }

.lg-auth-panels { position: relative; overflow: hidden; }
.lg-auth-panel { display: flex; flex-direction: column; gap: 14px; transition: transform 0.45s cubic-bezier(.65,0,.35,1), opacity 0.35s ease; }
.lg-auth-panel.is-hidden-left { transform: translateX(-115%); opacity: 0; position: absolute; inset: 0; pointer-events: none; }
.lg-auth-panel.is-hidden-right { transform: translateX(115%); opacity: 0; position: absolute; inset: 0; pointer-events: none; }

.lg-field { display: flex; flex-direction: column; gap: 6px; }
.lg-field label { font-size: 0.82rem; color: var(--lg-muted); }
.lg-field input {
  padding: 12px 16px; border-radius: 14px;
  border: 1px solid var(--lg-glass-border);
  background: rgba(255,255,255,0.06);
  color: var(--lg-text); font-size: 0.95rem; font-family: inherit; outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.lg-field input:focus { border-color: var(--lg-accent); background: rgba(255,255,255,0.1); }

.lg-auth-submit {
  margin-top: 6px; padding: 13px 0; border-radius: 999px; border: none;
  font-weight: 700; font-size: 1rem; cursor: pointer; color: #0b0f1a;
  background: linear-gradient(120deg, var(--lg-accent), var(--lg-accent-2));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.lg-auth-submit:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(125,211,252,0.35); }

.lg-auth-foot { text-align: center; font-size: 0.85rem; color: var(--lg-muted); margin-top: 4px; }
.lg-auth-foot button { background: none; border: none; color: var(--lg-accent); font-weight: 600; cursor: pointer; font-family: inherit; font-size: inherit; padding: 0; }

/* ============================
   9. Generic content (pages/posts)
============================ */
.lg-page-content {
  max-width: 820px;
  margin: 140px auto 80px;
  padding: 40px 44px;
}
.lg-page-content h1 { margin-top: 0; }
