/* TI-30XS MultiView Calculator Styles */
/* Reset and Base Styles */

/* Calculator Container */
.calculator-container {
    position: relative;
 
    
}

/* Main Calculator Body */
.calculator {
   
  background: linear-gradient(145deg, #5a6f7f, #4a5968);
  border-radius: 25px;
  padding: 20px 15px 30px 15px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.1),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2);
  width: 380px;
  max-width: 100vw;
  min-height: 650px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  border: 2px solid #1a202c;
  position: relative;
  margin: auto;
}

/* Solar Panel */
.solar-panel {
  background: #1a1a1a;
  height: 30px;
  width: 120px;
  margin: 0 auto 10px;
  border-radius: 4px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
  background-image: repeating-linear-gradient(
    90deg,
    #1a1a1a,
    #1a1a1a 10px,
    #2a2a2a 10px,
    #2a2a2a 12px
  );
}

/* Display Section */
.display-section {
  background: #d0d8d0;
  border-radius: 8px;
  padding: 10px;
  box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.3);
  border: 2px solid #2d3748;
  margin-bottom: 15px;
}

/* Status Indicators */
.status-indicators {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 9px;
  color: #3a3a3a;
  font-weight: bold;
  padding: 0 5px;
}

.indicator {
  opacity: 0.2;
  transition: opacity 0.3s ease;
}

.indicator.active {
  opacity: 1;
}

/* Main Display */
.display {
  background: #c5cdc5;
  border-radius: 4px;
  padding: 5px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid #a0a8a0;
  cursor: text;
  outline: none;
}

.display-line {
  height: 18px;
  line-height: 18px;
  font-size: 14px;
  font-weight: normal;
  color: #000;
  text-align: right;
  padding: 0 3px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: "Courier New", monospace;
}

#entry-line {
  font-size: 16px;
  height: 20px;
  line-height: 20px;
}

#result-line {
  font-size: 18px;
  height: 22px;
  line-height: 22px;
  font-weight: bold;
}

#history-line-1,
#history-line-2 {
  font-size: 12px;
  opacity: 0.6;
}

/* Button Grid */
.button-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  flex: 1;
  padding: 0 5px;
}

/* Navigation Circle */
.nav-circle {
  position: relative;
  background: #2d3748;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  grid-column: span 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.nav-btn {
  position: absolute;
  background: transparent;
  border: none;
  color: white;
  font-size: 12px;
  cursor: pointer;
  padding: 5px;
  opacity: 0.8;
}

.nav-btn:hover {
  opacity: 1;
}

#up-btn {
  top: 5px;
}
#down-btn {
  bottom: 5px;
}
#left-btn {
  left: 5px;
}
#right-btn {
  right: 5px;
}

/* Base Button Styles */
.btn {
  border: none;
  border-radius: 8px;
  font-family: Arial, sans-serif;
  font-weight: normal;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  min-height: 38px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  user-select: none;
  outline: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  padding: 3px;
}

.btn:active {
  transform: scale(0.95);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Button secondary labels (above main label) */
.btn-secondary {
  font-size: 9px;
  color: #4ade80;
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  font-weight: normal;
}

.btn-label {
  font-size: 13px;
  font-weight: bold;
  margin-top: auto;
}

/* Large buttons */
.large-btn {
  grid-row: span 2;
  min-height: 82px;
}

#btn-0 {
  grid-column: span 2;
}

/* Button color schemes */
.btn-number {
  background: #f0f0f0;
  color: #000;
  border: 1px solid #d0d0d0;
}

.btn-number:hover {
  background: #ffffff;
}

.btn-operation {
  background: #4a5568;
  color: white;
}

.btn-operation:hover {
  background: #5a6578;
}

.btn-green {
  background: #4ade80;
  color: #000;
}

.btn-green:hover {
  background: #5aee90;
}

.btn-mode,
.btn-secondary {
  background: #718096;
  color: white;
}

.btn-mode:hover,
.btn-secondary:hover {
  background: #8190a6;
}

.btn-alpha {
  background: #60a5fa;
  color: white;
}

.btn-alpha:hover {
  background: #70b5ff;
}

.btn-scientific,
.btn-function,
.btn-trig {
  background: #6b7280;
  color: white;
}

.btn-scientific:hover,
.btn-function:hover,
.btn-trig:hover {
  background: #7b8290;
}

.btn-special {
  background: #374151;
  color: white;
}

.btn-special:hover {
  background: #475161;
}

/* Active states */
.btn.secondary-active {
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

/* Branding */
.branding {
  text-align: center;
  margin-top: 10px;
  padding: 5px;
}

.brand-text {
  display: block;
  font-size: 10px;
  color: #e0e0e0;
  font-weight: bold;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.model-text {
  display: block;
  font-size: 14px;
  color: #f0f0f0;
  font-weight: bold;
  font-style: italic;
}

/* Error Display */
.error-display {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: #e53e3e;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    transform: translateX(-50%) translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

/* Help Panel */
.help-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

.help-panel.show {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.help-content {
  background: white;
  border-radius: 12px;
  padding: 30px;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.help-content h2 {
  color: #2d3748;
  margin-bottom: 20px;
  text-align: center;
}

.help-section {
  margin-bottom: 20px;
}

.help-section h3 {
  color: #4a5568;
  margin-bottom: 10px;
}

.help-section p {
  color: #718096;
  line-height: 1.6;
}

.help-close-btn {
  background: #4299e1;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 20px;
  width: 100%;
  transition: background 0.3s ease;
}

.help-close-btn:hover {
  background: #3182ce;
}

.help-close-btn:focus {
  outline: 2px solid #2c5282;
  outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 480px) {
  .calculator {
    width: 100%;
    padding: 15px 10px;
    min-height: 500px;
  }

  .btn {
    min-height: 35px;
    font-size: 12px;
  }

  .btn-secondary {
    font-size: 8px;
  }

  .btn-label {
    font-size: 11px;
  }

  .display-line {
    font-size: 12px;
    height: 16px;
    line-height: 16px;
  }

  .button-grid {
    gap: 4px;
  }

  .nav-circle {
    width: 50px;
    height: 50px;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .btn {
    border-width: 2px;
  }

  .display {
    border-width: 2px;
  }

  .calculator {
    border-width: 3px;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .btn,
  .indicator {
    transition: none;
  }

  .error-display,
  .help-panel,
  .help-content {
    animation: none;
  }
}

/* Focus Visible for Better Accessibility */
.btn:focus-visible {
  outline: 3px solid #4ade80;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .calculator {
    box-shadow: none;
    border: 2px solid #000;
  }

  .btn {
    border: 1px solid #000;
    background: white !important;
    color: black !important;
  }
}
