/* styles.css */

/* Global Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column; /* Stack elements vertically */
    align-items: center;     /* Center content horizontally */
  }
  
  /* Device Switcher */
  .device-switcher {
    display: flex;
    justify-content: center;
    background-color: #1e1e1e;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
  }
  
  .device-switcher img {
    width: 50px; /* Smaller size */
    height: 50px;
    margin: 0 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
    object-fit: cover;
  }
  
  .device-switcher img:hover {
    border-color: #bb86fc;
  }
  
  /* Main Container */
  .container {
    background-color: #1e1e1e;
    padding: 20px 20px; /* Equal padding on all sides */
    border-radius: 8px;
    max-width: 600px;   /* Reduced from 800px to 600px */
    width: 100%;
    flex-grow: 1;
    margin: 0 auto;     /* Center the container */
    display: flex;
    flex-direction: column;
    align-items: center; /* Center child elements horizontally */
  }
  
  /* Device Name */
  h1 {
    color: #ffffff;
    margin-bottom: 10px;
  }
  
  /* Device Photo */
  .device-photo {
    width: 400px;       /* Set your desired width */
    height: 300px;      /* Set your desired height */
    position: relative;
    overflow: hidden;
    margin: 20px auto;  /* Center the device-photo container */
  }
  
  .device-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.5s ease-in-out;
    opacity: 1;
  }
  
  /* Modes and AI Button */
  .modes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
  }
  
  .mode-button,
  .ai-button {
    padding: 10px 20px;
    background-color: #bb86fc;
    color: #121212;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    position: relative;
  }
  
  .mode-button:hover,
  .ai-button:hover {
    background-color: #985eff;
    transform: translateY(-2px);
  }
  
  .ai-button {
    background-color: #03dac6;
  }
  
  .ai-button:hover {
    background-color: #00bfa5;
  }
  
  /* Custom Prompt */
  .custom-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
  }
  
  .custom-prompt input {
    width: 100%;
    padding: 10px;
    border: 1px solid #333333;
    border-radius: 4px;
    font-size: 16px;
    background-color: #2c2c2c;
    color: #ffffff;
  }
  
  .custom-prompt input::placeholder {
    color: #888888;
  }
  
  /* Results */
  .results {
    margin-top: 20px;
  }
  
  .result-section {
    margin-bottom: 20px;
  }
  
  .result-section h2 {
    margin-bottom: 10px;
    color: #bb86fc;
  }
  
  .settings-map {
    background-color: #2c2c2c;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #444444;
  }
  
  .settings-map ul {
    list-style-type: none;
    padding: 0;
  }
  
  .settings-map li {
    margin-bottom: 5px;
  }
  
  /* Apply Button */
  .apply-button {
    padding: 10px 20px;
    background-color: #03dac6;
    color: #121212;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    display: block;
    margin: 0 auto;
  }
  
  .apply-button:hover {
    background-color: #00bfa5;
    transform: translateY(-2px);
  }
  
  .apply-button:focus {
    outline: 2px solid #03dac6;
  }
  
  /* Modal Styles */
  .modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
  }
  
  .modal-content {
    background-color: #1e1e1e;
    padding: 20px 40px;
    border-radius: 8px;
    text-align: center;
    font-size: 18px;
    color: #ffffff;
    position: relative;
  }
  
  /* Loader Styles */
  .loader {
    border: 8px solid #3f3f3f;
    border-top: 8px solid #bb86fc;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
  }
  
  @keyframes spin {
    0% {
      transform: rotate(0deg);
    }
  
    100% {
      transform: rotate(360deg);
    }
  }
  
  /* Camera Overlay Styles */
  #overlay {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
  }
  
  .camera-container {
    background-color: transparent;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
  }
  
  video {
    width: 400px;
    max-width: 80%;
    height: auto;
    border-radius: 10px;
    z-index: 1;
  }
  
  #countdown {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 80px;
    color: #bb86fc;
    animation: fadeInOut 1s ease-in-out;
    z-index: 2;
  }
  
  @keyframes fadeInOut {
    0% {
      opacity: 0;
    }
  
    50% {
      opacity: 1;
    }
  
    100% {
      opacity: 0;
    }
  }
  
  #status-message {
    margin-top: 10px;
    color: #bb86fc;
    text-align: center;
  }
  
  #close-overlay {
    background-color: #03dac6;
    color: #121212;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    margin-top: 10px;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 20px;
  }
  
  #close-overlay:hover {
    background-color: #00bfa5;
  }
  
  /* Error Message Styles */
  #error-message {
    color: #cf6679;
    text-align: center;
    margin-top: 20px;
  }
  
  /* Responsive Styles */
  @media (max-width: 800px) {
    /* Adjust elements as needed for screens smaller than 800px */
    .device-switcher {
      flex-direction: row;
      margin-right: 0;
      margin-bottom: 20px;
      max-width: 100%;
    }
  
    .modes {
      flex-direction: column;
    }
  
    .mode-button,
    .ai-button {
      width: 100%;
      text-align: center;
    }
  
    video {
      width: 100%;
    }
  
    #countdown {
      font-size: 60px;
    }
  }
  
  /* Adjust container width on screens smaller than 600px */
  @media (max-width: 600px) {
    .container {
      max-width: 100%; /* Use full width on small screens */
    }
  }
  