:root {
  --bg-color: #f8f9fa;
  --text-color: #212529;
  --border-color: #dee2e6;
  --white: #ffffff;
  --brand-green: #006a38;
  --brand-light-green: #b9dcc5;
  --brand-light-grey: #d0cbc3;
}

body {
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system,
    BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  background: var(--bg-color);
  color: var(--text-color);
}

.app-header {
  background: var(--brand-light-green);
  text-align: center;
  padding: 2rem;
  border-bottom: 1px solid var(--brand-light-grey);
}

.safe-area-note {
  font-size: 1.1rem;
  text-align: center;
  margin-top: 6px;
  line-height: 1.2;
  pointer-events: none;
}

.upload-button {
  background: var(--brand-green);
  color: white;
  padding: 12px 25px;
  border-radius: 5px;
  display: inline-block;
  margin-top: 1rem;
  cursor: pointer;
}
.upload-button:hover {
  background: #004a27;
}
input[type="file"] {
  display: none;
}

.preview-area {
  padding: 2rem;
  max-width: 1800px;
  margin: auto;
}
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
}

.placeholder {
  border: 3px dashed var(--border-color);
  border-radius: 10px;
  text-align: center;
  color: #6c757d;
  padding: 4rem;
}

.resolution-group-title {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--brand-green);
  border-bottom: 1px solid var(--brand-light-grey);
  margin: 1rem 0;
  padding-bottom: 1rem;
}

.preview-card h4 {
  text-align: center;
  margin-bottom: 10px;
  font-weight: 600;
  color: #495057;
}

.screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 8px solid #1a1a1a;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease;
  cursor: zoom-in;
}

.screen:hover {
  transform: scale(1.5);
  z-index: 10;
  position: relative;
}

/* --- Dark translucent overlay on top of background image --- */
.screen::before {
  content: "";
  position: absolute;
  inset: 2%;
  border: 2px dashed rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 1;
}

/* --- Subtle vignette overlay --- */
.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(0, 0, 0, 0) 50%,
    rgba(0, 0, 0, 0.4) 100%
  );
  pointer-events: none;
}

.signin-overlay {
  position: absolute;
  inset: 0;
  color: var(--white);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  font-smooth: always;
  -webkit-font-smoothing: antialiased;
  z-index: 2;
}
.signin-overlay::before {
  content: "";
  position: absolute;
  inset: 23% 34%; /* distance from the edges of the overlay */
  border: 2px dashed rgba(255, 255, 255, 0.6);
  pointer-events: none;
  box-sizing: border-box;
}

/* --- Center section --- */
.signin-center-container {
  position: absolute;
  top: 52%; /* Slightly below center */
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
  width: 260px;
  text-align: center;
}

.signin-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(160, 160, 160, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
}

.signin-avatar svg {
  width: 50%;
  height: 50%;
  fill: var(--white);
}

.signin-username {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.signin-pin-container {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  padding: 6px 10px;
  width: 70%;
}
.signin-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.signin-links a {
  color: var(--white);
  text-decoration: none;
  font-size: 13px;
}
.signin-links a:hover {
  text-decoration: underline;
}

/* --- Bottom left user list --- */
.signin-user-list {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transform-origin: bottom left;
}
.user-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}
.user-item svg {
  width: 20px;
  height: 20px;
  fill: var(--white);
}

/* --- Bottom right system controls --- */
.signin-system-controls {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  gap: 16px;
  transform-origin: bottom right;
}
.signin-system-controls svg {
  width: 18px;
  height: 18px;
  fill: var(--white);
}

.app-footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
  color: #6c757d;
}
