/*
Theme Name: The Devil's Hour
Theme URI: https://thedevilshour.com
Author: The Devil's Hour Team
Author URI: https://thedevilshour.com
Description: A bold, dark gothic dating and directory listing theme. Features member profiles, private photos, messaging, subscriptions, and full adult community functionality. Requires the Devils Hour Core plugin.
Version: 1.0.0
Requires at least: 6.3
Tested up to: 6.7
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: devils-hour
Tags: dark, gothic, dating, directory, members, adults, community, custom-menu, custom-logo, featured-images, full-width-template, theme-options
*/

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  --dh-bg:          #06030a;
  --dh-bg2:         #0d0812;
  --dh-bg3:         #130d1a;
  --dh-bg4:         #1c1226;
  --dh-bg5:         #231630;

  --dh-red:         #8b1a1a;
  --dh-red2:        #c0392b;
  --dh-red3:        #e74c3c;
  --dh-red-dim:     rgba(139,26,26,0.22);

  --dh-purple:      #4a1a6e;
  --dh-purple2:     #7d3fb5;
  --dh-purple3:     #a855f7;
  --dh-purple-dim:  rgba(74,26,110,0.25);

  --dh-gold:        #c9a23e;
  --dh-gold2:       #e8c878;
  --dh-gold-dim:    rgba(201,162,62,0.15);

  --dh-crimson:     #6b0f1a;

  --dh-text:        #e8e0f0;
  --dh-text2:       #9a8fb0;
  --dh-text3:       #4a4060;

  --dh-border:      rgba(139,26,26,0.22);
  --dh-border2:     rgba(139,26,26,0.45);
  --dh-border-p:    rgba(168,85,247,0.22);
  --dh-border-p2:   rgba(168,85,247,0.45);

  --dh-font-display: 'Cinzel Decorative', serif;
  --dh-font-title:   'Cinzel', serif;
  --dh-font-body:    'Raleway', sans-serif;

  --dh-radius:      14px;
  --dh-radius-sm:   8px;

  --dh-transition:  all 0.25s ease;
  --dh-shadow:      0 20px 60px rgba(0,0,0,0.5);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--dh-bg);
  color: var(--dh-text);
  font-family: var(--dh-font-body);
  font-weight: 400;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 60% 40% at 20% 10%, rgba(74,26,110,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 90%, rgba(139,26,26,0.10) 0%, transparent 65%);
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--dh-bg2); }
::-webkit-scrollbar-thumb { background: var(--dh-red); border-radius: 3px; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--dh-font-title);
  color: var(--dh-text);
  line-height: 1.2;
  letter-spacing: 0.03em;
}

h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

p { margin-bottom: 1rem; color: var(--dh-text2); }

a {
  color: var(--dh-red3);
  text-decoration: none;
  transition: var(--dh-transition);
}
a:hover { color: var(--dh-purple3); }

strong { color: var(--dh-text); font-weight: 600; }

/* ============================================================
   LAYOUT
   ============================================================ */
.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-content {
  flex: 1;
}

.container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

.container--narrow {
  max-width: 800px;
}

.container--mid {
  max-width: 1060px;
}

.section {
  padding: 4rem 0;
}

.section--lg {
  padding: 6rem 0;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn,
button.wp-block-button__link,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--dh-transition);
  border: none;
  font-family: var(--dh-font-title);
  text-decoration: none;
}

.btn--red, .wp-block-button.is-style-fill .wp-block-button__link {
  background: linear-gradient(135deg, var(--dh-red2), var(--dh-red));
  color: #f0e8e8;
  box-shadow: 0 0 20px rgba(192,57,43,0.3);
}
.btn--red:hover { filter: brightness(1.15); box-shadow: 0 0 30px rgba(192,57,43,0.5); color: #fff; }

.btn--purple {
  background: linear-gradient(135deg, var(--dh-purple2), var(--dh-purple));
  color: #ede0ff;
  box-shadow: 0 0 20px rgba(125,63,181,0.3);
}
.btn--purple:hover { filter: brightness(1.15); color: #fff; }

.btn--gold {
  background: linear-gradient(135deg, var(--dh-gold), #8a6a20);
  color: #0a0608;
  font-weight: 700;
}
.btn--gold:hover { filter: brightness(1.12); }

.btn--outline {
  background: transparent;
  border: 1px solid var(--dh-border2);
  color: var(--dh-red3);
}
.btn--outline:hover { background: var(--dh-red-dim); color: var(--dh-red3); }

.btn--ghost {
  background: transparent;
  color: var(--dh-text3);
  font-size: 0.75rem;
}
.btn--ghost:hover { color: var(--dh-text2); }

.btn--sm { padding: 0.38rem 0.9rem; font-size: 0.72rem; }
.btn--lg { padding: 0.9rem 2.2rem; font-size: 0.88rem; }

/* ============================================================
   FORMS
   ============================================================ */
.dh-form-group {
  margin-bottom: 1.1rem;
}

.dh-form-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dh-text3);
  font-family: var(--dh-font-title);
  margin-bottom: 0.4rem;
}

.dh-form-input,
.dh-form-select,
.dh-form-textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
select,
textarea {
  width: 100%;
  background: var(--dh-bg3);
  border: 1px solid var(--dh-border);
  border-radius: 4px;
  padding: 0.65rem 0.95rem;
  color: var(--dh-text);
  font-family: var(--dh-font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

.dh-form-input:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--dh-border2);
}

.dh-form-input::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--dh-text3);
}

