:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --border: #d1d5db;
  --danger: #b91c1c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
}

button,
input {
  font: inherit;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: 2rem;
}

h2 {
  margin-bottom: 18px;
  font-size: 1.35rem;
}

.auth-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.auth-card,
.panel {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(31, 41, 55, 0.08);
}

.auth-card {
  max-width: 430px;
  padding: 28px;
}

.page-note,,
#contact-count {
  color: var(--muted);
}

#welcome-message {
  color: var(--text);
 }

.tab-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 22px 0;
}

.tab-button {
  min-height: 42px;
  color: var(--text);
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

.tab-button.active {
  color: white;
  background: var(--primary);
  border-color: var(--primary);
}

.auth-form,
.hidden {
  display: none;
}

.auth-form.active {
  display: block;
}

label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

input:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(37, 99, 235, 0.18);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.button {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

.button.primary {
  color: white;
  background: var(--primary);
}

.button.primary:hover {
  background: var(--primary-dark);
}

.button.secondary {
  color: var(--text);
  background: #e5e7eb;
}

.button.full {
  width: 100%;
  margin-top: 18px;
}

.form-message {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--danger);
  font-weight: 700;
}

.form-message.success {
  color: #047857;
}

.dashboard-page {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.dashboard-header {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 20px;
  align-items: start;
}

.panel {
  padding: 22px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.list-header {
  display: grid;
  grid-template-columns: 1fr minmax(200px, 280px);
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.search-label {
  margin: 0;
}

.contacts-list {
  display: grid;
  gap: 10px;
}

.contact-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.contact-card .avatar {
  display: none;
}

.contact-details h3 {
  margin: 0 0 4px;
}

.contact-details p {
  margin: 2px 0;
  color: var(--muted);
}

.contact-actions {
  display: flex;
  gap: 8px;
  align-items: start;
}

.icon-button {
  min-height: 34px;
  padding: 0 10px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

.icon-button.delete {
  color: var(--danger);
  background: #fee2e2;
  border-color: #fecaca;
}

.empty-state {
  padding: 18px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 10px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 800px) {
  .dashboard-grid,
  .list-header,
  .form-row,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .dashboard-header {
    align-items: stretch;
    flex-direction: column;
  }
}

/* New styling for easter egg video */
#title 
{
    font-size: 40px;
    width: 100%;
    margin: 2% 5%;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
    color: #FFFFFF;
}

#videoContainer {
    display: none; /* Hidden by default */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%); /* Positions the box perfectly */
    z-index: 9998; /* One layer below the reset button */
    border: 5px solid #fff;
    box-shadow: 0px 0px 20px rgba(0,0,0,0.8);
    background-color: #000;
}

/* Easter Egg Reset button (keep existing styles, just ensure z-index is highest) */
#resetButton {
    display: none; 
    position: fixed;
    top: 60px;
    right: 20px;
    padding: 10px 20px;
    background-color: red;
    color: white;
    font-weight: bold;
    border: 2px solid black;
    cursor: pointer;
    z-index: 9999; /* Top layer */
}
