/* ==========================================
   Chemical Bonding & Molecular Geometry
   Improved Moderate CSS Design
========================================== */

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body Styling */
body {
  background: linear-gradient(135deg, #0f172a, #111827, #1e293b);

  color: #ffffff;

  font-family: 'Poppins', sans-serif;
  text-align: center;

  min-height: 100vh;
  overflow-x: hidden;

  padding: 20px;

  transition:
    background 0.3s ease,
    color 0.3s ease;
}

/* Main Container */
.container {
  max-width: 1000px;
  margin: auto;
  padding: 25px;
}

/* Page Header */
.page-header {
  margin-bottom: 30px;
}

/* Main Title */
.title {
  font-size: 2.8rem;

  margin-bottom: 15px;

  color: #ffffff;

  text-shadow:
    0 0 12px rgba(0, 255, 255, 0.8),
    0 0 25px rgba(0, 255, 255, 0.3);
}

/* Subtitle */
.subtitle {
  color: #cbd5e1;

  font-size: 1rem;

  max-width: 700px;
  margin: auto;

  line-height: 1.7;
}

/* Simulation Section */
.simulation-section {
  margin-top: 30px;
}

/* Content Container */
.iframe-container {
  width: 100%;
  max-width: 900px;

  margin: auto;

  border-radius: 18px;

  overflow: hidden;

  background:
    linear-gradient(145deg, #001f3f, #003566);

  padding: 25px;

  min-height: 320px;

  box-shadow:
    0 0 20px rgba(0, 255, 255, 0.2),
    0 0 35px rgba(0, 0, 0, 0.4);

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

/* Hover Animation */
.iframe-container:hover {
  transform: translateY(-3px);
}

/* Welcome Message */
.welcome-message h2 {
  color: #38bdf8;
  margin-bottom: 12px;
}

.welcome-message p {
  color: #e2e8f0;
  line-height: 1.6;
}

/* Canvas */
canvas {
  width: 100%;
  max-width: 500px;

  height: auto;

  margin: 20px auto;

  display: block;

  border-radius: 15px;

  border: 1px solid rgba(255, 255, 255, 0.2);

  background: #f8fafc;

  box-shadow:
    0 0 15px rgba(0, 0, 0, 0.3);
}

/* Resource Section */
.resource-section {
  margin-top: 40px;
}

.resource-section h2 {
  margin-bottom: 20px;

  font-size: 2rem;

  color: #38bdf8;
}

/* Button Grid */
.button-grid {
  display: grid;

  grid-template-columns:
    repeat(auto-fit, minmax(180px, 1fr));

  gap: 15px;

  margin-top: 25px;
}

/* Shared Button Style */
.button {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  background:
    linear-gradient(135deg, #007bff, #0056b3);

  color: white;

  padding: 12px 18px;

  border: none;
  border-radius: 12px;

  cursor: pointer;

  font-size: 1rem;
  font-weight: 500;

  text-decoration: none;

  transition: all 0.3s ease;

  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Button Hover */
.button:hover {
  background:
    linear-gradient(135deg, #0096ff, #0047ab);

  transform: translateY(-2px) scale(1.03);

  box-shadow:
    0 0 15px rgba(0, 153, 255, 0.5);
}

/* Button Click */
.button:active {
  transform: scale(0.96);
}

/* Home Button */
.home-btn {
  background:
    linear-gradient(135deg, #8e24aa, #5e35b1);
}

.home-btn:hover {
  background:
    linear-gradient(135deg, #ab47bc, #7e57c2);
}

/* Dark Mode Toggle */
.dark-toggle {
  position: fixed;

  top: 15px;
  right: 15px;

  background:
    linear-gradient(135deg, #facc15, #f59e0b);

  color: #000;

  padding: 12px 18px;

  border: none;
  border-radius: 30px;

  cursor: pointer;

  font-weight: 600;

  transition: all 0.3s ease;

  z-index: 1000;

  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Toggle Hover */
.dark-toggle:hover {
  transform: scale(1.05);

  background:
    linear-gradient(135deg, #fde047, #f59e0b);
}

/* Light Mode */
.dark-mode {
  background:
    linear-gradient(135deg, #f1f5f9, #e2e8f0);

  color: #000;
}

/* Light Mode Container */
.dark-mode .iframe-container {
  background:
    linear-gradient(145deg, #ffffff, #e2e8f0);

  color: #000;
}

/* Light Mode Buttons */
.dark-mode .button {
  color: white;
}

/* Feedback Popup */
.feedback-popup {
  position: fixed;

  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%);

  width: 90%;
  max-width: 450px;

  background:
    rgba(15, 23, 42, 0.98);

  color: white;

  padding: 25px;

  border-radius: 20px;

  box-shadow:
    0 0 25px rgba(0, 255, 255, 0.3);

  text-align: center;

  z-index: 2000;
}

/* Hidden Class */
.hidden {
  display: none;
}

/* Feedback Card */
.feedback-card h2 {
  color: #38bdf8;
  margin-bottom: 12px;
}

.feedback-card p {
  color: #cbd5e1;
  margin-bottom: 15px;

  line-height: 1.6;
}

/* Textarea */
.feedback-popup textarea {
  width: 100%;

  padding: 12px;

  border-radius: 12px;

  border: 1px solid #334155;

  background: #0f172a;

  color: white;

  font-size: 1rem;

  resize: vertical;

  outline: none;

  margin-top: 10px;
}

/* Focus Effect */
.feedback-popup textarea:focus {
  border-color: #38bdf8;

  box-shadow:
    0 0 10px rgba(56, 189, 248, 0.5);
}

/* Feedback Buttons */
.feedback-buttons {
  margin-top: 18px;
}

/* Responsive Design */
@media (max-width: 768px) {

  .title {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 0.95rem;
  }

  .button-grid {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  canvas {
    max-width: 100%;
  }

  .iframe-container {
    padding: 18px;
  }
}

/* Mobile Devices */
@media (max-width: 480px) {

  body {
    padding: 10px;
  }

  .title {
    font-size: 1.7rem;
  }

  .resource-section h2 {
    font-size: 1.5rem;
  }

  .dark-toggle {
    padding: 10px 14px;
    font-size: 0.9rem;
  }

  .feedback-popup {
    padding: 18px;
  }
}