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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #e2e8f0;
  background: #0f172a;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
  animation: backgroundMove 20s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: -1;
}

@keyframes backgroundMove {
  0% {
    transform: translateY(0) scale(1);
  }
  100% {
    transform: translateY(-20px) scale(1.05);
  }
}

/* Admin page specific styles */
body.admin-page {
  background: #1e293b;
}

body.admin-page::before {
  background:
    radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  padding: 1rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar.admin-navbar {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  transition: all 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #cbd5e1;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #818cf8;
  transition: transform 0.3s ease;
}

.user-avatar:hover {
  transform: scale(1.1);
  border-color: #c084fc;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transition: left 0.3s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, #475569 0%, #64748b 100%);
  color: #fff;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(71, 85, 105, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
  animation: none;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
  }
  50% {
    box-shadow: 0 4px 25px rgba(16, 185, 129, 0.5);
  }
}

.btn-google {
  background: linear-gradient(135deg, #4285f4 0%, #357ae8 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
}

.btn-google:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(66, 133, 244, 0.4);
}

.btn-block {
  display: block;
  width: 100%;
}

.btn-small {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Hero */
.hero {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-radius: 16px;
  margin-bottom: 2rem;
  border: 1px solid rgba(99, 102, 241, 0.2);
  backdrop-filter: blur(10px);
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.hero p {
  font-size: 1.2rem;
  color: #94a3b8;
}

/* Tasks Grid */
.tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.task-card {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.1);
  transition: all 0.3s ease;
  position: relative;
}

.task-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #818cf8 0%, #c084fc 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.task-card:hover::before {
  transform: scaleX(1);
}

.task-card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 12px 40px rgba(99, 102, 241, 0.3),
    0 0 80px rgba(129, 140, 248, 0.2),
    inset 0 0 0 1px rgba(129, 140, 248, 0.3);
  border-color: rgba(129, 140, 248, 0.5);
}

.task-thumbnail {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.task-thumbnail::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.8), transparent);
}

.task-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.task-card:hover .task-thumbnail img {
  transform: scale(1.1);
}

.task-content {
  padding: 1.5rem;
}

.task-content h3 {
  margin-bottom: 0.5rem;
  color: #f1f5f9;
  font-size: 1.25rem;
  font-weight: 700;
}

