:root {
  --bg-primary: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #273548;
  --border-color: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-green: #10b981;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1rem 3rem 1rem;
}

.main-container {
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
}

/* Header & Back link */
.nav-bar {
  margin-bottom: 1.5rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--accent-blue);
}

.page-header {
  margin-bottom: 1.75rem;
  text-align: center;
}

.page-header h1 {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.45;
}

/* Warning Banner */
.browser-alert {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fef3c7;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

/* Digital Clock Card */
.clock-display-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.clock-display-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.digital-time {
  font-family: 'Courier New', Courier, monospace, monospace;
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #60a5fa;
  text-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
  margin-bottom: 0.35rem;
}

.digital-date {
  font-size: 1.05rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.tz-badge-container {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
}

/* Steps Instructions Card */
.steps-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.steps-card h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.step-number {
  background: var(--accent-blue);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-text strong {
  display: block;
  font-size: 0.98rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.step-text span {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Web Component Button Styles */
clock-sync-button {
  display: block;
  width: 100%;
  margin-bottom: 1.5rem;
}

.clock-sync-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.clock-sync-main-btn {
  width: 100%;
  min-height: 64px;
  border: none;
  border-radius: 14px;
  font-size: 1.25rem;
  font-weight: 700;
  font-family: inherit;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.clock-sync-main-btn:active {
  transform: scale(0.98);
}

.sync-btn-idle {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.sync-btn-idle:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.4);
}

.sync-btn-connecting,
.sync-btn-syncing {
  background: linear-gradient(135deg, #475569, #334155);
  cursor: wait;
}

.sync-btn-success {
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.4);
}

.sync-btn-error {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.4);
}

.btn-icon {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
}

.clock-sync-status-msg {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.4;
}

/* Success Card */
.success-banner {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.success-banner h3 {
  color: #34d399;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.success-banner p {
  color: #a7f3d0;
  font-size: 0.9rem;
}

/* Details / FAQ Accordion */
details {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

details summary {
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--text-secondary);
  outline: none;
  user-select: none;
}

details summary:hover {
  color: var(--text-primary);
}

.details-content {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  border-top: 1px solid var(--border-color);
  padding-top: 0.85rem;
}

/* Connection Log Box */
.log-box {
  background: #090d16;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 0.75rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8rem;
  color: #94a3b8;
  max-height: 160px;
  overflow-y: auto;
  margin-top: 0.75rem;
}

.log-line {
  margin-bottom: 0.25rem;
}

.log-time {
  color: #475569;
}

.log-highlight {
  color: #38bdf8;
  font-weight: 600;
}

.footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
