/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #f4f7f8;
  font-family: 'Roboto', sans-serif;
  color: #333;
  line-height: 1.6;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

/* Container styling */
{{/* .container {
  max-width: 800px;
  margin: auto;
  background: #fff;
  border-radius: 8px;
  padding: 30px;
  position: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
} */}}

.container {
  max-width: 800px;
  width: 100%;
  margin: 20px;
  background: #fff;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Header styling */
header {
  text-align: center;
  margin-bottom: 30px;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #007acc;
}

header p {
  font-size: 1.1rem;
  color: #555;
}

/* Input section styling */
.input-section, .output-section {
  margin-bottom: 30px;
}

.input-section h2, .output-section h2 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: #007acc;
}

.form-group {
  margin-bottom: 20px;
}

textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  resize: vertical;
}

input[type="file"] {
  font-size: 1rem;
}

.or {
  text-align: center;
  margin: 20px 0;
  font-size: 1.2rem;
  color: #888;
}

button {
  display: inline-block;
  background-color: #007acc;
  color: #fff;
  padding: 12px 25px;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #005fa3;
}

/* Output section styling */
.output-section {
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 4px;
  border: 1px solid #ddd;
}

/* Spinner styling */
.spinner {
  margin: 10px auto;
  border: 6px solid #f3f3f3;
  border-top: 6px solid #007acc;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Theme Toggle Styles */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider {
  background-color: #4da8da; /* Was #007acc */
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

input[type="file"]::-webkit-file-upload-button {
  background: #007acc;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
}

/* Dark Mode Styles */
body[data-theme="dark"] {
  background-color: #1a1a1a;
  color: #ffffff;
}

body[data-theme="dark"] .container {
  background-color: #2d2d2d;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

body[data-theme="dark"] header h1,
body[data-theme="dark"] .input-section h2,
body[data-theme="dark"] .output-section h2 {
  color: #4da8da;
}

body[data-theme="dark"] header p {
  color: #ccc;
}
body[data-theme="dark"] .or {
  color: #999;
}

body[data-theme="dark"] textarea,
body[data-theme="dark"] .output-section {
  background-color: #333;
  border-color: #444;
  color: #fff;
}

body[data-theme="dark"] button {
  background-color: #4da8da;
}

body[data-theme="dark"] button:hover {
  background-color: #357abd;
}

body[data-theme="dark"] .spinner {
  border-top-color: #4da8da;
}

body[data-theme="dark"] input[type="file"] {
  color: #fff;
}

body[data-theme="dark"] input[type="file"]::-webkit-file-upload-button {
  background: #4da8da;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
}

.cloudflare-sim {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: 'Segoe UI', sans-serif;
  }

.cf-verification-badge {
    background: #357abd;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.cf-verification-panel {
    display: none;
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-top: 10px;
    width: 300px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border: 1px solid #ddd;
}

.cf-verification-panel h3 {
    color:rgb(17, 110, 210);
    margin-bottom: 15px;
}

.cf-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.cf-loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #357abd;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

.cf-checklist {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cf-check-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
}

.cf-checkmark {
    color: #28a745;
    font-weight: bold;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dark mode adjustments */
body[data-theme="dark"] .cf-verification-panel {
    background: #2d2d2d;
    border-color: #444;
}

body[data-theme="dark"] .cf-verification-panel h3 {
    color: #357abd;
}

body[data-theme="dark"] .cf-check-item {
    color: #ccc;
}

/* Development Banner */
.dev-banner {
  position: fixed;
  top: 10px;
  left: 10px;
  background: rgb(0, 187, 255);
  color: #000;
  padding: 8px 15px;
  border-radius: 4px;
  font-size: 0.9rem;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
  display: inline-block;
}

.dev-banner .full-text { display: inline; }
.dev-banner .short-text { display: none; }

/* SkyGuard Alert */
.skyguard-alert {
  position: fixed;
  top: 20px;
  right: -300px;
  background: #357abd;
  color: white;
  padding: 12px 20px;
  border-radius: 4px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
  z-index: 1001;
  display: none;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  50% { transform: translateX(10px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}

/* Dark mode adjustments */
body[data-theme="dark"] .dev-banner {
  background: rgba(0, 140, 255, 0.69);
  color:rgb(255, 255, 255);
}

body[data-theme="dark"] .skyguard-alert {
  background:rgb(22, 142, 228);
}

/* Media Queries */
@media (max-width: 992px) {
  .container {
    max-width: 90%;
  }
  
  .cf-verification-panel {
    width: 280px;
  }
}

@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .input-section h2, 
  .output-section h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }
  
  textarea {
    rows: 4;
    min-height: 120px;
  }
  
  .cf-verification-panel h3 {
    font-size: 1.1rem;
  }

  .dev-banner {
    font-size: 0.85rem;
    padding: 6px 12px;
    max-width: 85%;
  }

  .dev-banner .full-text { display: inline; }
  .dev-banner .short-text { display: none; }
}

@media (max-width: 600px) {
  body {
    padding: 15px;
  }
  
  .container {
    padding: 20px;
    margin: 10px 0;
  }

  {{/* .dev-banner {
    bottom: 8px;
    left: 8px;
    font-size: 0.8rem;
    padding: 5px 10px;
  } */}}
  
  .theme-toggle span {
    font-size: 0.9rem;
  }
  
  .switch {
    width: 50px;
    height: 28px;
  }
  
  .slider:before {
    height: 20px;
    width: 20px;
  }
  
  input:checked + .slider:before {
    transform: translateX(22px);
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.75rem;
    margin-bottom: 8px;
  }
  
  header p {
    font-size: 1rem;
    line-height: 1.4;
  }
  
  .input-section h2, 
  .output-section h2 {
    font-size: 1.3rem;
  }
  
  textarea {
    padding: 12px;
    font-size: 0.9rem;
  }

  .dev-banner {
    max-width: 180px;
    padding: 5px 10px;
    left: 50%;
    transform: translate(-100%);
    text-align: center;
  }

  .dev-banner .full-text { display: none; }
  .dev-banner .short-text { display: inline; }
  
  .or {
    margin: 15px 0;
    font-size: 1rem;
  }
  
  button {
    font-size: 0.9rem;
    padding: 10px 20px;
  }
  
  .cf-verification-panel {
    padding: 15px;
    width: 95%;
  }
  
  .cf-checklist {
    gap: 8px;
  }
  
  .skyguard-alert {
    font-size: 0.9rem;
    padding: 10px 15px;
  }
}

@media (max-width: 360px) {
  body {
    padding: 10px;
  }
  
  .container {
    padding: 15px;
  }
  
  header h1 {
    font-size: 1.6rem;
  }
  
  .theme-toggle {
    gap: 6px;
  }
  
  .cf-verification-badge {
    padding: 6px 10px;
    font-size: 0.9rem;
  }
  
  .dev-banner {
    max-width: 160px;
    padding: 5px 10px;
    left: 50%;
    transform: translate(-100%);
    text-align: center;
  }
  
  .dev-banner .full-text { display: none; }
  .dev-banner .short-text { display: inline; }
  
  .output-section {
    padding: 15px;
  }
  
  #result {
    font-size: 0.9rem;
    word-wrap: break-word;
  }
}
