/* ==========================================
   Live Demos Directory — bolella.com/demos
   ========================================== */

:root {
  --bg-dark: #0a0f1d;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --color-gold: #fbbf24;
  --color-gold-light: #fcd34d;
  --color-gold-glow: rgba(251, 191, 36, 0.2);
  --color-navy: #1e293b;
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --font-heading: 'DM Serif Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 20px;
  --transition: 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(30, 41, 59, 0.5) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(251, 191, 36, 0.05) 0%, transparent 50%);
  z-index: -1;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400;
}

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

/* ==========================================
   Password Gate
   ========================================== */

.gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.gate-card {
  text-align: center;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 3.5rem 3rem;
  box-shadow: var(--glass-shadow);
  max-width: 400px;
  width: 100%;
}

.gate-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.gate-card h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--color-gold);
}

.gate-card > p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

#gate-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#gate-input {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  text-align: center;
  letter-spacing: 0.15em;
  outline: none;
  transition: border-color 0.3s ease;
}

#gate-input:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px var(--color-gold-glow);
}

#gate-input::placeholder {
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.btn {
  display: inline-block;
  padding: 0.9rem 2rem;
  background: var(--color-gold);
  color: var(--bg-dark);
  text-decoration: none;
  font-weight: 700;
  font-family: var(--font-body);
  font-size: 0.9rem;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.btn:hover {
  background: var(--color-gold-light);
  transform: scale(1.03);
  box-shadow: 0 0 20px var(--color-gold-glow);
}

.gate-error {
  color: #f87171;
  font-size: 0.85rem;
  margin-top: 0.75rem;
  min-height: 1.2em;
}

/* ==========================================
   Directory
   ========================================== */

.directory {
  min-height: 100vh;
  padding: 4rem 0;
}

.dir-header {
  text-align: center;
  margin-bottom: 4rem;
  padding-top: 2rem;
}

.back-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.3s ease;
  display: inline-block;
  margin-bottom: 2rem;
}

.back-link:hover {
  color: var(--color-gold);
}

.dir-header h1 {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  color: var(--color-gold);
  margin-bottom: 0.75rem;
}

.dir-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ==========================================
   Demo Cards
   ========================================== */

.demos-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.demo-card {
  display: block;
  text-decoration: none;
  color: var(--text-primary);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  box-shadow: var(--glass-shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.demo-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--color-gold), var(--color-gold-light));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.demo-card:hover {
  border-color: rgba(251, 191, 36, 0.25);
  transform: translateX(8px);
  background: rgba(255, 255, 255, 0.05);
}

.demo-card:hover::before {
  opacity: 1;
}

.demo-type {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-gold);
  background: var(--color-gold-glow);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
}

.demo-card h2 {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.demo-card:hover h2 {
  color: var(--color-gold);
}

.demo-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.demo-link {
  color: var(--color-gold);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.demo-card:hover .demo-link {
  opacity: 1;
  transform: translateX(0);
}

/* ==========================================
   Footer
   ========================================== */

.dir-footer {
  text-align: center;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 768px) {
  .gate-card {
    padding: 2.5rem 2rem;
  }

  .demo-card {
    padding: 1.5rem 1.75rem;
  }

  .demo-link {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 480px) {
  .dir-header h1 {
    font-size: 2rem;
  }

  .demo-card h2 {
    font-size: 1.15rem;
  }
}
