/**
 * Estilos para a plataforma de aprendizado gamificado com tema de programação
 * 
 * Este arquivo contém os estilos CSS para toda a plataforma, com um tema
 * visual focado em programação, circuitos e tecnologia.
 */

:root {
  /* Cores principais */
  --primary-color: #00c3a9;
  --secondary-color: #6c5ce7;
  --accent-color: #fdcb6e;
  --danger-color: #e17055;
  --success-color: #00b894;
  
  /* Cores de fundo */
  --bg-dark: #0f172a;
  --bg-medium: #1e293b;
  --bg-light: #334155;
  
  /* Cores de texto */
  --text-light: #f8fafc;
  --text-medium: #cbd5e1;
  --text-dark: #64748b;
  
  /* Cores de código */
  --code-bg: #1a2234;
  --code-text: #a3e635;
  --code-comment: #64748b;
  --code-keyword: #38bdf8;
  --code-string: #fbbf24;
  --code-function: #f472b6;
  
  /* Fontes */
  --font-code: 'Fira Code', 'Courier New', monospace;
  --font-main: 'Inter', 'Segoe UI', sans-serif;
  --font-heading: 'JetBrains Mono', 'Inter', sans-serif;
  
  /* Tamanhos */
  --header-height: 60px;
  --sidebar-width: 250px;
  --border-radius: 8px;
  --phase-size: 80px;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-light);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--secondary-color);
}

button, .btn {
  cursor: pointer;
  font-family: var(--font-main);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  border: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--bg-dark);
}

.btn-primary:hover {
  background-color: var(--primary-color);
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 195, 169, 0.3);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--text-light);
}

.btn-secondary:hover {
  background-color: var(--secondary-color);
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
}

.btn-danger {
  background-color: var(--danger-color);
  color: var(--text-light);
}

.btn-danger:hover {
  background-color: var(--danger-color);
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(225, 112, 85, 0.3);
}

.btn-success {
  background-color: var(--success-color);
  color: var(--text-light);
}

.btn-success:hover {
  background-color: var(--success-color);
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

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

input, textarea, select {
  font-family: var(--font-main);
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--bg-light);
  background-color: var(--bg-medium);
  color: var(--text-light);
  width: 100%;
  transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(0, 195, 169, 0.2);
}

code {
  font-family: var(--font-code);
  background-color: var(--code-bg);
  color: var(--code-text);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
}

pre {
  font-family: var(--font-code);
  background-color: var(--code-bg);
  color: var(--code-text);
  padding: 1rem;
  border-radius: var(--border-radius);
  overflow-x: auto;
  margin: 1rem 0;
  border-left: 4px solid var(--primary-color);
}

pre code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
}

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

.section {
  padding: 2rem 0;
}

.card {
  background-color: var(--bg-medium);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Header */
.header {
  height: var(--header-height);
  background-color: var(--bg-medium);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color);
}

.logo i {
  font-size: 1.8rem;
}

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

.nav-link {
  color: var(--text-medium);
  font-weight: 600;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color);
}

.user-menu {
  position: relative;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--primary-color);
  transition: transform 0.3s ease;
}

.user-avatar:hover {
  transform: scale(1.1);
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--bg-medium);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  display: none;
  z-index: 101;
}

.user-menu:hover .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  color: var(--text-medium);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.dropdown-item:hover {
  background-color: var(--bg-light);
  color: var(--text-light);
}

.dropdown-divider {
  height: 1px;
  background-color: var(--bg-light);
  margin: 0.5rem 0;
}

.mobile-menu-button {
  display: none;
  font-size: 1.5rem;
  color: var(--text-medium);
  cursor: pointer;
}

/* Main Content */
.main-content {
  padding-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 600px;
  z-index: 1;
}

.hero-title {
  font-size: 3rem;
  margin-bottom: 1rem;
  line-height: 1.2;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-medium);
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.hero-image {
  max-width: 500px;
  z-index: 1;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Particles */
#particles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.3;
  animation: float 15s infinite ease-in-out;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(0);
  }
  25% {
    transform: translateY(-50px) translateX(50px);
  }
  50% {
    transform: translateY(20px) translateX(-30px);
  }
  75% {
    transform: translateY(40px) translateX(25px);
  }
}

/* Features Section */
.features {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  margin: 1rem auto 0;
  border-radius: 2px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background-color: var(--bg-medium);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.feature-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.feature-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.feature-description {
  color: var(--text-medium);
}

/* Categories Section */
.categories {
  padding: 4rem 0;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.category-card {
  background-color: var(--bg-medium);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.2), transparent);
  z-index: 0;
}

