/* ---------- GLOBAL ---------- */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 3rem 1rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #000000;
  color: #f0f0f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;

  /* Smooth animations */
  transition: background 0.3s ease;
}

h2 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  margin-bottom: 2rem;
  animation: fadeInDown 1s ease-out;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

/* ---------- FORM ---------- */
form {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #111;
  padding: 2rem;
  border-radius: 20px;
  width: 100%;
  max-width: 420px;

  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55),
              inset 0 0 20px rgba(97, 218, 251, 0.05);
  animation: fadeInUp 0.9s ease-out;
  backdrop-filter: blur(6px);
}

/* ---------- FILE INPUT ---------- */
input[type="file"] {
  appearance: none;
  width: 100%;
  padding: 1rem;
  border-radius: 12px;
  background: #1c1c1c;
  border: 1px solid #333;
  text-align: center;
  color: #ddd;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;

  transition: all 0.3s ease;
  box-shadow: inset 0 0 10px rgba(97, 218, 251, 0.25);
}

input[type="file"]:hover {
  background: #252525;
  border-color: #61dafb;
  box-shadow: 0 0 14px #61dafb88, inset 0 0 8px #61dafb88;
  color: #61dafb;
}

input[type="file"]::file-selector-button {
  background: #000;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  color: #61dafb;
  cursor: pointer;

  box-shadow: 0 0 10px #61dafb55;
  transition: all 0.3s ease;
}

input[type="file"]::file-selector-button:hover {
  background: #b30000;
  color: #fff;
  box-shadow: 0 0 15px #b30000aa;
}

/* ---------- BUTTON ---------- */
button {
  background: #000;
  color: #fff;
  border: none;
  padding: 1rem;
  border-radius: 12px;
  width: 100%;
  margin-top: 1.5rem;

  font-size: 1.4rem;
  font-weight: 700;

  cursor: pointer;
  transition: 0.25s ease;
  box-shadow: 0 0 12px #625b48aa, inset 0 0 10px #625b48aa;
}

button:hover {
  background: #b30000;
  transform: translateY(-3px);
  box-shadow: 0 0 20px #800000aa, inset 0 0 10px #800000aa;
}

/* Mobile tap feedback */
button:active {
  transform: scale(0.97);
}

/* ---------- PREVIEW ---------- */
#preview,
#videoPreview {
  width: min(320px, 90vw);
  margin-top: 2rem;
  border-radius: 14px;

  box-shadow: 0 0 30px rgba(0, 123, 255, 0.6);
  animation: fadeIn 1s ease;
  transition: transform 0.3s ease;
}

#preview:hover,
#videoPreview:hover {
  transform: scale(1.04);
}

/* ---------- LINK + STATUS ---------- */
#link {
  margin-top: 1rem;
  font-size: 1.1rem;
  text-align: center;
  animation: fadeIn 1s ease-out;
}

#link a {
  color: #61dafb;
  text-decoration: none;
  transition: 0.3s ease;
}

#link a:hover {
  color: #90e0ff;
}

#status {
  margin-top: 1rem;
  font-style: italic;
  color: #bbbbbb;
  text-align: center;
  animation: fadeIn 0.8s ease-out;
}

/* ---------- API OPTIONS ---------- */
.api-options {
  margin-top: 4rem;
  text-align: center;
  animation: fadeIn 1s ease-out;
}

.api-options h3 {
  font-size: clamp(1.4rem, 4vw, 1.9rem);
}

.api-grid {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.api-card {
  background: #111;
  padding: 1rem 1.6rem;
  border-radius: 14px;

  box-shadow: 0 0 15px rgba(97, 218, 251, 0.3);
  cursor: pointer;
  font-weight: bold;
  transition: all 0.25s ease;

  backdrop-filter: blur(4px);
}

.api-card:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 0 20px rgba(97, 218, 251, 0.6);
}

/* ---------- USER PANEL ---------- */
.user-container {
  position: fixed;
  top: 1rem;
  right: 1rem;

  display: flex;
  align-items: center;
  gap: 1rem;

  background: #111;
  padding: 0.6rem 1rem;
  border-radius: 14px;

  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
  animation: fadeInDown 1s ease-out;
}

.user-info img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.user-actions{
  display: inline-flex;
}

/* Buttons */
.user-actions a {
  padding: 0.5rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  color: #fff;

  transition: all 0.3s ease;
}

.dashboard-btn { background-color: #6441a5; }
.dashboard-btn:hover { background-color: #7d5bbe; }

.logout-btn { background-color: #c4302b; }
.logout-btn:hover { background-color: #d9534f; }

.twitch-login-btn {
  background-color: #6441a5;
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  color: #fff;
  font-weight: bold;
  display: inline-block;
  text-decoration: none;
  transition: 0.3s ease;
}

.twitch-login-btn:hover {
  background-color: #7d5bbe;
}

/* ---------- MODAL ---------- */
.modal {
  display: none;
  position: fixed;
  z-index: 50;
  top: 0; left: 0;
  width: 100%; height: 100%;
  backdrop-filter: blur(6px);
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
  background: #111;
  margin: 12% auto;
  padding: 2rem;
  width: min(90%, 550px);

  border-radius: 16px;
  color: #e0e0e0;
  animation: fadeInUp 0.5s ease;
  box-shadow: 0 0 30px rgba(0, 123, 255, 0.6);
}

.close-btn {
  float: right;
  font-size: 32px;
  cursor: pointer;
  color: #aaa;
}

.close-btn:hover {
  color: #fff;
}

/* ---------- IMAGE EXPIRED ---------- */
.image-expired-container {
  margin-top: 3rem;
  background: #111;
  padding: 2rem;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  text-align: center;

  color: #ff4d4d;
  box-shadow: 0 0 20px rgba(255, 77, 77, 0.4);
  animation: fadeIn 1s ease-out;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 600px) {
  .user-container {
    top: 0.5rem;
    position: relative;
    right: 0.5rem;
    padding: 0.5rem 0.8rem;
  }

  form {
    padding: 1.5rem;
  }

  button {
    font-size: 1.2rem;
  }
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
