:root {
  --bg-color: #ffffff;
  --text-color: #000000;
  --app-bg: #ffffff;
  --button-bg: #3b82f6;
  --button-hover: #2563eb;
  --file-bg: #f8fafc;
  --file-border: #cbd5e1;
}

body.dark {
  --bg-color: #121212;
  --text-color: #f5f5f5;
  --app-bg: #1e1e1e;
  --button-bg: #444444;
  --button-hover: #333333;
  --file-bg: #2c2c2c;
  --file-border: #555;
}

* {
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  margin: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  transition: background 0.3s, color 0.3s;
  position: relative;
  z-index: 1;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(./Images/SEC.jpg);
  background-repeat: repeat;
  background-size: 50% 50%;
  z-index: -1;
  transition: filter 0.3s ease;
  filter: brightness(70%);
}

body.dark::before {
  filter: brightness(25%) grayscale(0.4);
}

.app {
  background: var(--app-bg);
  padding: 2.5rem 2rem;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.07);
  width: 100%;
  max-width: 480px;
  text-align: center;
  transition: background 0.3s;
}

h2 {
  background: linear-gradient(to right, #3b82f6, #9333ea);
  color: white;
  padding: 1rem;
  border-radius: 12px;
  font-size: 1.4rem;
  margin-bottom: 2rem;
}

input[type="file"] {
  display: block;
  width: 100%;
  padding: 0.8rem;
  border: 2px dashed var(--file-border);
  border-radius: 10px;
  background: var(--file-bg);
  color: var(--text-color);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

input[type="file"]::file-selector-button {
  padding: 0.6rem 1.2rem;
  background: var(--button-bg);
  border: none;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  margin-right: 1rem;
  transition: background 0.3s ease;
  font-weight: 600;
}

input[type="file"]::file-selector-button:hover {
  background: var(--button-hover);
}

input[type="file"]:hover {
  border-color: #3b82f6;
}

button {
  margin-top: 1.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--button-bg);
  color: white;
  font-weight: bold;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  width: 100%;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: var(--button-hover);
}

#status {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: #22c55e;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  height: 1.5rem;
}

#status.show {
  opacity: 1;
}

.custom-switch {
  cursor: pointer;
  width: 60px;
  position: absolute;
  right: -25%;
  top: 100%;
}
.custom-switch input {
  display: none;
}
.switch-icon {
  height: 35px;
  transform: translateX(-15px);
}

/* Switch Button Style */
.switch {
  position: absolute;
  top: 0.5%;
  right: 0.3%;
  display: inline-block;
  width: 60px;
  height: 25px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  top: 1px;
  left: 0;
  right: 0;
  bottom: 0;
  transition: 0.4s;
  border-radius: 34px;
  width: 50px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  background-color: white;
  bottom: 2px;
  left: 4px;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:checked + .slider:before {
  transform: translateX(26px);
}
