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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #0a0e27;
  color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
header {
  text-align: center;
  padding: 40px 20px;
}

.back-link {
  display: inline-block;
  color: #667eea;
  text-decoration: none;
  font-size: 1.1em;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.back-link:hover {
  color: #f093fb;
  transform: translateX(-5px);
}

h1 {
  font-size: 3em;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.subtitle {
  font-size: 1.3em;
  color: #a0aec0;
  font-weight: 300;
}

/* Calculator Wrapper */
.calculator-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

/* Form */
.calc-form {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 40px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.6s ease-out;
}

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

.form-section h2 {
  font-size: 2em;
  margin-bottom: 30px;
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #f093fb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.form-group {
  margin-bottom: 25px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: #cbd5e0;
  font-weight: 500;
  font-size: 1.1em;
}

.label-icon {
  font-size: 1.3em;
}

input {
  width: 100%;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: 10px;
  color: #ffffff;
  font-size: 1.1em;
  transition: all 0.3s ease;
}

input:focus {
  outline: none;
  border-color: #667eea;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

input::placeholder {
  color: #a0aec0;
}

/* Submit Button */
.submit-btn {
  width: 100%;
  padding: 18px;
  margin-top: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.3em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
  position: relative;
  overflow: hidden;
}

.submit-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.submit-btn:hover::before {
  left: 100%;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
}

.submit-btn:active {
  transform: translateY(0);
}

/* Loading */
.loading {
  display: none;
  text-align: center;
  padding: 60px 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 30px;
}

.loader {
  width: 80px;
  height: 80px;
  border: 8px solid rgba(102, 126, 234, 0.2);
  border-top: 8px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 30px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading p {
  font-size: 1.3em;
  color: #cbd5e0;
  margin-bottom: 10px;
}

.loading-detail {
  font-size: 1em !important;
  color: #a0aec0 !important;
}

/* Results */
.results {
  display: none;
  margin-top: 40px;
  animation: fadeInUp 0.8s ease-out;
}

.results-title {
  text-align: center;
  font-size: 2.5em;
  margin-bottom: 40px;
  background: linear-gradient(135deg, #667eea 0%, #f093fb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Quantum Parameters */
.quantum-params {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 40px;
  border: 1px solid rgba(102, 126, 234, 0.3);
}

.quantum-params h3 {
  font-size: 1.8em;
  margin-bottom: 20px;
  color: #f093fb;
  text-align: center;
}

.params-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.param-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  border: 1px solid rgba(102, 126, 234, 0.2);
}

.param-label {
  font-size: 0.9em;
  color: #a0aec0;
  margin-bottom: 10px;
}

.param-value {
  font-size: 1.5em;
  font-weight: bold;
  color: #667eea;
}

/* Chart */
.chart-container {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 40px;
  margin-bottom: 40px;
  border: 1px solid rgba(102, 126, 234, 0.3);
}

#radarChart {
  max-width: 600px;
  margin: 0 auto;
  display: block;
}

/* Accordion */
.accordion {
  margin-bottom: 40px;
}

details {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
}

details:hover {
  border-color: rgba(102, 126, 234, 0.6);
  box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
}

summary {
  cursor: pointer;
  font-weight: bold;
  font-size: 1.3em;
  color: #f093fb;
  padding: 10px;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

summary:hover {
  color: #667eea;
}

details[open] summary {
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(102, 126, 234, 0.5);
  padding-bottom: 15px;
}

details p {
  color: #cbd5e0;
  margin-bottom: 15px;
  font-size: 1.05em;
  line-height: 1.8;
}

details strong {
  color: #667eea;
}

/* Crystals Section */
.crystals-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 40px;
  margin-bottom: 40px;
  border: 1px solid rgba(102, 126, 234, 0.3);
}

.crystals-section h3 {
  font-size: 2em;
  margin-bottom: 30px;
  text-align: center;
  color: #f093fb;
}

.crystals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
}

.crystal-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  border: 2px solid rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
}

.crystal-card:hover {
  transform: translateY(-10px);
  border-color: rgba(102, 126, 234, 0.6);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.crystal-icon {
  font-size: 60px;
  margin-bottom: 15px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.crystal-name {
  font-size: 1.4em;
  font-weight: bold;
  color: #f093fb;
  margin-bottom: 10px;
}

.crystal-properties {
  color: #cbd5e0;
  font-size: 0.95em;
  margin-bottom: 15px;
}

.crystal-benefit {
  color: #a0aec0;
  font-size: 0.9em;
  font-style: italic;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.action-btn {
  flex: 1;
  min-width: 200px;
  padding: 18px 30px;
  font-size: 1.2em;
  font-weight: bold;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.action-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.action-btn:hover::before {
  left: 100%;
}

.action-btn:hover {
  transform: translateY(-3px);
}

.pdf-btn {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  box-shadow: 0 10px 30px rgba(17, 153, 142, 0.4);
}

.pdf-btn:hover {
  box-shadow: 0 15px 40px rgba(17, 153, 142, 0.6);
}

.email-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.email-btn:hover {
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
}

.share-btn {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  box-shadow: 0 10px 30px rgba(240, 147, 251, 0.4);
}

.share-btn:hover {
  box-shadow: 0 15px 40px rgba(240, 147, 251, 0.6);
}

/* Footer */
footer {
  text-align: center;
  padding: 40px;
  color: #a0aec0;
  font-size: 0.9em;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 80px;
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2em;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .params-grid {
    grid-template-columns: 1fr;
  }
  
  .crystals-grid {
    grid-template-columns: 1fr;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .action-btn {
    width: 100%;
  }
}