textarea, .dh-form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

select, .dh-form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234a4060' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

/* ============================================================
   CARDS
   ============================================================ */
.dh-card {
  background: var(--dh-bg2);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  overflow: hidden;
  transition: var(--dh-transition);
}

.dh-card:hover {
  border-color: var(--dh-border2);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4), 0 0 30px rgba(139,26,26,0.1);
}

.dh-card__body {
  padding: 1.25rem;
}

/* ============================================================
   SECTION TITLES
   ============================================================ */
.dh-section-title {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--dh-red3);
  margin-bottom: 0.85rem;
  font-family: var(--dh-font-title);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dh-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--dh-border);
}

/* ============================================================
   NOTICES / ALERTS
   ============================================================ */
.dh-notice {
  padding: 0.85rem 1.1rem;
  border-radius: var(--dh-radius-sm);
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.dh-notice--error   { background: rgba(192,57,43,0.15); border: 1px solid var(--dh-border2); color: #f0a0a0; }
.dh-notice--success { background: rgba(74,222,128,0.1);  border: 1px solid rgba(74,222,128,0.3); color: #4ade80; }
.dh-notice--info    { background: var(--dh-purple-dim);  border: 1px solid var(--dh-border-p2); color: var(--dh-purple3); }
.dh-notice--gold    { background: var(--dh-gold-dim);    border: 1px solid rgba(201,162,62,0.4); color: var(--dh-gold2); }

/* ============================================================
   BADGES
   ============================================================ */
.dh-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.18rem 0.6rem;
  border-radius: 100px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--dh-font-title);
}

.dh-badge--online   { background: rgba(74,222,128,0.1); border: 1px solid rgba(74,222,128,0.3); color: #4ade80; }
.dh-badge--verified { background: rgba(74,222,128,0.1); border: 1px solid rgba(74,222,128,0.3); color: #4ade80; }
.dh-badge--gold     { background: var(--dh-gold-dim); border: 1px solid rgba(201,162,62,0.4); color: var(--dh-gold2); }
.dh-badge--m4w      { background: rgba(139,26,26,0.4); color: #f0a0a0; border: 1px solid rgba(192,57,43,0.4); }
.dh-badge--w4m      { background: rgba(74,26,110,0.4); color: #d4a8f8; border: 1px solid rgba(168,85,247,0.4); }
.dh-badge--m4m      { background: rgba(30,30,100,0.4); color: #a0b4f8; border: 1px solid rgba(80,100,220,0.35); }
.dh-badge--t4m      { background: rgba(100,20,60,0.4); color: #f8a8d4; border: 1px solid rgba(220,60,140,0.35); }
.dh-badge--w4w      { background: rgba(60,20,80,0.4); color: #e0b0ff; border: 1px solid rgba(180,80,240,0.35); }

/* ============================================================
   DIVIDER
   ============================================================ */
.dh-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
}
.dh-divider::before, .dh-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--dh-border);
}
.dh-divider span {
  font-size: 0.72rem;
  color: var(--dh-text3);
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.dh-progress {
  height: 5px;
  background: var(--dh-bg4);
  border-radius: 3px;
  overflow: hidden;
}
.dh-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--dh-red2), var(--dh-purple2));
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* ============================================================
   PULSE ANIMATION (online indicator)
   ============================================================ */
@keyframes dhPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0.5); }
  70%       { box-shadow: 0 0 0 5px rgba(74,222,128,0); }
}

.dh-online-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4ade80;
  border: 2px solid var(--dh-bg2);
  animation: dhPulse 2.5s infinite;
}

/* ============================================================
   FADE / REVEAL ANIMATION
   ============================================================ */
@keyframes dhReveal {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.dh-reveal {
  animation: dhReveal 0.35s ease forwards;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.dh-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--dh-text3);
}

.dh-empty__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.dh-empty__text {
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 320px;
  margin: 0 auto;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .container { padding: 0 1.5rem; }
}

@media (max-width: 768px) {
  .container { padding: 0 1rem; }
  .section { padding: 2.5rem 0; }
  .section--lg { padding: 3.5rem 0; }
}

@media (max-width: 480px) {
  body { font-size: 15px; }
}

/* ============================================================
   WORDPRESS CORE COMPATIBILITY
   ============================================================ */
.alignleft  { float: left; margin-right: 1.5rem; margin-bottom: 1rem; }
.alignright { float: right; margin-left: 1.5rem; margin-bottom: 1rem; }
.aligncenter { display: block; margin: 0 auto 1rem; }
.alignwide { margin-left: -2rem; margin-right: -2rem; }
.alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); width: 100vw; }

.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.8rem; color: var(--dh-text3); text-align: center; margin-top: 0.5rem; }

img { max-width: 100%; height: auto; display: block; }

.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px);
  clip-path: inset(50%); height: 1px;
  margin: -1px; overflow: hidden;
  padding: 0; position: absolute;
  width: 1px; word-wrap: normal !important;
}

.skip-link {
  background: var(--dh-red2);
  color: #fff;
  font-weight: 700;
  left: 6px;
  padding: 0.5rem 1rem;
  position: absolute;
  top: -40px;
  z-index: 10000;
  transition: top 0.2s;
}
.skip-link:focus { top: 6px; }
