/* ====================================================================
   GUI9INCHSLM — AMEMBER PRO THEME "gui9luxe"
   ====================================================================
   theme.css  v3.1  (readability pass)
   Replace the existing file at:
     application/default/themes/gui9luxe/public/css/theme.css
   --------------------------------------------------------------------
   v3.1 changes:
   - Glass cards are now opaque/dark (readable over bright video)
   - Member containers forced transparent (no more light box behind cards)
   - Muted text contrast raised; descriptions are readable
   - Browser autofill (yellow inputs) overridden to dark glass
   ==================================================================== */


/* ===== 1. TOKENS ===== */
:root {
  --g-red:          #e63946;
  --g-red-bright:   #ff4d5e;
  --g-red-deep:     #b3121f;
  --g-gold:         #d4a843;
  --g-gold-bright:  #f0c869;

  --g-bg:           #070708;
  /* Opaque glass so cards stay dark + readable over ANY video */
  --g-glass:        rgba(14, 14, 18, 0.86);
  --g-glass-2:      rgba(20, 20, 26, 0.88);
  --g-glass-border: rgba(255, 255, 255, 0.10);

  --g-text:         rgba(255, 255, 255, 0.94);
  --g-text-soft:    rgba(255, 255, 255, 0.80);
  --g-text-faint:   rgba(255, 255, 255, 0.62);

  --g-glow-red:     rgba(230, 57, 70, 0.35);
  --g-shadow:       0 22px 50px -14px rgba(0, 0, 0, 0.72);
  --g-shadow-soft:  0 10px 28px -10px rgba(0, 0, 0, 0.6);

  --g-radius:       16px;
  --g-radius-sm:    11px;
  --g-ease:         cubic-bezier(0.22, 1, 0.36, 1);
  --g-dur:          0.35s;

  --g-font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --g-font-body:    'Manrope', ui-sans-serif, system-ui, -apple-system, sans-serif;
}


/* ===== 2. BASE / SCROLLBAR / SELECTION ===== */
html { background: var(--g-bg) !important; }

body {
  background:
    radial-gradient(60% 50% at 18% 8%,  rgba(230, 57, 70, 0.08), transparent 60%),
    radial-gradient(55% 45% at 85% 92%, rgba(212, 168, 67, 0.06), transparent 60%),
    var(--g-bg) !important;
  color: var(--g-text) !important;
  font-family: var(--g-font-body) !important;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Wrappers + member containers transparent: cards float over the video,
   no light box behind them. */
.am-layout, .am-body, .am-page, .am-content, .am-main,
.am-body-content-wrapper, #content, .container, .wrap,
#member-main, #member,
[id^="widget-member-main"], [id^="am-widget"] {
  background: transparent !important;
  background-color: transparent !important;
  position: relative;
  z-index: 1;
}

* { scrollbar-width: thin; scrollbar-color: var(--g-red) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--g-red), var(--g-red-deep));
  border-radius: 10px; border: 2px solid rgba(0, 0, 0, 0.4);
}
::-webkit-scrollbar-thumb:hover { background: var(--g-red-bright); }
::selection { background: var(--g-red); color: #fff; }


/* ===== 3. BACKGROUND VIDEO LAYER ===== */
#g-bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(60% 50% at 18% 8%,  rgba(230, 57, 70, 0.08), transparent 60%),
    radial-gradient(55% 45% at 85% 92%, rgba(212, 168, 67, 0.06), transparent 60%),
    var(--g-bg);
}
#g-bg video {
  position: absolute; top: 50%; left: 50%;
  width: 100%; height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  filter: brightness(0.42) saturate(115%);
}
#g-bg .g-bg-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(70% 60% at 18% 12%, rgba(230, 57, 70, 0.14), transparent 60%),
    radial-gradient(70% 60% at 85% 88%, rgba(212, 168, 67, 0.09), transparent 60%),
    radial-gradient(120% 120% at 50% 50%, transparent 38%, rgba(0, 0, 0, 0.58) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.74));
}
/* Calmer, darker backdrop on the logged-in dashboard */
.am-logged-in #g-bg video { filter: brightness(0.34) saturate(115%) blur(2px); }
.am-logged-in #g-bg .g-bg-overlay {
  background:
    radial-gradient(60% 55% at 16% 10%, rgba(230, 57, 70, 0.12), transparent 60%),
    radial-gradient(120% 120% at 50% 40%, transparent 35%, rgba(0, 0, 0, 0.64) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.60), rgba(0, 0, 0, 0.84));
}


