
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #1a1a1c 0%, #1d1d1f 50%, #151517 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  padding: 20px;
  position: relative;
}

/* Make most text white but allow specific overrides */
body, input, select, button {
  color: #ffffff;
}

/* Ensure form labels are visible */
.xTableCell {
  color: #ffffff !important;
}

/* Ensure results are visible */
.service, .service *, .results, .results * {
  color: #ffffff !important;
}

.price {
  color: #007AFF !important;
}

#frame-container {
  width: 100%;
  max-width: 1000px;
  padding: 0;
}

#container {
  background: rgba(28, 28, 30, 0.98);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 80px 160px rgba(0, 0, 0, 0.9),
    0 60px 120px rgba(0, 0, 0, 0.7),
    0 40px 80px rgba(0, 0, 0, 0.5),
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 10px 20px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  padding: 40px;
  transform: translateY(-30px);
  color: #ffffff;
  position: relative;
  z-index: 10;
}

body.light-theme #container {
  background: rgba(255, 255, 255, 0.98);
  color: #1d1d1f;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 
    0 80px 160px rgba(0, 0, 0, 0.25),
    0 60px 120px rgba(0, 0, 0, 0.18),
    0 40px 80px rgba(0, 0, 0, 0.12),
    0 20px 40px rgba(0, 0, 0, 0.08),
    0 10px 20px rgba(0, 0, 0, 0.05),
    0 0 0 1px rgba(0, 0, 0, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 15px;
}

.logo {
  position: absolute;
  top: -5px;
  left: 0;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#carrier {
  font-size: 24px;
  font-weight: 600;
  color: #ffffff;
  margin-left: 45px;
}

.header-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.gear-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.gear-icon:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.gear-icon svg {
  fill: #8e8e93;
  width: 18px;
  height: 18px;
}

form,
#inputForm {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

input,
select {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  font-size: 14px;
  background: rgba(58, 58, 60, 0.8);
  color: #ffffff;
  transition: border-color 0.2s ease;
  width: 100%;
}

input:focus,
select:focus {
  outline: none;
  border-color: #007AFF;
}

button {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  background: #007AFF;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

button:hover {
  background: #0056b3;
}

.section {
  padding: 15px;
  background: rgba(44, 44, 46, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  margin-bottom: 10px;
}

.service {
  background: rgba(58, 58, 60, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.service h3 {
  margin: 0 0 6px 0;
  font-weight: 600;
  color: #ffffff;
  font-size: 16px;
}

.price {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: #007AFF;
  margin: 10px 0;
}

.results {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 15px;
}

@media screen and (min-width: 768px) {
  .results {
    grid-template-columns: 1fr 1fr;
  }
}

.checkbox-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}

@media screen and (min-width: 600px) {
  .checkbox-group {
    grid-template-columns: repeat(2, 1fr);
  }
}

.checkbox-group label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 13px;
  color: #ffffff;
}

.checkbox-group input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin-right: 6px;
  accent-color: #007AFF;
}

.button-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 15px;
}

.button-group button:last-child {
  background: rgba(58, 58, 60, 0.8);
  color: #ffffff;
}

.button-group button:last-child:hover {
  background: rgba(44, 44, 46, 0.8);
}

.disabled {
  pointer-events: none;
  opacity: 0.6;
}

.xTable {
  display: table;
  width: 100%;
}

.xTableRow {
  display: table-row;
}

.xTableCell,
.xTableHead {
  display: table-cell;
  padding: 6px 8px;
  vertical-align: middle;
  color: #ffffff !important;
}

.xTableCell select,
.xTableCell input {
  margin: 0;
  min-height: auto;
}

.xTableCell input[type="checkbox"] {
  width: 14px;
  height: 14px;
}

.footer {
  text-align: center;
  margin-top: 20px;
  padding: 15px;
  font-size: 11px;
  color: #ffffff;
}

#settings {
  animation: fadeIn 0.3s ease;
}

#inputForm {
  animation: fadeIn 0.3s ease;
}

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

/* Light Theme Styles */
body.light-theme {
  background: linear-gradient(135deg, #f8f8f9 0%, #f5f5f7 50%, #f2f2f4 100%);
  color: #1d1d1f;
}



body.light-theme input,
body.light-theme select {
  background: rgba(248, 248, 248, 0.8);
  color: #1d1d1f;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme input:focus,
body.light-theme select:focus {
  border-color: #007AFF;
}

body.light-theme .section {
  background: rgba(248, 248, 248, 0.6);
}

body.light-theme .service {
  background: rgba(248, 248, 248, 0.8);
}

body.light-theme .xTableCell {
  color: #1d1d1f !important;
}

body.light-theme .service,
body.light-theme .service *,
body.light-theme .results,
body.light-theme .results * {
  color: #1d1d1f !important;
}

body.light-theme .price {
  color: #007AFF !important;
}

body.light-theme #carrier {
  color: #1d1d1f;
}

body.light-theme .footer {
  color: #6e6e73;
}

body.light-theme .gear-icon:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

body.light-theme .button-group button:last-child {
  background: rgba(174, 174, 178, 0.3);
  color: #1d1d1f;
}

body.light-theme .button-group button:last-child:hover {
  background: rgba(174, 174, 178, 0.5);
}

body.light-theme .checkbox-group label {
  color: #1d1d1f;
}

#messageDiv {
  display: none;
}

.divButton {
  padding: 10px 20px;
}

/* Responsive adjustments */
@media screen and (max-width: 1050px) {
  #frame-container {
    max-width: 90%;
  }
}

@media screen and (max-width: 480px) {
  #container {
    padding: 20px 15px;
  }
  
  #carrier {
    font-size: 18px;
    margin-left: 40px;
  }
  
  .logo {
    width: 25px;
    height: 25px;
  }
  
  .checkbox-group {
    grid-template-columns: 1fr;
  }
  
  .results {
    grid-template-columns: 1fr;
  }
}
