/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', 'Segoe UI', sans-serif;
}

body {
  background: linear-gradient(to right, #dceefb, #e0f7fa);
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
  padding: 20px;
}

/* Header */
.header {
  text-align: center;
  padding: 30px 10px;
  background: linear-gradient(to right, #00c6ff, #0072ff);
  color: white;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.header h1 {
  font-size: 2.8rem;
  margin-bottom: 10px;
}

.header p {
  font-size: 1.2rem;
  font-weight: 300;
}

/* Intro Section */
.intro {
  text-align: center;
  margin-bottom: 25px;
}

.intro h2 {
  font-size: 2rem;
  color: #0072ff;
}

/* Practical List Grid */
.practical-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 0 10px;
}

/* Card Style */
.card {
  background-color: white;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.card:hover {
  transform: translateY(-6px);
  border-color: #0072ff;
  box-shadow: 0 12px 25px rgba(0,0,0,0.15);
  background-color: #f0faff;
}

.card h3 {
  font-size: 1.4rem;
  color: #0072ff;
  margin-bottom: 10px;
}

.card p {
  font-size: 0.95rem;
  color: #444;
}

/* Coming Soon Card */
.card.coming-soon {
  position: relative;
  border: 2px solid #7c4dff;
  background: radial-gradient(ellipse at top left, #f3e5ff 0%, #ffffff 60%);
  overflow: hidden;
}
.card.coming-soon::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(45deg, #7c4dff, #00e6e6, #ff8a00, #7c4dff);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: glow-rotate 3s linear infinite;
  pointer-events: none;
}
@keyframes glow-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.card.coming-soon h3 {
  color: #7c4dff;
}
.card.coming-soon .soon-title {
  display: inline-block;
  font-weight: 800;
  color: #ff6b35;
  margin-bottom: 8px;
}

/* Dark Mode for Coming Soon Card */
body.dark-mode .card.coming-soon {
  background: radial-gradient(ellipse at top left, #2d1b69 0%, #1a1a2e 60%);
  border-color: #00e6e6;
}

body.dark-mode .card.coming-soon h3 {
  color: #00e6e6;
}

body.dark-mode .card.coming-soon .soon-title {
  color: #ff8a00;
}

body.dark-mode .card.coming-soon p {
  color: #e2e8f0;
}

/* Practical Section */
.practical-section {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
  max-width: 800px;
  margin: 20px auto;
}

.practical-section h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #0072ff;
  font-size: 1.8rem;
}

/* Buttons */
button {
  padding: 10px 20px;
  margin: 10px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #00c6ff, #0072ff);
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 114, 255, 0.3);
}

/* Specific Button Colors */
#replay-button {
  background: linear-gradient(135deg, #dc3545, #ff6b6b);
}

#replay-button:hover {
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

#wind-control, #simulation-speed {
  background: linear-gradient(135deg, #6c757d, #adb5bd);
}

#wind-control:hover, #simulation-speed:hover {
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

/* Controls Section */
.controls, .compare-controls, .simulation-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  background: rgba(255, 255, 255, 0.8);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.controls label, .compare-controls label, .simulation-controls label {
  display: flex;
  flex-direction: column;
  font-size: 16px;
}

.controls input, .controls select,
.compare-controls input, .compare-controls select,
.simulation-controls input, .simulation-controls select {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  margin-top: 5px;
  background-color: #fff;
  color: #333;
}

/* Height Value Display */
#height-value, #height-value1, #height-value2, #height-value3 {
  margin-top: 5px;
  font-weight: bold;
  color: #6a1b9a;
}

/* Simulation Area */
.simulation-area,
.compare-fall-area {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 50px;
  margin-top: 30px;
  min-height: 250px;
}

.fall-container {
  width: 150px;
  height: 200px;
  background-color: #ffffffd9;
  border: 2px dashed #ce93d8;
  position: relative;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 10px;
  overflow: hidden;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

/* Falling Objects */
#falling-object, #falling-object1, #falling-object2, #falling-object3 {
  font-size: 48px;
  position: absolute;
  top: 0;
  transition: top 2s ease-in;
}

/* Timer */
#timer, #timer1, #timer2, #timer3 {
  margin-top: 10px;
  font-size: 18px;
  font-weight: bold;
  color: #4a148c;
}

/* History Log */
.history-log {
  margin-top: 30px;
  background: #f3e5f5;
  padding: 15px;
  border-radius: 10px;
  max-height: 150px;
  overflow-y: auto;
  color: #4a148c;
}

/* Graphs */
.graph-container {
  display: flex;
  justify-content: space-around;
  margin-top: 40px;
  gap: 20px;
}

.graph {
  width: 48%;
  height: 300px;
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid #ce93d8;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.graph h3 {
  font-size: 18px;
  text-align: center;
  padding-top: 10px;
  color: #6a1b9a;
}

/* Mode Toggle */
.mode-toggle {
  text-align: center;
  margin-top: 20px;
}

.mode-toggle button {
  background: linear-gradient(to right, #ffca28, #ffd54f);
  color: #333;
  font-weight: bold;
}

/* Object Preview */
#selected-object-preview,
#selected-object-preview1,
#selected-object-preview2 {
  font-size: 48px;
  text-align: center;
  margin-top: 10px;
}

/* Footer */
.footer {
  background: #111;
  color: #eee;
  padding: 30px 20px;
  text-align: center;
  border-top: 2px solid #444;
  margin-top: 50px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
}

.footer h3 {
  margin-bottom: 10px;
  font-size: 1.8rem;
  color: #00e6e6;
}

.footer p {
  margin: 8px 0;
  font-size: 1.15rem;
}

.footer-links {
  margin-top: 15px;
  font-size: 1.1rem;
}

.footer-links a {
  color: #00e6e6;
  text-decoration: none;
  margin: 0 5px;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Dark Mode */
body.dark-mode {
  background: linear-gradient(to right, #212121, #424242);
  color: #eee;
}

body.dark-mode .controls,
body.dark-mode .compare-controls,
body.dark-mode .object-column,
body.dark-mode .fall-container,
body.dark-mode .history-log,
body.dark-mode .graph {
  background: #2d3748;
  color: #e2e8f0;
  border-color: #4a5568;
}

body.dark-mode button {
  background: linear-gradient(135deg, #00c6ff, #0072ff);
}

body.dark-mode .mode-toggle button,
body.dark-mode #dark-mode {
  background: linear-gradient(90deg, #00c6ff, #0072ff);
  color: #fff;
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
  .controls, .compare-controls, .simulation-controls {
    flex-direction: column;
    align-items: center;
  }

  .object-column {
    width: 100%;
  }

  .compare-fall-area {
    flex-direction: column;
    gap: 20px;
  }

  .header h1 {
    font-size: 2rem;
  }

  .card {
    padding: 16px;
  }

  .card h3 {
    font-size: 1.2rem;
  }
}
/* Dark Mode: Header */
body.dark-mode .header {
  background: linear-gradient(to right, #1e1e1e, #333333);
  color: #f1f1f1;
  box-shadow: 0 8px 16px rgba(255, 255, 255, 0.1);
}

/* Dark Mode: Cards */
body.dark-mode .card {
  background-color: #2c2c2c;
  border-color: #555;
  color: #eee;
  box-shadow: 0 6px 15px rgba(255, 255, 255, 0.05);
}

body.dark-mode .card:hover {
  background-color: #3a3a3a;
  border-color: #00e6e6;
  box-shadow: 0 12px 25px rgba(255, 255, 255, 0.1);
}

/* Dark Mode: Practical Section */
body.dark-mode .practical-section {
  background-color: #2b2b2b;
  color: #f1f1f1;
}

/* Dark Mode: Footer */
body.dark-mode .footer {
  background: #1c1c1c;
  color: #ccc;
  border-top: 2px solid #555;
  box-shadow: 0 -2px 10px rgba(255, 255, 255, 0.1);
}

body.dark-mode .footer h3 {
  color: #00e6e6;
}

body.dark-mode .footer-links a {
  color: #00e6e6;
}

body.dark-mode .card p {
  color: #ccc;
}

/* Refraction Simulator Styles */
.controls-outer {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  background: none;
  box-shadow: none;
}

.controls-panel {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
  padding: 18px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 320px;
}

.controls-panel .controls {
  background: none;
  box-shadow: none;
  padding: 0;
  margin-bottom: 0;
  gap: 32px;
}

.control-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 10px;
  min-width: 160px;
}

.control-group label {
  font-size: 1rem;
  color: #222;
  font-weight: 600;
  margin-bottom: 4px;
}

.control-group input[type="range"] {
  width: 140px;
  accent-color: #0072ff;
}

.ref-index {
  font-size: 0.95rem;
  color: #6a1b9a;
  margin-top: 2px;
  font-weight: 500;
}

.canvas-outer {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.canvas-panel {
  background: #f0faff;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  padding: 18px 18px 8px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#simCanvas {
  border-radius: 12px;
  border: 2px solid #ce93d8;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.dark-mode-btn {
  display: block;
  margin: 0 auto 18px auto;
  background: linear-gradient(90deg, #00c6ff, #0072ff);
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.dark-mode-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 114, 255, 0.3);
}

.dark-mode #dark-mode,
.dark-mode .dark-mode-btn {
  background: linear-gradient(90deg, #00c6ff, #0072ff);
}

/* Dark Mode for Refraction Simulator */
body.dark-mode .controls-outer, body.dark-mode .controls-panel {
  background: #2d3748;
  color: #e2e8f0;
  box-shadow: 0 4px 16px rgba(255,255,255,0.07);
}
body.dark-mode .canvas-panel {
  background: #2d3748;
  box-shadow: 0 4px 16px rgba(255,255,255,0.07);
}
body.dark-mode #simCanvas {
  background: linear-gradient(180deg, #2d3748, #4a5568);
  border-color: #63b3ed;
}
body.dark-mode .control-group label {
  color: #e2e8f0;
}
body.dark-mode .ref-index {
  color: #63b3ed;
}
body.dark-mode #darkModeBtn,
body.dark-mode .dark-mode-btn {
  background: linear-gradient(90deg, #00c6ff, #0072ff);
  color: #fff;
}
body.dark-mode #darkModeBtn:hover,
body.dark-mode .dark-mode-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 114, 255, 0.3);
}

/* Responsive for Refraction Simulator */
@media screen and (max-width: 768px) {
  .controls-outer, .canvas-outer {
    flex-direction: column;
    align-items: center;
  }
  .controls-panel {
    min-width: 0;
    width: 95%;
    padding: 12px 4px;
  }
  .canvas-panel {
    width: 100%;
    padding: 8px 2px 2px 2px;
  }
  #simCanvas {
    width: 98vw !important;
    max-width: 100%;
    height: auto !important;
  }
}