.category-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  z-index: 1;
}

.category-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  z-index: 1;
}

.category-count {
  color: var(--text-medium);
  font-size: 0.9rem;
  z-index: 1;
}

.category-progress {
  width: 80%;
  height: 6px;
  background-color: var(--bg-light);
  border-radius: 3px;
  margin-top: 1rem;
  overflow: hidden;
  z-index: 1;
}

.category-progress-bar {
  height: 100%;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* Map Page */
.map-container {
  padding: 2rem 0;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--bg-light);
  padding-bottom: 1rem;
}

.category-tab {
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.category-tab:hover {
  background-color: var(--bg-light);
}

.category-tab.active {
  background-color: var(--primary-color);
  color: var(--bg-dark);
}

.phases-container {
  position: relative;
  min-height: 600px;
  padding: 2rem 0;
}

/* Circular Phase Design */
.phases-map {
  position: relative;
  width: 100%;
  height: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.phases-spiral {
  position: relative;
  width: 100%;
  height: 100%;
}

.phase {
  position: absolute;
  width: var(--phase-size);
  height: var(--phase-size);
  border-radius: 50%;
  background-color: var(--bg-medium);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 2px solid var(--bg-light);
}

.phase::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 90%;
  height: 90%;
  border-radius: 50%;
  background-color: var(--bg-medium);
  transform: translate(-50%, -50%);
  z-index: -1;
  border: 1px dashed var(--bg-light);
}

.phase:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border-color: var(--primary-color);
}

.phase.completed {
  background-color: var(--success-color);
  border-color: var(--success-color);
}

.phase.current {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.phase.locked {
  background-color: var(--bg-light);
  cursor: not-allowed;
  opacity: 0.7;
}

.phase-number {
  font-family: var(--font-code);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.phase-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.phase-stars {
  display: flex;
  gap: 2px;
}

.phase-stars i {
  font-size: 0.8rem;
  color: var(--accent-color);
}

.phase-connector {
  position: absolute;
  background-color: var(--bg-light);
  z-index: 0;
  transform-origin: 0 0;
}

.phase-connector.completed {
  background-color: var(--success-color);
}

/* Phase Details Modal */
.phase-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.phase-modal-content {
  background-color: var(--bg-medium);
  border-radius: var(--border-radius);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.phase-modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.phase-modal-title {
  display: flex;
  flex-direction: column;
}

.phase-language {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-medium);
  margin-bottom: 0.5rem;
}

.phase-modal-close {
  background: none;
  border: none;
  color: var(--text-medium);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 0.5rem;
}

.phase-modal-close:hover {
  color: var(--danger-color);
}

.phase-modal-body {
  padding: 1.5rem;
}

.phase-info {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.phase-info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-medium);
}

.phase-content-container {
  background-color: var(--bg-dark);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.phase-completed-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--success-color);
  color: var(--bg-dark);
  padding: 1rem;
  border-radius: var(--border-radius);
  font-weight: 600;
}

.phase-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Task Options */
.task-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background-color: var(--bg-medium);
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.task-option:hover {
  background-color: var(--bg-light);
}

.task-option.correct {
  background-color: rgba(0, 184, 148, 0.2);
  border: 1px solid var(--success-color);
}

.task-option-letter {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-code);
}

.task-option-text {
  flex: 1;
}

.task-option-correct {
  color: var(--success-color);
  font-size: 1.2rem;
}

/* Task Completion Dialog */
.task-completion-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}

.task-completion-content {
  background-color: var(--bg-medium);
  border-radius: var(--border-radius);
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  text-align: center;
}

.task-completion-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
}

.task-completion-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
}

.task-completion-loading i {
  font-size: 3rem;
  color: var(--primary-color);
}

.task-completion-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
}

.task-completion-success i {
  font-size: 3rem;
  color: var(--success-color);
}

.task-completion-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
}

.task-completion-error i {
  font-size: 3rem;
  color: var(--danger-color);
}

/* Tasks Page */
.tasks-container {
  padding: 2rem 0;
}

