/* Tema principal do projeto com mistura do verde da Kick e roxo da Twitch */
:root {
  --bg-color: #0b0d12;
  --panel-color: #171b24;
  --panel-color-soft: #202636;
  --text-color: #ffffff;
  --muted-text: #cbd2e4;
  --accent-color: #9146ff;
  --accent-color-2: #53fc18;
  --success-color: #53fc18;
  --twitch-color: #9146ff;
  --youtube-color: #e74c3c;
  --button-bg: #252b39;
  --button-hover: #30384d;
  --border-color: rgba(145, 70, 255, 0.40);
  --border-color-soft: rgba(83, 252, 24, 0.20);
  --accent-gradient: linear-gradient(135deg, #9146ff 0%, #53fc18 100%);
  --panel-gradient: linear-gradient(180deg, rgba(145, 70, 255, 0.14) 0%, rgba(83, 252, 24, 0.10) 100%);
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background:
    linear-gradient(90deg,
      rgba(145, 70, 255, 0.25) 0%,
      rgba(133, 72, 236, 0.24) 32%,
      rgba(112, 95, 160, 0.22) 46%,
      rgba(96, 126, 96, 0.21) 54%,
      rgba(83, 252, 24, 0.20) 68%,
      rgba(83, 252, 24, 0.22) 100%),
    linear-gradient(180deg, rgba(8, 10, 14, 0.93) 0%, rgba(11, 13, 18, 0.98) 100%);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

header {
  padding: 20px;
  text-align: center;
  background:
    linear-gradient(90deg,
      rgba(145, 70, 255, 0.26) 0%,
      rgba(133, 72, 236, 0.24) 35%,
      rgba(108, 99, 153, 0.22) 48%,
      rgba(96, 126, 96, 0.20) 52%,
      rgba(83, 252, 24, 0.20) 65%,
      rgba(83, 252, 24, 0.22) 100%),
    rgba(23, 27, 36, 0.94);
  border-bottom: 2px solid var(--accent-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

header h1 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: 1px;
  text-shadow: 0 0 16px rgba(145, 70, 255, 0.25), 0 0 24px rgba(83, 252, 24, 0.16);
}

.button-panel {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  padding: 40px 20px;
}

.btn {
  display: inline-block;
  padding: 12px 20px;
  background: linear-gradient(135deg, #9146ff 0%, #6f2ee8 100%);
  color: var(--text-color);
  text-decoration: none;
  border-radius: 8px;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
  font-weight: bold;
  text-align: center;
  border: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  color: #ffffff;
}

footer {
  margin-top: auto;
  padding: 15px;
  text-align: center;
  background:
    linear-gradient(90deg,
      rgba(145, 70, 255, 0.18) 0%,
      rgba(132, 75, 228, 0.18) 34%,
      rgba(110, 98, 148, 0.17) 47%,
      rgba(97, 124, 98, 0.17) 53%,
      rgba(83, 252, 24, 0.18) 66%,
      rgba(83, 252, 24, 0.18) 100%),
    rgba(23, 27, 36, 0.94);
  border-top: 2px solid var(--accent-color);
}

footer a {
  color: #9cfb7d;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
}

th,
td {
  border: 1px solid #364055;
  padding: 6px;
  text-align: center;
}

th {
  background: linear-gradient(180deg, #6f3fd7 0%, #4d238f 100%);
  color: #fff;
  border-color: #6f46b8;
  box-shadow: inset 0 -2px 0 rgba(83, 252, 24, 0.55);
}

td {
  background-color: var(--panel-color);
}

.form-section {
  background: var(--panel-gradient), var(--panel-color);
  padding: 20px;
  margin: 20px;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
  border: 1px solid var(--border-color);
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin-bottom: 15px;
}

.hour-option {
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: #212735;
  border: 1px solid var(--border-color);
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
}

.hour-option input[type="checkbox"] {
  margin: 0;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

.form-row label {
  flex: 1 1 150px;
  margin-bottom: 5px;
  color: var(--muted-text);
}

.form-row input,
.form-row select,
.form-row textarea {
  flex: 2 1 250px;
  padding: 8px;
  border-radius: 6px;
  background-color: #212735;
  color: var(--text-color);
  border: 1px solid var(--border-color-soft);
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus,
.login-container .usuario input:focus {
  outline: none;
  border-color: var(--accent-color-2);
  box-shadow: 0 0 0 2px rgba(83, 252, 24, 0.15);
}

.form-row input[type="checkbox"] {
  flex: none;
}

.button-group {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 15px 0;
}

.login-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  padding: 40px;
  background:
    linear-gradient(90deg,
      rgba(145, 70, 255, 0.20) 0%,
      rgba(132, 74, 232, 0.19) 34%,
      rgba(109, 99, 149, 0.18) 47%,
      rgba(96, 124, 98, 0.17) 53%,
      rgba(83, 252, 24, 0.16) 66%,
      rgba(83, 252, 24, 0.16) 100%),
    rgba(20, 24, 34, 0.96);
  border-radius: 16px;
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.6);
  box-sizing: border-box;
  z-index: 10;
  border: 1px solid var(--border-color);
}

.login-container h2 {
  margin: 0 0 20px;
  padding: 0;
  color: #fff;
  text-align: center;
  text-shadow: 0 0 12px rgba(145, 70, 255, 0.24);
}

.login-container .usuario {
  position: relative;
  margin-bottom: 25px;
}

.login-container .usuario input {
  width: 100%;
  padding: 10px 0;
  font-size: 16px;
  color: #fff;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
  outline: none;
  background: transparent;
}

.login-container .usuario label {
  position: absolute;
  top: 0;
  left: 0;
  padding: 10px 0;
  font-size: 16px;
  color: #fff;
  pointer-events: none;
  transition: .5s;
}

.login-container .usuario input:focus ~ label,
.login-container .usuario input:valid ~ label {
  top: -20px;
  left: 0;
  color: var(--accent-color-2);
  font-size: 12px;
}

.login-container .btn {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 20px;
}

.login-container #loginError {
  color: #ff7a7a;
  margin-top: 10px;
  text-align: center;
}

.login-container .device-id-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
  color: #fff;
  font-size: 0.9rem;
}

.login-container .device-id-container .copy-id-btn {
  margin-left: 8px;
  padding: 4px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  border-radius: 4px;
  transition: filter 0.3s;
}

.login-container .device-id-container .copy-id-btn:hover {
  filter: brightness(1.08);
}

.button-group .btn {
  flex: none;
}

.schedule-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.welcome-message {
  font-size: 0.9rem;
  color: var(--muted-text);
  font-weight: bold;
  margin-top: 5px;
  text-align: right;
}

.login-expiry-info {
  font-size: 0.9rem;
  color: var(--muted-text);
  font-weight: bold;
  margin-bottom: 10px;
}

.welcome-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 5px;
}

.logout-btn {
  padding: 4px 10px;
  font-size: 0.8rem;
}

.platform-kick {
  background-color: #2fbf3d !important;
  color: #fff;
}

.platform-twitch {
  background-color: #7e39e6 !important;
  color: #fff;
}

.platform-youtube {
  background-color: #c0392b !important;
  color: #fff;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: var(--panel-gradient), var(--panel-color);
  padding: 20px;
  border-radius: 12px;
  min-width: 300px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.42);
  border: 1px solid var(--border-color);
}

.modal h2 {
  margin-top: 0;
}

code {
  color: #9efc6b;
}

.project-logo {
  display: block;
  margin: 0 auto 28px auto;
  width: 144px;
  max-width: 100%;
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.38), 0 0 18px rgba(145, 70, 255, 0.18), 0 0 20px rgba(83, 252, 24, 0.16);
}

.project-illustration-wrapper {
  text-align: center;
  margin-top: 20px;
}

.project-logo-large {
  max-width: 100%;
  width: 276px;
  height: auto;
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(145, 70, 255, 0.20), 0 0 22px rgba(83, 252, 24, 0.18);
}

.form-section.info-section p {
  color: var(--muted-text);
}

