/* TI Calculator Styles */
.calculator-container {
  margin: 0 auto;
  max-width: 100%;
  padding: 1rem;
}

.ti-calculator {
  background-color: #1a1a1a;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  color: white;
  font-family: 'Arial', sans-serif;
  margin: 0 auto;
  max-width: 400px;
  padding: 20px 15px;
  position: relative;
  width: 100%;
}

.ti-header {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
  padding-top: 5px;
}

.ti-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ti-brand {
  color: white;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1px;
}

.ti-model {
  color: goldenrod;
  font-size: 14px;
  font-weight: bold;
}

.ti-screen {
  background-color: #c9d2c3; /* Light greenish-gray like TI calculators */
  border-radius: 5px;
  height: 180px;
  margin: 10px auto 20px;
  overflow: hidden;
  padding: 10px;
  position: relative;
  width: 90%;
}

.screen-content {
  height: 150px;
  position: relative;
}

.screen-mode {
  display: none;
  height: 100%;
  position: absolute;
  width: 100%;
}

.screen-mode.active {
  display: block;
}

#graph-canvas {
  background-color: #c9d2c3;
  height: 100%;
  width: 100%;
}

#calc-mode {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: flex-end;
}

.previous-calc {
  color: #1a1a1a;
  font-family: monospace;
  font-size: 16px;
  margin-bottom: 5px;
  min-height: 18px;
  opacity: 0.7;
  overflow-wrap: break-word;
  text-align: right;
}

.current-calc {
  color: #1a1a1a;
  font-family: monospace;
  font-size: 24px;
  font-weight: bold;
  overflow-wrap: break-word;
  text-align: right;
}

.screen-status {
  border-top: 1px solid #aaa;
  color: #1a1a1a;
  display: flex;
  font-size: 10px;
  justify-content: space-between;
  margin-top: 5px;
  padding-top: 3px;
}

.ti-keyboard {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.key-section {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
}

.function-keys {
  justify-content: space-between;
}

.navigation-keys {
  display: flex;
  justify-content: center;
  margin: 10px 0;
}

.math-keys {
  justify-content: space-between;
}

.advanced-keys {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.key {
  align-items: center;
  background-color: #333;
  border: none;
  border-radius: 5px;
  color: white;
  cursor: pointer;
  display: flex;
  font-size: 12px;
  font-weight: bold;
  height: 35px;
  justify-content: center;
  transition: background-color 0.2s;
  user-select: none;
  width: 60px;
}

.function-key {
  background-color: #3a5876; /* Blue for function keys */
  width: calc(20% - 5px);
}

.arrow-key-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.arrow-middle-row {
  display: flex;
  gap: 5px;
}

.arrow-key {
  background-color: #555;
  height: 30px;
  width: 30px;
}

.up, .down {
  margin: 2px 0;
}

.math-key {
  background-color: #2c3e50; /* Dark blue for math keys */
  width: calc(20% - 5px);
}

.advanced-key, .numeric-key {
  width: 100%;
  font-size: 16px;
}

.advanced-key {
  background-color: #444;
}

.numeric-key {
  background-color: #666;
}

.enter-key {
  background-color: #3498db; /* Blue for enter key */
  grid-column: span 1;
}

.key:active, .key:hover {
  background-color: #555;
}

.function-key:active, .function-key:hover {
  background-color: #4b6b94;
}

.math-key:active, .math-key:hover {
  background-color: #3c5166;
}

.numeric-key:active, .numeric-key:hover {
  background-color: #888;
}

.advanced-key:active, .advanced-key:hover {
  background-color: #555;
}

.enter-key:active, .enter-key:hover {
  background-color: #57a5db;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .ti-calculator {
    max-width: 320px;
  }
  
  .key {
    font-size: 10px;
    height: 30px;
    width: 50px;
  }
  
  .arrow-key {
    height: 25px;
    width: 25px;
  }
}
