* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.background-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

.background-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.background-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><defs><radialGradient id="grad1"><stop offset="0%25" style="stop-color:rgba(255,255,255,0.1)"/><stop offset="100%25" style="stop-color:rgba(255,255,255,0)"/></radialGradient></defs><circle cx="200" cy="150" r="100" fill="url(%23grad1)"/><circle cx="800" cy="600" r="150" fill="url(%23grad1)"/><circle cx="1000" cy="200" r="80" fill="url(%23grad1)"/></svg>');
  background-size: cover;
  opacity: 0.3;
  z-index: 2;
}

.container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  min-height: 100vh;
}

header {
  text-align: center;
  color: white;
  margin-bottom: 40px;
}

.logo {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  backdrop-filter: blur(10px);
  font-size: 32px;
}

h1 {
  font-size: 2.5em;
  font-weight: 300;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.subtitle {
  font-size: 1em;
  opacity: 0.9;
  font-weight: 300;
}

.calculator-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 750px;
  width: 100%;
  backdrop-filter: blur(10px);
  border: 2px solid #00ff41;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 255, 65, 0.3);
  margin-bottom: 30px;
}

.calc-selector {
  margin-bottom: 30px;
}

label {
  display: block;
  color: #555;
  font-size: 0.9em;
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

select,
input {
  width: 100%;
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1em;
  transition: all 0.3s;
  background: white;
}

select:focus,
input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.input-field {
  margin-bottom: 20px;
}

/* Scientific Calculator Styles */
.sci-display {
  background: #2d3748;
  color: white;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sci-expression {
  font-size: 0.9em;
  color: #a0aec0;
  min-height: 25px;
  text-align: right;
  word-wrap: break-word;
}

.sci-result {
  font-size: 2em;
  font-weight: 300;
  text-align: right;
  word-wrap: break-word;
}

.sci-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.sci-btn {
  padding: 20px;
  font-size: 1.1em;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.sci-number {
  background: #f7fafc;
  color: #2d3748;
}

.sci-number:hover {
  background: #e2e8f0;
}

.sci-operator {
  background: #667eea;
  color: white;
}

.sci-operator:hover {
  background: #5568d3;
}

.sci-func {
  background: #48bb78;
  color: white;
  font-size: 0.95em;
}

.sci-func:hover {
  background: #38a169;
}

.sci-equals {
  background: #f56565;
  color: white;
}

.sci-equals:hover {
  background: #e53e3e;
}

.sci-btn:active {
  transform: scale(0.95);
}

.convert-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 30px auto;
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
  transition: all 0.3s;
}

.convert-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
}

.convert-btn:active {
  transform: scale(0.95);
}

.result-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  margin-top: 20px;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.result-label {
  font-size: 0.9em;
  opacity: 0.9;
  margin-bottom: 10px;
}

.result-value {
  font-size: 2em;
  font-weight: 300;
  word-break: break-all;
}

.calc-options {
  display: none;
  animation: fadeIn 0.3s;
}

.calc-options.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.info-text {
  color: #888;
  font-size: 0.85em;
  margin-top: 10px;
  text-align: center;
}

.isotope-info {
  background: #f5f5f5;
  padding: 15px;
  border-radius: 10px;
  margin-top: 15px;
  font-size: 0.9em;
  color: #666;
}

.info-box {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  max-width: 750px;
  width: 100%;
  margin-top: 30px;
  backdrop-filter: blur(10px);
}

.info-box h3 {
  color: #667eea;
  margin-bottom: 15px;
  font-size: 1.2em;
  font-weight: 600;
}

.info-box p {
  color: #555;
  line-height: 1.8;
  margin: 0;
}

.combined-box {
  border-left: 4px solid #667eea;
}

.combined-box strong {
  color: #667eea;
}

.combined-box em {
  color: #888;
  font-size: 0.95em;
}

.links-box {
  border-left: 4px solid #00ff41;
}

.links-box a {
  color: #00ff41;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
}

.links-box a:hover {
  color: #00cc33;
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

@media (max-width: 800px) {
  .container {
    padding: 40px 20px;
  }

  .calculator-card {
    padding: 30px 20px;
  }

  h1 {
    font-size: 2em;
  }

  .input-group {
    grid-template-columns: 1fr;
  }

  .info-box {
    padding: 20px;
  }

  .info-box h3 {
    font-size: 1.1em;
  }

  .sci-buttons {
    gap: 8px;
  }

  .sci-btn {
    padding: 15px;
    font-size: 1em;
  }
}
