/* styles/base.css */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

.bg {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

.header {
  text-align: center;
  padding: 40px 0 40px;
  color: white;
}

.title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 24px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.coins {
  margin-top: 20px;
}

.pill {
  background: rgba(255,255,255,0.2);
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  padding: 40px 0;
}

.card {
  background: rgba(255,255,255,0.95);
  padding: 32px;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.15);
  background: rgba(255,255,255,1);
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: #2d3748;
}

.card p {
  color: #4a5568;
  margin-bottom: 16px;
  line-height: 1.6;
}

.tag {
  display: inline-block;
  background: #667eea;
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag.beginner {
  background: #48bb78;
}

.tag.intermediate {
  background: #ed8936;
}

.tag.advanced {
  background: #e53e3e;
}

.tag.assigned {
  background: #9f7aea;
}

/* Custom game styles */
.custom-game {
  border: 2px solid #667eea;
}

.custom-game:hover {
  border-color: #5a67d8;
}

/* Difficulty sections */
section {
  margin-bottom: 60px;
}

section h2 {
  font-size: 2rem;
  color: white;
  margin-bottom: 24px;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Clearfix for sections */
section::after {
  content: "";
  display: table;
  clear: both;
}

/* Responsive design */
@media (max-width: 768px) {
  .title {
    font-size: 2.5rem;
  }
  
  .subtitle {
    font-size: 1.1rem;
  }
  
  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .card {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  
  .title {
    font-size: 2rem;
  }
  
  .card {
    padding: 20px;
  }
}

/* Button styles */
.btn {
  display: inline-block;
  background: #667eea;
  color: white;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

.btn:hover {
  background: #5a67d8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: rgba(255,255,255,0.2);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 14px;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.3);
  border-color: rgba(255,255,255,0.5);
}

#auth-buttons {
  margin-top: 10px;
}

#auth-buttons .btn {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
}

#auth-buttons .btn:hover {
  background: rgba(255,255,255,0.3);
  border-color: rgba(255,255,255,0.5);
}

/* Top Navigation Bar */
.top-nav {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.nav-left {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav-right {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

/* Responsive design for mobile */
@media (max-width: 768px) {
  .top-nav .container {
    flex-direction: column;
    gap: 12px;
  }
  
  .nav-left, .nav-right {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .nav-btn {
    font-size: 0.9rem;
    padding: 6px 12px;
  }
  
  .header {
    padding: 20px 0 40px;
  }
}

@media (max-width: 480px) {
  .nav-left, .nav-right {
    flex-direction: column;
    gap: 8px;
  }
  
  .nav-btn {
    font-size: 0.8rem;
    padding: 6px 10px;
  }
}