/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #00CED1;
  --accent: #FFD700;
  --black: #000000;
  --card: #0a0a0a;
  --input-background: #111111;
  --input-border: #1a1a1a;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--black);
  color: white;
  line-height: 1.6;
  overflow-x: hidden;
}

h1 {
  font-size: 3.75rem;
  font-weight: 700;
  line-height: 1.2;
}

h2 {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.3;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
}

p {
  font-size: 1rem;
  line-height: 1.6;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 206, 209, 0.2);
  transition: transform 0.3s ease;
}

.nav.hidden {
  transform: translateY(-100%);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.nav-logo {
  display: flex;
  align-items: center;
/*  gap: 0.5rem;*/
  text-decoration: none;
  color: white;
  font-size: 1.25rem;
  font-weight: 600;
}

.nav-logo .primary-text {
  color: var(--primary);
}

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

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  color: var(--gray-400);
  transition: all 0.2s;
}

.nav-link:hover {
  color: var(--primary);
  background-color: rgba(0, 206, 209, 0.1);
}

.nav-link.active {
  color: var(--primary);
  background-color: rgba(0, 206, 209, 0.2);
}

.nav-link.btn-login {
  margin-left: 1rem;
  padding: 0.5rem 1.5rem;
  background-color: var(--primary);
  color: var(--black);
}

.nav-link.btn-login:hover {
  background-color: rgba(0, 206, 209, 0.9);
}

/* Background Effects */
.bg-effects {
  position: absolute;
  inset: 0;
  opacity: 0.1;
}

.bg-gradient {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(0, 206, 209, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0, 206, 209, 0.3) 0%, transparent 50%);
}

.bg-dots {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background-image: radial-gradient(circle, rgba(0, 206, 209, 0.5) 1px, transparent 1px);
  background-size: 30px 30px;
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.container-sm {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Page Wrapper */
.page {
  min-height: 100vh;
  background-color: var(--black);
  padding-top: 4rem;
  position: relative;
  overflow: hidden;
}

/* Grid */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Card */
.card {
  background-color: var(--card);
  border: 1px solid rgba(0, 206, 209, 0.2);
  border-radius: 0.5rem;
  padding: 2rem;
  transition: all 0.3s;
}

.card:hover {
  border-color: rgba(0, 206, 209, 0.5);
  box-shadow: 0 0 20px rgba(0, 206, 209, 0.2);
}

.card-sm {
  padding: 1.5rem;
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--black);
  box-shadow: 0 0 20px rgba(0, 206, 209, 0.3);
}

.btn-primary:hover {
  background-color: rgba(0, 206, 209, 0.9);
  box-shadow: 0 0 30px rgba(0, 206, 209, 0.5);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

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

/* Text Utilities */
.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary);
}

.text-accent {
  color: var(--accent);
}

.text-gray {
  color: var(--gray-400);
}

.text-sm {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
}

/* Spacing */
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mt-20 { margin-top: 5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }

/* Icons */
.icon {
  width: 1.5rem;
  height: 1.5rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-lg {
  width: 3rem;
  height: 3rem;
}

.icon-sm {
  width: 1rem;
  height: 1rem;
}

/* Footer */
.footer {
  position: relative;
  border-top: 1px solid rgba(0, 206, 209, 0.2);
  margin-top: 5rem;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
  }
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.footer-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.2s;
}

.footer-link.bordered {
  border: 1px solid rgba(0, 206, 209, 0.3);
  color: var(--primary);
}

.footer-link.bordered:hover {
  background-color: rgba(0, 206, 209, 0.1);
}

.footer-link.highlighted {
  background-color: rgba(0, 206, 209, 0.2);
  color: var(--primary);
  box-shadow: 0 0 10px rgba(0, 206, 209, 0.2);
}

.footer-link.highlighted:hover {
  background-color: rgba(0, 206, 209, 0.3);
}

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

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--gray-300);
}

.form-input {
  width: 100%;
  background-color: var(--input-background);
  border: 1px solid var(--input-border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  color: white;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
}

.form-input::placeholder {
  color: var(--gray-500);
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(0, 206, 209, 0.5);
}

/* Login Page Specific */
.login-page {
  padding-top: 8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 2rem;
}

.login-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 28rem;
  padding: 0 1rem;
}

.login-card {
  background-color: var(--card);
  border: 1px solid rgba(0, 206, 209, 0.3);
  border-radius: 0.5rem;
  padding: 2rem;
  box-shadow: 0 0 30px rgba(0, 206, 209, 0.2);
}