/* ===== 4. HEADER / BRAND (sticky glass) ===== */
.g-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 22px;
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 8, 10, 0.62) !important;
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--g-glass-border) !important;
}
.g-brand { display: inline-flex; align-items: center; background: none !important; text-decoration: none !important; }
.g-brand img { height: 34px; width: auto; display: block; }
.g-brand-mark { font-family: var(--g-font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.02em; color: #fff; }
.g-brand-accent {
  background: linear-gradient(90deg, var(--g-red), var(--g-gold));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.g-header-badge {
  font-family: var(--g-font-display); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--g-gold-bright);
  border: 1px solid rgba(212, 168, 67, 0.35); border-radius: 999px;
  padding: 6px 12px; white-space: nowrap;
}
.am-user-identity, .am-user-identity a { color: rgba(255, 255, 255, 0.86) !important; }
.am-user-identity a:hover { color: var(--g-gold-bright) !important; }


/* ===== 5. FOOTER ===== */
.g-footer { padding: 26px 22px 40px; text-align: center; position: relative; z-index: 1; }
.g-footer-note { color: var(--g-text-faint); font-size: 0.82rem; line-height: 1.6; max-width: 680px; margin: 0 auto; }


/* ===== 6. TYPOGRAPHY & TITLES ===== */
h1, h2, h3, h4, .am-page-title, .am-page-header {
  font-family: var(--g-font-display) !important;
  font-weight: 700 !important; letter-spacing: -0.01em !important;
  color: rgba(255, 255, 255, 0.96) !important;
}
h1, .am-page-title {
  background: linear-gradient(180deg, #fff, rgba(255, 255, 255, 0.74)) !important;
  -webkit-background-clip: text !important; background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}


/* ===== 7. GLASS CARDS & BLOCKS (opaque, readable) ===== */
.am-block, .am-info, .am-form,
.am-login-form, .am-auth-form, .am-signup-form, .am-widget,
form.am-form, .login-form, #login-form,
.am-body .am-layout .am-main .am-content > div,
#member-subscriptions, #member-resources, #member-main-links {
  background: linear-gradient(160deg, var(--g-glass), var(--g-glass-2)) !important;
  -webkit-backdrop-filter: blur(14px) saturate(130%) !important;
  backdrop-filter: blur(14px) saturate(130%) !important;
  border: 1px solid var(--g-glass-border) !important;
  border-radius: var(--g-radius) !important;
  box-shadow: var(--g-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  position: relative; overflow: hidden;
}
/* Signature red→gold edge across the top of key cards */
.am-form::before, .am-login-form::before,
.am-signup-form::before, #member-subscriptions::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--g-red), var(--g-gold), transparent);
  opacity: 0.85; z-index: 2;
}
.am-content { padding: 20px 16px !important; }

/* Inner boxes inside cards (subscription item, resource block): keep a subtle
   darker panel but never light */
#member-subscriptions .am-list, #member-resources .am-list,
#member-subscriptions li, #member-resources li,
.am-list-item {
  background: rgba(0, 0, 0, 0.22) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: var(--g-radius-sm) !important;
}


/* ===== 8. TEXT CONTRAST INSIDE MEMBER WIDGETS ===== */
/* Make every non-link bit of text in the dashboard cards readable.
   Links keep their own red/gold styling (section 9). */
#member-subscriptions :not(a),
#member-resources :not(a),
#member-main-links :not(a),
.am-comment, .am-help {
  color: var(--g-text-soft) !important;
}
#member-subscriptions h2, #member-subscriptions h3,
#member-resources h2, #member-resources h3,
#member-main-links h2, #member-main-links h3,
.am-block-header {
  color: rgba(255, 255, 255, 0.96) !important;
}


/* ===== 9. LINKS (animated gold underline) ===== */
a, a:visited {
  color: var(--g-red-bright) !important; text-decoration: none !important;
  background-image: linear-gradient(var(--g-gold), var(--g-gold));
  background-size: 0% 1px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size var(--g-dur) var(--g-ease), color 0.2s ease, text-shadow 0.2s ease !important;
}
a:hover { color: var(--g-gold-bright) !important; background-size: 100% 1px; text-shadow: 0 0 12px var(--g-glow-red) !important; }
.g-brand, .g-brand:hover { background-image: none !important; text-shadow: none !important; }


/* ===== 10. BUTTONS (gradient + shine sweep) ===== */
button, input[type="submit"], input[type="button"],
.am-btn, .am-button, a.am-btn {
  position: relative; overflow: hidden;
  font-family: var(--g-font-display) !important;
  background: linear-gradient(135deg, var(--g-red), var(--g-red-deep)) !important;
  color: #fff !important; -webkit-text-fill-color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: var(--g-radius-sm) !important;
  padding: 13px 24px !important;
  font-weight: 700 !important; letter-spacing: 0.04em !important; text-transform: none !important;
  cursor: pointer !important;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.7), 0 0 24px -6px var(--g-glow-red) !important;
  transition: transform var(--g-dur) var(--g-ease), box-shadow var(--g-dur) var(--g-ease), background var(--g-dur) var(--g-ease) !important;
}
button::after, input[type="submit"]::after, input[type="button"]::after,
.am-btn::after, .am-button::after, a.am-btn::after {
  content: ""; position: absolute; top: 0; left: -150%; width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-20deg); transition: left 0.65s var(--g-ease); pointer-events: none;
}
button:hover, input[type="submit"]:hover, input[type="button"]:hover,
.am-btn:hover, .am-button:hover, a.am-btn:hover {
  background: linear-gradient(135deg, var(--g-red-bright), var(--g-red)) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 16px 32px -10px rgba(0, 0, 0, 0.75), 0 0 34px -6px var(--g-glow-red) !important;
}
button:hover::after, input[type="submit"]:hover::after, input[type="button"]:hover::after,
.am-btn:hover::after, .am-button:hover::after, a.am-btn:hover::after { left: 150%; }
button:active, input[type="submit"]:active, .am-btn:active { transform: translateY(0) !important; }
/* keep the language button link clean (no underline animation) */
.am-btn, a.am-btn { background-image: linear-gradient(135deg, var(--g-red), var(--g-red-deep)) !important; }


