/* ==========================================================================
   Meta / Oculus SSO Portal - Design System & Modern Styles
   ========================================================================== */

:root {
  --bg-dark: #080b11;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(26, 35, 54, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 102, 255, 0.3);
  
  --meta-blue: #0064E0;
  --meta-blue-hover: #0072F5;
  --meta-gradient: linear-gradient(135deg, #0064E0 0%, #0084FF 50%, #00C6FF 100%);
  --meta-accent-glow: 0 0 25px rgba(0, 100, 224, 0.4);

  --text-main: #f0f4fc;
  --text-muted: #8e9bb0;
  --text-dim: #5c687d;

  --success-color: #00d26a;
  --success-glow: 0 0 15px rgba(0, 210, 106, 0.3);
  --warning-color: #ffb020;
  --danger-color: #ff4757;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(0, 100, 224, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(0, 198, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(10, 15, 26, 0.8) 0%, #080b11 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

.container {
  max-width: 1280px;
  width: 92%;
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

/* Header & Logo */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.oculus-logo-icon {
  width: 44px;
  height: 44px;
  background: var(--meta-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--meta-accent-glow);
}

.oculus-logo-icon svg {
  fill: #ffffff;
  width: 26px;
  height: 26px;
}

.brand-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #ffffff 0%, #b0c4de 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 210, 106, 0.1);
  border: 1px solid rgba(0, 210, 106, 0.25);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--success-color);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--success-color);
  border-radius: 50%;
  box-shadow: var(--success-glow);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 992px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* Cards */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.card-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

/* Meta / Oculus SSO Button Section */
.sso-button-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-color);
  margin-bottom: 1.5rem;
  position: relative;
}

/* Meta / Oculus Authentic Button Styling */
.meta-sso-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  width: 100%;
  max-width: 360px;
  height: 52px;
  padding: 0 1.5rem;
  background: var(--meta-gradient);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 26px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 100, 224, 0.4);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.meta-sso-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transition: left 0.6s ease;
}

.meta-sso-btn:hover::before {
  left: 100%;
}

.meta-sso-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 100, 224, 0.6);
  background: linear-gradient(135deg, #0070F0 0%, #0091FF 50%, #1AD0FF 100%);
}

.meta-sso-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0, 100, 224, 0.4);
}

.meta-sso-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Settings Form */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.825rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--meta-blue);
  box-shadow: 0 0 0 3px rgba(0, 100, 224, 0.2);
}

/* Quick Action Buttons */
.btn-group {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn-secondary {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* API Data & Token Displays */
.data-grid {
  display: grid;
  gap: 1rem;
}

.data-row {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.data-key {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.data-value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  word-break: break-all;
}

.copy-badge {
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--meta-blue);
  margin-left: 0.5rem;
  transition: opacity 0.2s ease;
}

.copy-badge:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Console Logs */
.console-window {
  background: #04060a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.825rem;
  max-height: 280px;
  overflow-y: auto;
  color: #c0caf5;
  line-height: 1.6;
}

.log-entry {
  margin-bottom: 0.4rem;
  display: flex;
  gap: 0.75rem;
}

.log-time {
  color: var(--text-dim);
}

.log-success {
  color: var(--success-color);
}

.log-info {
  color: #7aa2f7;
}

.log-warn {
  color: var(--warning-color);
}

/* Code Snippet Tabs */
.tab-header {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.6rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.tab-btn.active {
  color: var(--meta-blue);
  border-bottom-color: var(--meta-blue);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

pre {
  background: #04060a;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-family: var(--font-mono);
  font-size: 0.825rem;
  color: #a9b1d6;
  overflow-x: auto;
  line-height: 1.5;
}

.full-width {
  grid-column: 1 / -1;
}

footer {
  margin-top: auto;
  padding: 2rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border-color);
}