.task-description {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.task-requirements {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.75rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 6px;
  font-size: 0.85rem;
  color: #a5b4fc;
  font-weight: 500;
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.badge-inactive {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.task-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.task-progress {
  font-size: 0.9rem;
  color: #94a3b8;
}

/* Task Detail */
.task-detail {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.task-detail h1 {
  color: #f1f5f9;
  font-weight: 700;
  margin-bottom: 1rem;
}

.task-detail .task-description {
  color: #cbd5e1;
  margin-bottom: 1.5rem;
}

.back-link {
  color: #818cf8;
  text-decoration: none;
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.back-link:hover {
  color: #c084fc;
  transform: translateX(-4px);
}

.video-container {
  margin: 2rem 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.video-container iframe {
  border-radius: 12px;
}

.task-info h2 {
  margin-bottom: 1rem;
  color: #f1f5f9;
  font-weight: 700;
}

.task-info h4 {
  color: #cbd5e1;
  margin-bottom: 0.75rem;
}

.requirements-list {
  list-style: none;
  margin-bottom: 2rem;
}

.requirements-list li {
  padding: 0.75rem 1rem;
  font-size: 1.05rem;
  background: rgba(99, 102, 241, 0.1);
  margin-bottom: 0.5rem;
  border-radius: 8px;
  border-left: 3px solid #818cf8;
  color: #f1f5f9;
  font-weight: 500;
}

.task-actions {
  margin-top: 2rem;
}

.task-actions .btn {
  margin-right: 1rem;
  margin-bottom: 1rem;
}

.info-text {
  margin-bottom: 1rem;
  color: #94a3b8;
}

/* Video blocks */
.videos-list {
  margin: 2rem 0;
}

.videos-list h2 {
  color: #f1f5f9;
  margin-bottom: 1rem;
}

.videos-list p {
  color: #cbd5e1;
  margin-bottom: 1.5rem;
}

.video-block {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.video-block:hover {
  border-color: rgba(129, 140, 248, 0.3);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
}

.video-block h3 {
  color: #f1f5f9;
  margin-bottom: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.video-block .task-info {
  background: transparent;
}

.video-block .task-info h4 {
  color: #e2e8f0;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.video-block .requirements-list li {
  background: rgba(99, 102, 241, 0.15);
  color: #f1f5f9;
}

/* Alerts */
.alert {
  padding: 1.25rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  border: 1px solid;
}

.alert h3 {
  margin-bottom: 0.5rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.3);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.3);
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.3);
}

.alert ol, .alert ul {
  margin-left: 1.5rem;
  margin-top: 0.5rem;
}

.alert li {
  margin-bottom: 0.25rem;
}

.reward-box {
  background: rgba(16, 185, 129, 0.1);
  padding: 1.5rem;
  border: 2px dashed #10b981;
  border-radius: 12px;
  font-family: 'Courier New', monospace;
  font-size: 1.3rem;
  margin-top: 0.75rem;
  text-align: center;
  color: #6ee7b7;
  font-weight: 700;
  letter-spacing: 2px;
}

.verification-result {
  margin-top: 1.5rem;
  animation: fadeIn 0.3s ease;
}

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

/* Login */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
}

.login-box {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(10px);
  padding: 2.5rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.login-box h1 {
  margin-bottom: 0.5rem;
  color: #f1f5f9;
  font-weight: 700;
}

.login-footer {
  margin-top: 1rem;
  text-align: center;
  color: #94a3b8;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #cbd5e1;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  font-size: 1rem;
  background: rgba(15, 23, 42, 0.5);
  color: #e2e8f0;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.1);
}

.form-group small {
  display: block;
  margin-top: 0.25rem;
  color: #94a3b8;
  font-size: 0.85rem;
}

.checkbox-group {
  margin-bottom: 1rem;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: #cbd5e1;
  padding: 0.5rem;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.checkbox-group label:hover {
  background: rgba(99, 102, 241, 0.05);
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin-right: 0.75rem;
  cursor: pointer;
}

.form-section {
  margin: 2rem 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.form-section h3 {
  margin-bottom: 1rem;
  color: #f1f5f9;
  font-weight: 700;
}

.form-actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
}

/* Video item for admin */
.video-item {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.video-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.video-item-number {
  font-weight: 700;
  color: #818cf8;
  font-size: 1.1rem;
}

.btn-remove-video {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.btn-remove-video:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-add-video {
  background: rgba(16, 185, 129, 0.1);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-add-video:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.3);
  transform: translateY(-2px);
}

/* Admin */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.admin-header h1 {
  color: #f1f5f9;
  font-weight: 700;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(129, 140, 248, 0.3);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.2);
}

.stat-card h3 {
  color: #94a3b8;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Tables */
.tasks-table,
.completions-table {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  overflow-x: auto;
  margin-bottom: 2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th,
table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

table th {
  background: rgba(99, 102, 241, 0.1);
  font-weight: 700;
  color: #a5b4fc;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

table td {
  color: #cbd5e1;
}

table tr:hover {
  background: rgba(99, 102, 241, 0.05);
}

.actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Footer */
footer {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
  color: #94a3b8;
  text-align: center;
  padding: 2rem 0;
  margin-top: 3rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 12px;
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.empty-state h2 {
  color: #cbd5e1;
  margin-bottom: 1rem;
}

/* SVG Icons */
.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.35rem;
  flex-shrink: 0;
}

.requirements-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.task-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .tasks-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .navbar .container {
    flex-direction: column;
    gap: 1rem;
  }

  .form-actions {
    flex-direction: column;
  }

  .actions {
    flex-direction: column;
  }

  .task-footer {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}

/* Loading animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading {
  animation: spin 1s linear infinite;
}

/* Smooth transitions */
* {
  transition: background 0.2s ease, border-color 0.2s ease;
}

button, a, .btn {
  transition: all 0.3s ease;
}
