/* ==================== SIDEBAR CONTENT ==================== */
.sidebar-section {
  margin-bottom: 20px;
}

.section-label {
  font-size: 0.66rem;
  font-weight: 600;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

/* ==================== SETTINGS ==================== */
.settings-group {
  margin-bottom: 12px;
}

.settings-group.hidden {
  display: none;
}

.settings-label {
  font-size: 0.75rem;
  color: #666666;
  margin-bottom: 6px;
  display: block;
}

/* ==================== AXIS INPUTS ==================== */
.axis-inputs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.axis-input-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.axis-label {
  font-size: 0.75rem;
  color: #666666;
  font-weight: 500;
  min-width: 55px;
}


/* ==================== QUICK ACTIONS ==================== */
.quick-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  background: #F5F5F5;
  border: 2px solid #E0E0E0;
  border-radius: 12px;
  color: #666666;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.15s ease;
  font-family: inherit;
  overflow: hidden;
}

.action-btn svg {
  width: 16px;
  height: 16px;
}

.action-btn:hover {
  background: #F5F5F5;
  border: 2px solid #832EC5;
  box-shadow: 0 2px 8px rgba(131, 46, 197, 0.15);
  transform: translateY(-1px);
  color: #333333;
}

.action-btn:active {
  transform: translateY(-1px);
}

.action-btn.active {
  background: linear-gradient(135deg, rgba(185, 0, 255, 0.15) 0%, rgba(131, 46, 197, 0.1) 100%);
  border-color: rgba(185, 0, 255, 0.3);
  color: #832EC5;
}

/* ==================== TOOLS ==================== */
/* Using shared/tools-card.css */

/* Number chart has 2-column layout */
.tools-grid {
  grid-template-columns: repeat(2, 1fr);
}

/* ==================== CLEAR BUTTON ==================== */
.clear-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  background: #FFFFFF;
  border: 2px solid #EF4444;
  border-radius: 8px;
  color: #333333;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.clear-btn svg {
  width: 18px;
  height: 18px;
  color: #EF4444;
}

.clear-btn:hover:not(:disabled) {
  background: #FEF2F2;
  transform: translateY(-1px);
}

.clear-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
  justify-content: center;
  padding: 0;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #B900FF 0%, #FFC700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px rgba(185, 0, 255, 0.3);
  margin-bottom: 24px;
}

/* ==================== GRID ==================== */
.grid-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  width: 100%;
  overflow: hidden;
}

.grid {
  display: grid;
  gap: 3px;
  width: 100%;
  height: 100%;
  max-width: min(81vh, 81vw);
  max-height: min(81vh, 81vw);
  aspect-ratio: 1;
}

/* Number Chart Grid - 10x10 */
body.number-mode .grid {
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(10, 1fr);
}

.cell {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--cell-font-size, clamp(0.55rem, 1.45vw, 1.05rem));
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
  user-select: none;
}

.cell.number {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

.cell.number:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
  z-index: 10;
  box-shadow: 0 4px 20px rgba(185, 0, 255, 0.3);
}

.cell.highlighted {
  color: #1a1a2e;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.cell.hidden-number {
  color: transparent !important;
}

.cell.highlighted[style*="background-color: rgb(0, 0, 0)"]:not(.hidden-number),
.cell.highlighted[style*="background-color: #000000"]:not(.hidden-number) {
  color: #ffffff !important;
}

/* ==================== EQUATION DISPLAY ==================== */
.equation-display {
  min-height: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 30px;
  padding-bottom: 50px;
}

.number-display {
  font-size: 3rem;
  font-weight: 700;
  padding: 16px 40px;
  background: linear-gradient(135deg, rgba(131, 46, 197, 0.2) 0%, rgba(185, 0, 255, 0.15) 100%);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(185, 0, 255, 0.3);
  color: #fff;
  animation: fadeIn 0.3s ease;
  line-height: 1;
}

.number-display .number {
  background: linear-gradient(135deg, #B900FF 0%, #FFC700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1100px) {
  .sidebar {
    width: 80px;
    padding: 16px 8px;
  }
  
  .section-label,
  .settings-label,
  .action-btn span,
  .clear-btn span {
    display: none;
  }
  
  .quick-actions {
    flex-direction: column;
  }
  
  .main-content {
    margin-left: 80px;
  }
  
  .clear-btn {
    justify-content: center;
  }
}

@media (max-width: 900px) {
  .cell {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }
  
  h1 {
    font-size: 1.8rem;
  }
  
  .number-display {
    font-size: 2rem;
    padding: 12px 28px;
  }
}

@media (max-width: 600px) {
  .sidebar {
    width: 60px;
    padding: 12px 6px;
  }
  
  .main-content {
    margin-left: 60px;
    padding: 20px 10px;
  }
  
  .cell {
    width: 28px;
    height: 28px;
    font-size: 0.65rem;
    border-radius: 4px;
  }
  
  .tool-btn span {
    display: none;
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
  }
}
