/* ============================================
   Rubik's Cube Custom Input — substyle.css
   ============================================ */

/* === HERO === */
.solver-hero {
  min-height: 32vh;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--nav-height) + 64px) 5% 56px;
  position: relative;
  overflow: hidden;
}

.solver-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 15% 50%, rgba(76,81,191,0.16) 0%, transparent 70%),
              radial-gradient(ellipse 50% 50% at 85% 20%, rgba(124,58,237,0.10) 0%, transparent 60%);
  pointer-events: none;
}

.solver-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 14px;
}

.solver-hero p {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.8;
  margin-top: 10px;
}

/* === TWO-COLUMN LAYOUT === */
.solver-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 28px;
  padding: 0 5% 100px;
  max-width: 1140px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* === LEFT COLUMN === */
.solver-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* === RIGHT COLUMN === */
.solver-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* === SHARED CARD STYLES === */
.solver-card {
  padding: 32px;
}

.solver-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.solver-card-desc {
  font-size: 0.87rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* === COLOR PICKER === */
.color-picker-wrap {
  display: flex;
  justify-content: center;
}

.colorselector {
  border-collapse: separate;
  border-spacing: 10px;
}

.colorselector td {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}

.colorselector td:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.colorselector td:active {
  transform: scale(0.97);
}

.swatch-label {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
  pointer-events: none;
}

/* === HOW TO CARD === */
.how-to-card { padding-bottom: 28px; }

.how-to-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.how-to-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.how-to-list li strong {
  color: var(--text);
}

/* === CUBE FACE GRID === */
.cube-faces {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.face-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.face-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

/* === FACE COLOR TABLES === */
.setcolor {
  border-collapse: separate;
  border-spacing: 3px;
  background: rgba(0,0,0,0.4);
  border-radius: 10px;
  padding: 4px;
  user-select: none;
}

.setcolor td {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: crosshair;
  transition: filter 0.1s ease;
}

.setcolor td:hover {
  filter: brightness(1.2);
}

/* === SOLVE ACTION === */
.solve-action {
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.solve-note {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 300px;
}

.solve-note strong { color: var(--text); }

.solve-btn { white-space: nowrap; flex-shrink: 0; }

/* === CUSTOM COLOR CURSOR === */
.circle-cursor {
  position: fixed;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.8);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  display: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  transition: background-color 0.15s ease;
}

/* ============================================
   MOBILE
   ============================================ */

@media (max-width: 960px) {
  .solver-layout {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 5% 80px;
  }

  .solver-left {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .solver-left > .glass-card { flex: 1; min-width: 260px; }
}

@media (max-width: 600px) {
  .solver-hero {
    padding: calc(var(--nav-height) + 40px) 5% 40px;
    min-height: 28vh;
  }

  .solver-card { padding: 24px 20px; }

  .solver-left { flex-direction: column; }

  .colorselector td { width: 52px; height: 52px; }

  .cube-faces {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .setcolor td {
    width: 20px;
    height: 20px;
    border-radius: 4px;
  }

  .solve-action {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 20px;
  }

  .solve-btn { width: 100%; justify-content: center; }
}
