* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #ff0000;
  --primary-dark: #cc0000;
  --secondary: #065fd4;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --bg-main: #0f0f0f;
  --bg-card: #1f1f1f;
  --bg-input: #282828;
  --text-primary: #ffffff;
  --text-secondary: #aaaaaa;
  --border: #3f3f3f;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
  color: var(--text-primary);
  min-height: 100vh;
  padding: 20px;
  line-height: 1.6;
}

.container {
  max-width: 800px;
  margin: 0 auto;
}

.header {
  text-align: center;
  margin-bottom: 40px;
  padding: 30px 20px;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  border-radius: 20px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.header::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%
  );
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.header-content {
  position: relative;
  z-index: 1;
}

.logo {
  font-size: 48px;
  margin-bottom: 10px;
}

h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
  font-size: 16px;
  opacity: 0.9;
  font-weight: 400;
}

.card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}

.auth-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--bg-input);
  border-radius: 12px;
  margin-bottom: 30px;
  border-left: 4px solid var(--success);
}

.auth-status.error {
  border-left-color: var(--error);
}

.auth-status.warning {
  border-left-color: var(--warning);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--success);
  animation: blink 2s ease-in-out infinite;
}

.status-dot.error {
  background: var(--error);
}

.status-dot.warning {
  background: var(--warning);
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

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

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.required {
  color: var(--error);
}

input[type="text"],
input[type="date"],
input[type="time"],
input[type="number"] {
  width: 100%;
  padding: 16px 20px;
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 16px;
  transition: all 0.3s ease;
  font-family: inherit;
}

input:focus {
  outline: none;
  border-color: var(--primary);
  background: #2a2a2a;
  box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.1);
}

.file-input-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
  width: 100%;
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  left: -9999px;
}

.file-input-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  background: var(--bg-input);
  border: 2px dashed var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.file-input-label:hover {
  border-color: var(--primary);
  background: #2a2a2a;
}

.file-input-label.has-file {
  border-color: var(--success);
  border-style: solid;
  background: rgba(16, 185, 129, 0.1);
}

.file-preview {
  margin-top: 16px;
  border-radius: 12px;
  overflow: hidden;
  display: none;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.file-preview img {
  width: 100%;
  display: block;
}

.image-gallery {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.gallery-header {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
  padding: 4px;
}

.gallery-grid::-webkit-scrollbar {
  width: 8px;
}

.gallery-grid::-webkit-scrollbar-track {
  background: var(--bg-input);
  border-radius: 4px;
}

.gallery-grid::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.gallery-grid::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--border);
  transition: all 0.3s ease;
  aspect-ratio: 16/9;
  background: var(--bg-input);
}

.gallery-item:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(255, 0, 0, 0.3);
}

.gallery-item.selected {
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  color: white;
  padding: 8px 6px 4px;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-name {
  opacity: 1;
}

.gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px;
  color: var(--text-secondary);
  font-size: 14px;
}

.gallery-empty i {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.3;
  display: block;
}

.quick-date-btns {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.quick-date-btn {
  padding: 8px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.quick-date-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn {
  padding: 18px 36px;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(255, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  font-family: inherit;
}

.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(255, 0, 0, 0.4);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.spinner {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

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

.result {
  margin-top: 30px;
  padding: 24px;
  border-radius: 12px;
  display: none;
  animation: slideIn 0.4s ease;
}

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

.result.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--success);
}

.result.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--error);
}

.result-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 18px;
}

.result-content {
  color: var(--text-secondary);
  line-height: 1.8;
}

.result-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.result-link:hover {
  background: var(--primary-dark);
  transform: translateX(4px);
}

.info-box {
  background: rgba(6, 95, 212, 0.1);
  border-left: 4px solid var(--secondary);
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

.footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

.autocomplete-wrapper {
  position: relative;
}

.autocomplete-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-top: none;
  border-radius: 0 0 12px 12px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  display: none;
}

.autocomplete-suggestions.show {
  display: block;
}

.autocomplete-item {
  padding: 14px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background: var(--bg-input);
  color: var(--primary);
}

.autocomplete-item.active {
  background: var(--primary);
  color: white;
}

.autocomplete-item i {
  opacity: 0.6;
  font-size: 14px;
}

.no-suggestions {
  padding: 14px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
}

/* Past Livestreams Link */
.past-lives-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  text-decoration: none;
  padding: 10px 20px;
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid var(--primary);
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.past-lives-link:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .container {
    padding: 0;
  }

  .card {
    padding: 24px 20px;
    border-radius: 16px;
  }

  .header {
    padding: 24px 16px;
    border-radius: 16px;
  }

  h1 {
    font-size: 24px;
  }

  .logo {
    font-size: 36px;
  }

  .quick-date-btns {
    flex-direction: column;
  }

  .quick-date-btn {
    width: 100%;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
  }
}
