/* Body and container */
body {
    font-family: "Georgia", serif;
    background: #fff;
    color: #000;
    display: flex;
    justify-content: center;
    padding: 50px 20px;
  }
  
/* Default light mode */
.upload-container {
  background: #fff;
  border: 1px solid #000;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
  max-width: 500px;
  margin: 3rem auto;
}
  
  /* Header */
  h1 {
    font-size: 2rem;
    margin-bottom: 25px;
    text-align: center;
  }
  
  /* Form and buttons */
  form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  
  input[type="file"] {
    padding: 10px;
    border: 1px solid #000;
    border-radius: 5px;
    cursor: pointer;
  }
  
  #file-name {
    font-size: 0.9rem;
    margin-top: 5px;
    color: #555;
  }
  
  .upload-btn {
    padding: 10px 25px;
    border: 1px solid #000;
    background: #fff;
    color: #000;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.2s;
  }
  
  .upload-btn:hover {
    background: #000;
    color: #fff;
  }
  
  /* Result area */
  #result {
    margin-top: 25px;
    background: #f3f3f3;
    padding: 15px;
    border-radius: 8px;
    white-space: pre-wrap;
    text-align: left;
    border: 1px solid #ccc;
  }
  
  .upload-btn {
    background-color: black;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 5px;
    transition: background 0.2s;
  }
  
  .upload-btn:hover {
    background-color: #333;
  }
  
  .spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3); /* light gray */
    border-top-color: #ffffff; /* bright white highlight */
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-left: 8px; /* spacing from the text */
  }
  
  @keyframes spin {
    to { transform: rotate(360deg); }
  }

  /* Dark mode overrides */
  body.dark-mode .upload-container {
    background: #2e2e2e;          /* dark gray background */
    border: 1px solid #999;       /* subtle gray border */
    color: #f5f5f5;               /* light text */
  }

  body.dark-mode .upload-btn {
    background: #f5f5f5;
    color: #000;
  }
  
  /* Dark mode spinner color */
  body.dark-mode .spinner {
    border: 2px solid rgba(0, 0, 0, 0.3); /* light black-gray ring */
    border-top-color: #000000; /* solid black highlight */
  }
  
  /* --- Mobile responsiveness --- */
/* --- Mobile responsiveness --- */
@media (max-width: 600px) {
  .upload-container {
    width: 90%;
    max-width: 320px;
    padding: 1.5rem;
  }

  h1 {
    font-size: 1.3rem;
    text-align: center;
  }  
}

h2 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

input[type="url"] {
  border: 1px solid #000;
  border-radius: 5px;
  font-size: 1rem;
  margin-bottom: 1rem;
}

hr {
  width: 80%;
  opacity: 0.4;
  margin: 2rem auto; /* centers it horizontally */
  border: 0; 
  border-top: 1px solid #ccc;
}