/* CSS Variables for easy theming */
:root {
    --primary-color: #007bff;
    --primary-dark: #0056b3;
    --secondary-color: #333;
    --light-color: #f4f4f4;
    --text-color: #fff;
    --muted-text-color: #ccc;
    --transition-speed: 0.3s;
    --border-radius: 8px;
  }
  
  /* Reset & Global Styles */
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--light-color);
    color: #333;
    text-align: center;
    line-height: 1.6;
    opacity: 0;
    animation: fadeIn 1s ease-in-out forwards;
  }
  
  /* Fade-in animation */
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Header styling */
  header {
    background: var(--secondary-color);
    color: var(--text-color);
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    position: relative;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  /* Title and subtitle */
  header h1 {
    margin: 0;
    flex-grow: 1;
    text-align: left;
    font-size: 1.8em;
  }
  
  header p {
    margin: 0;
    font-size: 1em;
    color: var(--muted-text-color);
  }
  
  /* Header buttons container */
  .header-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
/* Settings Gear Icon */
#settingsIcon {
    position: relative;
    font-size: 34px;
    text-decoration: none;
    color: #ddd;
    transition: transform 0.3s ease-in-out, color 0.2s;
    margin-left: 15px;
}

#settingsIcon:hover {
    transform: rotate(120deg) scale(1.2);
    color: #ffffff;
}
  /* Preloader styling */
  #preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-in-out;
  }
  
  .loader {
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-top: 6px solid var(--text-color);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1.2s linear infinite;
  }
  
  @keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
  }
  
  /* Button styling */
  button {
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    border-radius: var(--border-radius);
    background-color: var(--primary-color);
    color: var(--text-color);
    cursor: pointer;
    transition: transform var(--transition-speed), background var(--transition-speed);
  }
  
  button:hover {
    transform: scale(1.05);
    background-color: var(--primary-dark);
  }
  
  button:disabled {
    background-color: #888;
    cursor: not-allowed;
  }
  
  /* Layout container */
  .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 20px;
    height: calc(100vh - 80px); /* Adjust based on header height */
  }
  
  /* Panels */
  .left-panel,
  .right-panel {
    flex: 1;
    min-width: 300px;
    padding: 10px;
  }
  
  /* iFrame styling */
  iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--border-radius);
    opacity: 0;
    animation: fadeIn 1s ease-in-out forwards 0.5s;
  }
  
  /* Responsive adjustments */
  @media (max-width: 768px) {
    header {
      flex-direction: column;
      text-align: center;
    }
    .header-buttons {
      margin-top: 10px;
    }
    .container {
      flex-direction: column;
      height: auto;
    }
    .left-panel,
    .right-panel {
      min-height: 300px;
    }
  }
  
  /* Question Detector Styles */
#questionDetector {
    background: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: height 0.3s ease;
    cursor: pointer;
  }
  
  .detector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    font-weight: bold;
    background: #dee2e6;
  }
  
  #detectorContent {
    padding: 10px;
    background: #f8f9fa;
  }
  
  /* Initially collapsed: a small slider (e.g. 30px high) */
  .detector-collapsed {
    height: 50px;
  }
  
  /* Expanded state (adjust height as needed; here ~120px, about 2/6 of panel height) */
  .detector-expanded {
    height: 150px;
  }
  