.calculator-div {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: none;
  margin: 0;
  padding: 0;
  min-height: auto;
  display: block;
}

.calculator {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 1.25rem;
  padding: 1.875rem;
  box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(0.625rem);
  width: 100%;
}



.name-field {
  margin-bottom: 1.25rem;
}

.name-field label {
  display: block;
  color: #495057;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.name-input {
  width: 100%;
  padding: 0.75rem;
  border: 0.125rem solid #e9ecef;
  border-radius: 0.75rem;
  font-size: 1rem;
  background: #f8f9fa;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.name-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 0.1875rem rgba(102, 126, 234, 0.1);
  background: #fff;
}

.display {
  background: #f8f9fa;
  border: 0.125rem solid #e9ecef;
  border-radius: 0.75rem;
  padding: 0.9375rem;
  margin-bottom: 1.25rem;
  font-family: 'Courier New', monospace;
  font-size: 1.25rem;
  min-height: 3.75rem;
  cursor: text;
  transition: all 0.2s ease;
  color: #111 !important;
}

.display:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 0.1875rem rgba(102, 126, 234, 0.1);
}

.result {
  background: #e8f5e8;
  border: 0.125rem solid #28a745;
  border-radius: 0.5rem;
  padding: 0.625rem;
  margin-top: 0.625rem;
  font-weight: bold;
  color: #155724;
}

.error {
  background: #f8d7da;
  border: 0.125rem solid #dc3545;
  border-radius: 0.5rem;
  padding: 0.625rem;
  margin-top: 0.625rem;
  color: #721c24;
}

.buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.625rem;
}

.aop-section {
  grid-column: 1 / -1;
  margin-bottom: 0.9375rem;
}

.aop-buttons {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
  max-height: 12.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.625rem;
  background: #f8f9fa;
  border-radius: 0.5rem;
  border: 0.0625rem solid #dee2e6;
  width: 100%;
  box-sizing: border-box;
}

.btnaop {
  padding: 0.9375rem;
  border: none;
  border-radius: 0.625rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0.25rem 0.375rem rgba(0, 0, 0, 0.1);
}

.btnaop:hover {
  transform: translateY(-0.125rem);
  box-shadow: 0 0.375rem 0.75rem rgba(0, 0, 0, 0.15);
}

.btnaop:active {
  transform: translateY(0);
}

.btn-aop {
  background: #6c757d;
  color: white;
  padding: 0.5rem;
  font-size: 0.75rem;
  font-family: 'Courier New', monospace;
  min-width: 0;
  word-break: break-all;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-aop:hover {
  background: #5a6268;
}

.btn-operator {
  background: #667eea;
  color: white;
}

.btn-operator:hover {
  background: #5a67d8;
}

.btn-equals {
  background: #28a745;
  color: white;
  grid-column: span 2;
}

.btn-equals:hover {
  background: #218838;
}

.btn-equals:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
}

.btn-clear {
  background: #dc3545;
  color: white;
  grid-column: span 1;
}

.btn-clear:hover {
  background: #c82333;
}

.btn-function {
  background: #fd7e14;
  color: white;
}

.btn-function:hover {
  background: #e96900;
}

h1 {
  text-align: center;
  color: #495057;
  margin-bottom: 1.875rem;
  font-size: 1.75rem;
}

.aop-label {
  text-align: center;
  color: #6c757d;
  font-weight: 600;
  margin-bottom: 0.625rem;
}

.search-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 0.125rem solid #dee2e6;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  background: #fff;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.1875rem rgba(102, 126, 234, 0.1);
  outline: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 40;
}

.modal-container {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow-y: auto;
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 64rem;
  width: 100%;
}

.close-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: #6b7280;
  z-index: 10;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: color 0.2s ease;
}

.close-button:hover {
  color: #374151;
}