.login-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.icon-box {
  padding: 0.75rem;
  background-color: rgba(0, 206, 209, 0.1);
  border: 1px solid rgba(0, 206, 209, 0.3);
  border-radius: 0.5rem;
}
.icon-box.icon-task-quest {
    width: 64px;
    height: 64px;
    text-align: center;
    vertical-align: middle;
    padding: 18px;
}

.warning-box {
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: rgba(0, 206, 209, 0.05);
  border: 1px solid rgba(0, 206, 209, 0.3);
  border-radius: 0.5rem;
  text-align: center;
  color: var(--primary);
  font-size: 0.875rem;
}

.error-box {
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 0.5rem;
  text-align: left;
  color: #ef4444;
  font-size: 0.875rem;
}
.error-box svg{
	position: fixed;
}
.error-box .message{
	padding-left: 28px;
}

.divider {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 206, 209, 0.2);
  text-align: center;
}

.link-button {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s;
}

.link-button:hover {
  color: rgba(0, 206, 209, 0.8);
}

/* Spinner */
.spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(0, 0, 0, 0.3);
  border-top-color: var(--black);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Leaderboard */
.podium-card {
  border: 1px solid;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
}

.table-container {
  overflow-x: auto;
}

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

thead {
  background-color: rgba(0, 206, 209, 0.05);
}

th {
  padding: 1rem 1.5rem;
  text-align: left;
  color: var(--gray-400);
  font-weight: 500;
}

th.text-right {
  text-align: right;
}

th.text-center {
  text-align: center;
}

td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(0, 206, 209, 0.1);
}

td.text-right {
  text-align: right;
}

td.text-center {
  text-align: center;
}

tr:hover {
  background-color: rgba(0, 206, 209, 0.05);
}

/* Quest Cards */
.quest-card {
  position: relative;
  cursor: pointer;
}

.quest-card.completed {
  opacity: 0.75;
}

.quest-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.quest-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  border: 1px solid;
}

.badge-completed {
  background-color: rgba(0, 206, 209, 0.2);
  border-color: rgba(0, 206, 209, 0.3);
  color: var(--primary);
}

.badge-easiest, .badge-easy {
  background-color: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

.badge-medium {
  background-color: rgba(234, 179, 8, 0.1);
  border-color: rgba(234, 179, 8, 0.3);
  color: #eab308;
}

.badge-hard {
  background-color: rgba(249, 115, 22, 0.1);
  border-color: rgba(249, 115, 22, 0.3);
  color: #f97316;
}

.badge-expert {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.quest-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 206, 209, 0.1);
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-tab {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid;
  background: none;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--gray-400);
  background-color: rgba(10, 10, 10, 0.5);
  border-color: rgba(0, 206, 209, 0.1);
}

.filter-tab:hover {
  background-color: rgba(0, 206, 209, 0.1);
  color: var(--primary);
}

.filter-tab.active {
  background-color: rgba(0, 206, 209, 0.2);
  border-color: rgba(0, 206, 209, 0.3);
  color: var(--primary);
}

/* Stat Cards */
.stat-card {
  padding: 1rem;
  background-color: rgba(10, 10, 10, 0.5);
  border: 1px solid rgba(0, 206, 209, 0.1);
  border-radius: 0.5rem;
  text-align: center;
}

.stat-value {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.stat-label {
  color: var(--gray-400);
  font-size: 0.875rem;
}

/* About Page - Steps */
.step-container {
  display: flex;
  gap: 1rem;
  align-items: start;
  padding: 1.5rem;
  background-color: rgba(10, 10, 10, 0.5);
  border: 1px solid rgba(0, 206, 209, 0.1);
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

.step-number {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  background-color: rgba(0, 206, 209, 0.1);
  border: 1px solid rgba(0, 206, 209, 0.3);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.step-content h3 {
  margin-bottom: 0.5rem;
}

/* Tag Pills */
.tag-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.tag-pill {
  padding: 0.5rem 1rem;
  background-color: rgba(0, 206, 209, 0.1);
  border: 1px solid rgba(0, 206, 209, 0.3);
  border-radius: 0.5rem;
  color: var(--primary);
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.875rem;
  }

  .nav-links {
    display: none;
  }
}

/* Utility Classes */
.relative {
  position: relative;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

.max-w-2xl {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.max-w-3xl {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.hidden {
  display: none;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