.difficulty-section {
  margin-bottom: 3rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.difficulty-title {
  margin-bottom: 0;
}

.difficulty-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.difficulty-badge.iniciante {
  background-color: var(--success-color);
  color: var(--bg-dark);
}

.difficulty-badge.intermediário {
  background-color: var(--accent-color);
  color: var(--bg-dark);
}

.difficulty-badge.avançado {
  background-color: var(--secondary-color);
  color: var(--text-light);
}

.difficulty-badge.especialista {
  background-color: var(--danger-color);
  color: var(--text-light);
}

.tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.task-card {
  background-color: var(--bg-medium);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.task-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--primary-color);
}

.task-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.task-card.completed::before {
  background-color: var(--success-color);
}

.task-card.locked {
  opacity: 0.7;
  cursor: not-allowed;
}

.task-card.locked::before {
  background-color: var(--text-dark);
}

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

.task-language {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.task-number {
  font-family: var(--font-code);
  font-weight: 700;
  color: var(--text-medium);
}

.task-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 1.5rem;
}

.task-icon {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.task-name {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.task-type {
  font-size: 0.9rem;
  color: var(--text-medium);
}

.task-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.task-xp {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-color);
  font-weight: 600;
}

.task-stars {
  display: flex;
  gap: 2px;
}

.task-stars i {
  color: var(--text-dark);
}

.task-stars i.filled {
  color: var(--accent-color);
}

.task-lock {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--text-medium);
}

.empty-tasks {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background-color: var(--bg-medium);
  border-radius: var(--border-radius);
  text-align: center;
}

.empty-tasks i {
  font-size: 4rem;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

/* Profile Page */
.profile-container {
  padding: 2rem 0;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 3rem;
  padding: 2rem;
  background-color: var(--bg-medium);
  border-radius: var(--border-radius);
  position: relative;
  overflow: hidden;
}

.profile-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.2), transparent);
  z-index: 0;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--primary-color);
  position: relative;
  z-index: 1;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info {
  flex: 1;
  z-index: 1;
}

.profile-name {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.profile-bio {
  color: var(--text-medium);
  margin-bottom: 1.5rem;
}

.profile-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.profile-stat-label {
  font-size: 0.9rem;
  color: var(--text-medium);
}

.profile-actions {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1;
}

.profile-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
}

.profile-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.profile-level-card {
  background-color: var(--bg-medium);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-align: center;
}

.profile-level {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.profile-xp {
  color: var(--text-medium);
  margin-bottom: 1rem;
}

.profile-progress {
  width: 100%;
  height: 8px;
  background-color: var(--bg-light);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.profile-progress-bar {
  height: 100%;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  border-radius: 4px;
}

.profile-next-level {
  font-size: 0.9rem;
  color: var(--text-medium);
}

.profile-friends-card {
  background-color: var(--bg-medium);
  border-radius: var(--border-radius);
  padding: 1.5rem;
}

.profile-friends-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.profile-friends-title {
  margin-bottom: 0;
}

.profile-friends-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-friend {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: var(--border-radius);
  transition: background-color 0.3s ease;
}

.profile-friend:hover {
  background-color: var(--bg-light);
}

.profile-friend-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
}

.profile-friend-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-friend-info {
  flex: 1;
}

.profile-friend-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.profile-friend-level {
  font-size: 0.8rem;
  color: var(--text-medium);
}

.profile-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.profile-section {
  background-color: var(--bg-medium);
  border-radius: var(--border-radius);
  padding: 1.5rem;
}

.profile-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.profile-section-title {
  margin-bottom: 0;
}

.profile-achievements {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.achievement-card {
  background-color: var(--bg-light);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s ease;
}

.achievement-card:hover {
  transform: translateY(-5px);
}

.achievement-card.locked {
  opacity: 0.5;
}

.achievement-icon {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.achievement-name {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.achievement-description {
  font-size: 0.9rem;
  color: var(--text-medium);
}

.profile-recent-activity {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background-color: var(--bg-light);
  border-radius: var(--border-radius);
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.activity-icon.completed {
  color: var(--success-color);
}

.activity-icon.level-up {
  color: var(--primary-color);
}

.activity-icon.achievement {
  color: var(--accent-color);
}

.activity-content {
  flex: 1;
}

.activity-text {
  margin-bottom: 0.25rem;
}

.activity-time {
  font-size: 0.8rem;
  color: var(--text-medium);
}

/* Ranking Page */
.ranking-container {
  padding: 2rem 0;
}

.ranking-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--bg-light);
  padding-bottom: 1rem;
}

.ranking-tab {
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

.ranking-tab:hover {
  background-color: var(--bg-light);
}

.ranking-tab.active {
  background-color: var(--primary-color);
  color: var(--bg-dark);
}

.ranking-list {
  background-color: var(--bg-medium);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.ranking-header {
  display: grid;
  grid-template-columns: 80px 1fr 100px 100px;
  padding: 1rem 1.5rem;
  background-color: var(--bg-light);
  font-weight: 600;
}

.ranking-item {
  display: grid;
  grid-template-columns: 80px 1fr 100px 100px;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--bg-light);
  transition: background-color 0.3s ease;
  align-items: center;
}

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

.ranking-item:hover {
  background-color: var(--bg-light);
}

.ranking-item.current-user {
  background-color: rgba(0, 195, 169, 0.1);
}

.ranking-position {
  font-weight: 700;
  font-family: var(--font-code);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--bg-light);
}

.ranking-position.top-1 {
  background-color: gold;
  color: var(--bg-dark);
}

.ranking-position.top-2 {
  background-color: silver;
  color: var(--bg-dark);
}

.ranking-position.top-3 {
  background-color: #cd7f32; /* Bronze */
  color: var(--bg-dark);
}

.ranking-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ranking-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
}

.ranking-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-name {
  font-weight: 600;
}

.ranking-level {
  font-weight: 600;
  color: var(--primary-color);
}

.ranking-xp {
  font-weight: 600;
  color: var(--accent-color);
}

.ranking-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.pagination-item {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

.pagination-item:hover {
  background-color: var(--bg-light);
}

.pagination-item.active {
  background-color: var(--primary-color);
  color: var(--bg-dark);
}

/* Authentication Pages */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
}

.auth-card {
  background-color: var(--bg-medium);
  border-radius: var(--border-radius);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  color: var(--text-medium);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-weight: 600;
}

.form-footer {
  text-align: center;
  margin-top: 2rem;
  color: var(--text-medium);
}

.form-footer a {
  color: var(--primary-color);
  font-weight: 600;
}

/* Notifications */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius);
  background-color: var(--bg-medium);
  color: var(--text-light);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: opacity 0.3s ease;
}