/* ===== 11. INPUTS (glass + glow focus + autofill fix) ===== */
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="tel"], input[type="url"],
textarea, select {
  background: rgba(8, 8, 10, 0.85) !important;
  -webkit-backdrop-filter: blur(8px) !important; backdrop-filter: blur(8px) !important;
  color: var(--g-text) !important; -webkit-text-fill-color: var(--g-text) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: var(--g-radius-sm) !important;
  padding: 12px 16px !important;
  font-family: var(--g-font-body) !important; font-size: 0.97rem !important;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease !important;
}
::placeholder { color: var(--g-text-faint) !important; opacity: 1; }
input:focus, textarea:focus, select:focus {
  outline: none !important; border-color: var(--g-red) !important;
  background: rgba(10, 10, 12, 0.92) !important;
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.18), 0 0 22px -6px var(--g-glow-red) !important;
}

/* Kill the yellow browser autofill background (Chrome/Safari + modern Firefox) */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--g-text) !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(8, 8, 10, 0.95) inset !important;
  box-shadow: 0 0 0 1000px rgba(8, 8, 10, 0.95) inset !important;
  caret-color: var(--g-text) !important;
  transition: background-color 9999s ease-in-out 0s !important;
}
input:autofill {
  color: var(--g-text) !important;
  box-shadow: 0 0 0 1000px rgba(8, 8, 10, 0.95) inset !important;
  -webkit-text-fill-color: var(--g-text) !important;
}


/* ===== 12. TABLES (payment history) ===== */
table, .am-grid { color: var(--g-text) !important; border-collapse: collapse !important; width: 100% !important; }
table th, .am-grid th {
  background: rgba(255, 255, 255, 0.04) !important; color: var(--g-gold) !important;
  border-bottom: 2px solid rgba(230, 57, 70, 0.22) !important;
  font-family: var(--g-font-display) !important;
  font-size: 0.74rem !important; font-weight: 700 !important;
  letter-spacing: 0.12em !important; text-transform: uppercase !important; padding: 13px 12px !important;
}
table td, .am-grid td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: var(--g-text-soft) !important; padding: 11px 12px !important;
}
table tr:hover td, .am-grid tr:hover td { background: rgba(230, 57, 70, 0.06) !important; color: var(--g-text) !important; }


/* ===== 13. SUBSCRIPTIONS & RESOURCES (spacing) ===== */
.am-subscriptions, .am-resources { color: rgba(255, 255, 255, 0.96) !important; }
div#widget-member-main-subscriptions,
div#widget-member-main-resources,
div#widget-member-main-links { padding: 0 0 22px !important; margin-bottom: 0 !important; }


/* ===== 14. WELCOME BANNER (optional) ===== */
.g-welcome {
  display: flex; flex-direction: column; gap: 3px;
  margin: 0 0 22px; padding: 18px 22px; border-radius: var(--g-radius);
  background: linear-gradient(135deg, rgba(230, 57, 70, 0.18), rgba(212, 168, 67, 0.12)), var(--g-glass);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--g-glass-border);
  box-shadow: var(--g-shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.10);
  animation: g-rise 0.5s var(--g-ease) both;
}
.g-welcome-eyebrow { font-family: var(--g-font-display); font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--g-gold-bright); }
.g-welcome-name { font-family: var(--g-font-display); font-size: 1.5rem; font-weight: 700; line-height: 1.1; color: #fff; }


/* ===== 15. MOTION / FOCUS / MOBILE / REDUCED-MOTION ===== */
@keyframes g-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.am-block, .am-form, #member-subscriptions, #member-resources, #member-main-links {
  animation: g-rise 0.5s var(--g-ease) both;
}
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, .am-btn:focus-visible {
  outline: 2px solid var(--g-gold-bright) !important; outline-offset: 2px !important;
}
.am-logged-in.am-page-main { justify-content: flex-start !important; }
.am-signup-form label { color: #fff !important; -webkit-text-fill-color: #fff !important; }
.video-title { color: rgba(255, 255, 255, 0.92) !important; }

@media only screen and (max-width: 480px) {
  .am-layout.am-common { max-width: 100% !important; }
  .g-header { padding: 13px 16px; }
  .g-brand-mark { font-size: 1.1rem; }
  button, input[type="submit"], .am-btn { padding: 12px 18px !important; font-size: 0.92rem !important; width: 100% !important; }
  .am-content { padding: 16px 12px !important; }
  .g-welcome-name { font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ===== END ===== */
