/* ====== GLOBAL ====== */
body {
  margin: 0;
  padding: 0;
  background-color: #0f0f10;
  color: #e6e6e6;
  font-family: "Segoe UI", Roboto, sans-serif;
  transition: background-color 0.4s, color 0.4s;
}

.light-theme {
  background-color: #d8d8d8;
  color: #111;
}



/* ====== THEME TOGGLE ====== */
.theme-toggle {
  position: fixed;
  top: 15px;
  left: 15px;
  width: 54px;
  height: 27px;
  border: none;
  border-radius: 50px;
  background-color: #222;
  display: flex;
  align-items: center;
  padding: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
  box-shadow: 0 0 5px rgba(0,0,0,0.4);
  z-index: 1000;
}
.light-theme .theme-toggle {
  background-color: #5f5e5e;
}

.theme-toggle:focus {
  outline: 2px solid #888;
}

/* The moving circle */
.toggle-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #fff;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s ease;
}
.dark-theme .toggle-circle {
  transform: translateX(32px);
}

/* Icons inside circle */
.icon {
  position: absolute;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.sun {
  color: #f39c12;
}
.moon {
  color: #3498db;
}
.light-theme .sun {
  opacity: 1;
}
.dark-theme .moon {
  opacity: 1;
}




/* ====== MAIN CONTAINER ====== */
.main-container {
  width: 95%;
  margin: 20px auto;
  text-align: center;
}

.app-title {
  font-size: 2rem;
  color: #004cd8;
  margin-top: 40px;
  margin-bottom: 30px;
}
.app-title span {
  color: #888;
  font-size: 1.1rem;
}

/* ====== CONTROL PANEL ====== */
.control-panel {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.control-group label {
  margin-bottom: 5px;
  font-size: 0.9rem;
  color: #bbb;
}
.light-theme .control-group label {
  color: #333;
}

select {
  padding: 6px 10px;
  background-color: #121212;
  color: #fff;
  border: 1px solid #333;
  border-radius: 6px;
  min-width: 150px;
}
.light-theme select {
  background-color: #fff;
  color: #000;
  border: 1px solid #aaa;
}

/* ====== ANALYSIS GRID ====== */
.analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
}

.analysis-column {
  background-color: #1b1b1b;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 0 10px #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background-color 0.4s;
}
.light-theme .analysis-column {
  background-color: #ffffff;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* ====== BUTTONS ====== */
.analyze-btn {
  background: linear-gradient(90deg, #013672, #013672);
  color: white;
  font-weight: bold;
  padding: 10px 20px;
  border: 1px solid #013672;
  border-radius: 8px;
  margin-bottom: 10px;
  cursor: pointer;
  width: 85%;
  font-size: 1rem;
  transition: all 0.2s ease;
}
.analyze-btn:hover {
  transform: scale(1.03);
  background: linear-gradient(90deg, #1c3fb3, #0a18d1);
}
.light-theme .analyze-btn {
  background: linear-gradient(90deg, #3a7bf1, #3a7bf1);
  border: 1px solid #3a7bf1;
  color: #000;
}

/* .clear-btn {
  background: #444;
  color: #eee;
  border: none;
  border-radius: 8px;
  padding: 6px 15px;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.2s;
}
.clear-btn:hover {
  background: #666;
}
.light-theme .clear-btn {
  background: #ccc;
  color: #000;
} */

/* ====== TEXTAREAS ====== */
textarea {
  width: 100%;
  height: 620px;
  background-color: #121212;
  color: #00ffb3;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 10px;
  resize: none;
  font-family: Consolas, monospace;
  font-size: 0.9rem;
  transition: background-color 0.4s, color 0.4s;
}
.light-theme textarea {
  background-color: #f8f8f8;
  color: #000000;
  border: 1px solid #ccc;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1200px) {
  .analysis-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 850px) {
  .analysis-grid {
    grid-template-columns: 1fr;
  }
  .control-panel {
    flex-direction: column;
    align-items: center;
  }
  .control-group {
    width: 80%;
    align-items: center;
    text-align: center;
  }
  .app-title {
    font-size: 1.6rem;
  }
  textarea {
    height: 400px;
  }
}

@media (max-width: 480px) {
  select {
    min-width: 130px;
  }
  .analyze-btn {
    font-size: 0.9rem;
    width: 90%;
  }
  textarea {
    font-size: 0.85rem;
  }
}

/* ====== LOGOUT BUTTON ====== */
.logout-btn {
  position: absolute;
  top: 10px;
  right: 20px;
  color: white;
  background-color: #333;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
}
.logout-btn:hover {
  background-color: #555;
}
.light-theme .logout-btn {
  background-color: #a0a0a0;
  color: #000;
}

/* ====== CONTROL SECTIONS (ASSET / SETTINGS) ====== */
.controls-grid {
  display: grid;
  grid-template-columns: 2fr 0fr; /* Asset wider than Settings */
  gap: 20px;
  margin-bottom: 25px;
}

/* Card-like group with a legend title */
.control-section {
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 12px 14px 16px;
  background-color: #161616;
  box-shadow: 0 0 10px #000;
}
.control-section legend {
  padding: 0 8px;
  font-size: 0.95rem;
  color: #bbb;
}

/* Inner row for groups */
.control-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* Light theme variants */
.light-theme .control-section {
  background-color: #ffffff;
  border: 1px solid #dadada;
  box-shadow: 0 0 10px rgba(0,0,0,0.08);
}
.light-theme .control-section legend {
  color: #333;
}

/* Responsive stacking */
@media (max-width: 1200px) {
  .controls-grid {
    grid-template-columns: 1fr; /* Stack Asset and Settings */
  }
}