.notification.success {
  background-color: var(--success-color);
  color: var(--bg-dark);
}

.notification.error {
  background-color: var(--danger-color);
}

.notification.info {
  background-color: var(--primary-color);
  color: var(--bg-dark);
}

/* Level Up Animation */
.level-up-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity 0.3s ease;
}

.level-up-content {
  background-color: var(--bg-medium);
  border-radius: var(--border-radius);
  padding: 3rem;
  text-align: center;
  max-width: 500px;
  width: 100%;
  animation: scale-in 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes scale-in {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.level-up-icon {
  font-size: 4rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  animation: bounce 1s infinite alternate;
}

@keyframes bounce {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-10px);
  }
}

.level-up-text {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.level-up-level {
  font-size: 5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-family: var(--font-code);
  text-shadow: 0 0 10px rgba(0, 195, 169, 0.5);
}

.level-up-message {
  color: var(--text-medium);
  margin-bottom: 2rem;
}

/* Confetti */
.confetti {
  position: absolute;
  animation: confetti-fall 3s linear forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* Circuit Board Background */
.circuit-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-dark);
  background-image: 
    linear-gradient(rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.9)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%2300c3a9' fill-opacity='0.1'%3E%3Cpath opacity='.5' d='M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9zm-1 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9z'/%3E%3Cpath d='M6 5V0H5v5H0v1h5v94h1V6h94V5H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: -1;
  opacity: 0.8;
}

/* Code Animation */
.code-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  opacity: 0.05;
}

.code-line {
  position: absolute;
  font-family: var(--font-code);
  color: var(--primary-color);
  font-size: 1rem;
  white-space: nowrap;
  animation: code-fall linear infinite;
}

@keyframes code-fall {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100vh);
  }
}

