/* Aligned with dashboard.html — app shell / layout picker */
:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #182033;
  --muted: #6d7890;
  --line: #e6ebf4;
  --primary: #6d5efc;
  --primary-2: #8b7dff;
  --accent: #19c2b8;
  --shadow: 0 10px 30px rgba(22, 34, 66, 0.08);
  --radius: 20px;
}

body {
  font-family: Inter, Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #f8faff 0%, #f3f6fb 100%);
  margin: 0;
  padding: 0;
  color: var(--text);
  min-height: 100vh;
}

.container {
  padding: 22px 24px 28px;
  text-align: center;
  max-width: 1400px;
  margin: 0 auto;
}

h1 {
  margin-bottom: 16px;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
}

.layout-scroll {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding-bottom: 12px;
}

.layout-frame {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--panel);
  border: 1px solid var(--line);
  aspect-ratio: 1 / 1;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.layout-frame:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(22, 34, 66, 0.12);
}

/* Full-area overlay: hover anywhere on the card to show options */
.layout-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(24, 32, 51, 0);
  transition: background 0.25s ease;
  pointer-events: none;
}

.layout-frame:hover::before {
  background: rgba(24, 32, 51, 0.4);
  pointer-events: auto;
}

.layout-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1500px;
  height: 1500px;
  border: none;
  transform-origin: top left;
  pointer-events: none;
  overflow: hidden;
  scrollbar-width: none;
}

.layout-frame iframe::-webkit-scrollbar {
  display: none;
}

.overlay-buttons {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  pointer-events: none;
}

.layout-frame:hover .overlay-buttons {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.overlay-link {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  text-decoration: none;
  font-weight: 700;
  padding: 12px 24px;
  min-width: 160px;
  text-align: center;
  border-radius: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 20px rgba(109, 94, 252, 0.35);
  border: none;
}

.overlay-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(109, 94, 252, 0.45);
}

.overlay-link.edit-btn {
  background: linear-gradient(135deg, #121a2e, #29324c);
  box-shadow: 0 8px 20px rgba(18, 26, 46, 0.35);
}

.overlay-link.edit-btn:hover {
  box-shadow: 0 12px 28px rgba(18, 26, 46, 0.45);
}

/* Responsive */
@media (max-width: 1200px) {
  .layout-scroll {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .layout-scroll {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 600px) {
  .layout-scroll {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  h1 {
    font-size: 1.5rem;
  }
}
