/**
 * Demo Access Control Styles
 *
 * Security-first design with modern aesthetics.
 */

:root {
  --security-primary: #d32f2f;
  --security-dark: #1a1a2e;
  --security-darker: #0f0f1e;
  --security-accent: #16213e;
  --security-blue: #4a90e2;
  --security-green: #4caf50;
  --security-gold: #ffd700;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-muted: #808080;
  --border-color: #333;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.35);
}

/* Demo Body */
.demo-body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, var(--security-darker) 0%, var(--security-accent) 100%);
  min-height: 100vh;
  color: var(--text-primary);
}

/* Demo Container (Token Gate) */
.demo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
}

.demo-card {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 3rem;
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

/* Security Badge */
.security-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--security-primary) 0%, #ff6b6b 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 24px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.security-badge i {
  font-size: 1.125rem;
}

/* Demo Header */
.demo-header {
  text-align: center;
  margin-bottom: 2rem;
}

.demo-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.demo-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0;
}

/* Token Entry */
.token-entry h2 {
  font-size: 1.5rem;
  margin: 0 0 1rem 0;
  font-weight: 600;
}

.instruction {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Input Group */
.input-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.input-group i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.125rem;
}

.input-group input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.input-group input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--security-primary);
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.input-group input::placeholder {
  color: var(--text-muted);
}

/* Button Primary */
.btn-primary {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--security-primary) 0%, #ff6b6b 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(211, 47, 47, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Error Message */
.error-message {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(244, 67, 54, 0.15);
  border: 1px solid rgba(244, 67, 54, 0.3);
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
  color: #ff6b6b;
}

.error-message i {
  font-size: 1.25rem;
}

/* Loading Spinner */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
  color: var(--security-blue);
  font-size: 0.9375rem;
}

.loading-spinner i {
  font-size: 1.5rem;
}

/* Security Features */
.security-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.security-features .feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.security-features .feature i {
  color: var(--security-green);
  font-size: 1rem;
}

/* Demo Footer */
.demo-footer {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.demo-footer a {
  color: var(--security-primary);
  text-decoration: none;
  font-weight: 500;
}

.demo-footer a:hover {
  text-decoration: underline;
}

.support-text {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Demo Hub */
.demo-hub {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Demo Navigation */
.demo-nav {
  background: #1a1a2e;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.nav-brand i {
  color: var(--security-primary);
  font-size: 1.5rem;
}

.nav-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.session-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.btn-logout {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--security-primary);
}

/* Demo Content */
.demo-content {
  flex: 1;
  padding: 3rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.demo-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 1rem 0;
  background: linear-gradient(135deg, #ffffff 0%, var(--security-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.demo-description {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 700px;
  margin: 0 auto 3rem auto;
  line-height: 1.6;
}

/* Demo Cards Grid - 2x2 Layout */
.demo-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.demo-option {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.demo-option:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 255, 255, 0.2);
}

.demo-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.demo-icon.security {
  background: linear-gradient(135deg, var(--security-primary) 0%, #ff6b6b 100%);
  box-shadow: 0 8px 24px rgba(211, 47, 47, 0.3);
}

.demo-icon.chat {
  background: linear-gradient(135deg, var(--security-blue) 0%, #64b5f6 100%);
  box-shadow: 0 8px 24px rgba(74, 144, 226, 0.3);
}

.demo-icon.cockpit {
  background: linear-gradient(135deg, var(--security-gold) 0%, #ffeb3b 100%);
  box-shadow: 0 8px 24px rgba(255, 215, 0, 0.3);
}

.demo-option h3 {
  font-size: 1.25rem;
  margin: 0 0 0.75rem 0;
  font-weight: 600;
}

.demo-option p {
  color: var(--text-secondary);
  margin: 0 0 1rem 0;
  line-height: 1.5;
  font-size: 0.9375rem;
}

.features-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.features-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.features-list i {
  color: var(--security-green);
  font-size: 0.75rem;
}

.btn-demo {
  width: 100%;
  padding: 0.875rem 1.25rem;
  background: linear-gradient(135deg, var(--security-primary) 0%, #ff6b6b 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
}

.btn-demo:hover:not(.disabled) {
  transform: translateX(4px);
}

.btn-demo.disabled {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* Access Info */
.access-info {
  background: rgba(74, 144, 226, 0.15);
  border: 1px solid rgba(74, 144, 226, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.access-info i {
  color: var(--security-blue);
  font-size: 1.5rem;
  margin-top: 0.25rem;
}

.access-info strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.access-info p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.access-info span {
  color: var(--text-primary);
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .demo-card {
    padding: 2rem 1.5rem;
  }

  .demo-nav {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .demo-content {
    padding: 2rem 1rem;
  }

  .demo-title {
    font-size: 2rem;
  }

  .demo-cards {
    grid-template-columns: 1fr;
  }
}