/* Responsive Styles */
@media (max-width: 768px) {
  .header {
    padding: 0 1rem;
  }
  
  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--bg-medium);
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 99;
  }
  
  .nav-links.show {
    transform: translateY(0);
  }
  
  .mobile-menu-button {
    display: block;
  }
  
  .hero {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
  
  .hero-content {
    max-width: 100%;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-image {
    max-width: 100%;
  }
  
  .profile-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .profile-content {
    grid-template-columns: 1fr;
  }
  
  .ranking-header, .ranking-item {
    grid-template-columns: 60px 1fr 80px;
  }
  
  .ranking-xp {
    display: none;
  }
}

/* Dark Mode Toggle */
.dark-mode-toggle {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--bg-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.dark-mode-toggle:hover {
  transform: scale(1.1);
}

.dark-mode-toggle i {
  font-size: 1.5rem;
  color: var(--text-medium);
}

/* Test Results */
.test-results {
  background-color: var(--bg-medium);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.test-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.test-stat {
  padding: 0.5rem 1rem;
  background-color: var(--bg-light);
  border-radius: var(--border-radius);
}

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

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

/* Microchip Design Elements */
.microchip-element {
  position: absolute;
  background-color: var(--bg-light);
  border-radius: 2px;
}

.microchip-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--primary-color);
}

.microchip-connector {
  position: absolute;
  height: 2px;
  background-color: var(--primary-color);
  transform-origin: 0 0;
}

/* Programming Language Colors */
.lang-javascript {
  color: #f7df1e !important;
}

.lang-python {
  color: #3776ab !important;
}

.lang-html {
  color: #e34c26 !important;
}

.lang-css {
  color: #264de4 !important;
}

.lang-java {
  color: #007396 !important;
}

.lang-cpp {
  color: #00599c !important;
}

.lang-ruby {
  color: #cc342d !important;
}

.lang-php {
  color: #777bb4 !important;
}

.lang-swift {
  color: #ffac45 !important;
}

.lang-kotlin {
  color: #7f52ff !important;
}

.lang-csharp {
  color: #239120 !important;
}

.lang-go {
  color: #00add8 !important;
}

/* Code Syntax Highlighting */
.code-keyword {
  color: var(--code-keyword);
}

.code-string {
  color: var(--code-string);
}

.code-comment {
  color: var(--code-comment);
}

.code-function {
  color: var(--code-function);
}

/* Animations */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes glow {
  0% {
    box-shadow: 0 0 5px rgba(0, 195, 169, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 195, 169, 0.8);
  }
  100% {
    box-shadow: 0 0 5px rgba(0, 195, 169, 0.5);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

.glow {
  animation: glow 2s infinite;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

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

.text-left {
  text-align: left;
}

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mt-4 {
  margin-top: 2rem;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.ml-1 {
  margin-left: 0.5rem;
}

.ml-2 {
  margin-left: 1rem;
}

.mr-1 {
  margin-right: 0.5rem;
}

.mr-2 {
  margin-right: 1rem;
}

.p-1 {
  padding: 0.5rem;
}

.p-2 {
  padding: 1rem;
}

.p-3 {
  padding: 1.5rem;
}

.p-4 {
  padding: 2rem;
}

.d-flex {
  display: flex;
}

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

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

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

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

.gap-1 {
  gap: 0.5rem;
}

.gap-2 {
  gap: 1rem;
}

.gap-3 {
  gap: 1.5rem;
}

.w-100 {
  width: 100%;
}

.h-100 {
  height: 100%;
}

.rounded {
  border-radius: var(--border-radius);
}

.bg-dark {
  background-color: var(--bg-dark);
}

.bg-medium {
  background-color: var(--bg-medium);
}

.bg-light {
  background-color: var(--bg-light);
}

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

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

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

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

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

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

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

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

.font-code {
  font-family: var(--font-code);
}

.font-heading {
  font-family: var(--font-heading);
}

.font-bold {
  font-weight: 700;
}

.font-medium {
  font-weight: 600;
}

.font-normal {
  font-weight: 400;
}

.font-sm {
  font-size: 0.9rem;
}

.font-md {
  font-size: 1rem;
}

.font-lg {
  font-size: 1.2rem;
}

.font-xl {
  font-size: 1.5rem;
}

.font-2xl {
  font-size: 2rem;
}

.font-3xl {
  font-size: 3rem;
}

.shadow {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.shadow-lg {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.transition {
  transition: all 0.3s ease;
}

.cursor-pointer {
  cursor: pointer;
}

.overflow-hidden {
  overflow: hidden;
}

.position-relative {
  position: relative;
}

.position-absolute {
  position: absolute;
}

.z-1 {
  z-index: 1;
}

.z-10 {
  z-index: 10;
}

.z-100 {
  z-index: 100;
}

.opacity-50 {
  opacity: 0.5;
}

.opacity-75 {
  opacity: 0.75;
}

.hidden {
  display: none;
}

.visible {
  display: block;
}

.flex {
  display: flex;
}

.grid {
  display: grid;
}
