:root {
  /* Light mode variables */
  --gradient-start: #74ebd5;
  --gradient-end: #acb6e5;
  --primary-color: #4caf50;
  --accent-color: #ff4a3c;
  --hover-color: #ff4a3c;
  --text-color: #333;
  --text-secondary: #666;
  --text-muted: #888;
  --bg-color: #f4f4f4;
  --card-bg: rgba(255, 255, 255, 0.9);
  --input-bg: #ffffff;
  --border-color: rgba(0, 0, 0, 0.1);
  --shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  --navbar-height: 70px;
  --footer-height: auto;
  --section-spacing: 2.5rem;
  
  /* Dark mode variables will be applied via body.dark-mode */
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roboto', Arial, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: var(--text-color);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

.navbar {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  padding: 0 2rem;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--navbar-height);
  transition: all 0.3s ease;
}

.navbar-brand {
  font-size: 1.75rem;
  font-weight: bold;
  color: var(--text-color);
  text-decoration: none;
  position: relative;
  padding: 0.5rem 0;
}

.navbar-brand::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  transition: width 0.3s ease;
}

.navbar-brand:hover::after {
  width: 100%;
}

.navbar-nav {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
}

.navbar-nav li {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  padding: 0.75rem 1.25rem;
  position: relative;
  border-radius: 5px;
  display: flex;
  align-items: center;
  height: calc(var(--navbar-height) - 20px);
}

.nav-link:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--hover-color);
  transform: translateY(-2px);
}

.nav-link.active {
  background-color: rgba(0, 0, 0, 0.1);
  color: var(--primary-color);
  font-weight: 600;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: calc(var(--navbar-height) + 2rem) 1rem 2rem 1rem;
  flex: 1;
}

.card {
  background-color: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 1.75rem;
  margin-bottom: 1.75rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.btn {
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 5px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

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

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background-color: #3d8b40;
}

.btn-primary:after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.btn-primary:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  20% {
    transform: scale(25, 25);
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: scale(40, 40);
  }
}

.btn-secondary {
  background-color: var(--hover-color);
  color: white;
}

.btn-secondary:hover {
  background-color: #e0392e;
}

input, textarea, select {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: 'Roboto', sans-serif;
  font-size: 1rem;
}

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

footer.site-footer {
  background-color: rgba(255, 255, 255, 0.95);
  padding: 2rem 1rem 1rem;
  box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.1);
  margin-top: auto;
  width: 100%;
  z-index: 900;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 2rem;
}

.footer-section {
  flex: 1;
  min-width: 200px;
}

.footer-section h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

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

.footer-links a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.dashboard-page footer.site-footer {
  position: relative;
  z-index: 1;
}

#notification-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 350px;
}

.notification {
  background-color: white;
  border-left: 4px solid var(--primary-color);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 15px;
  margin-bottom: 10px;
  animation: slide-in 0.3s ease-out;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.notification:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

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

.notification-title {
  font-weight: bold;
  margin-bottom: 5px;
  padding-right: 20px;
  color: var(--primary-color);
}

.notification-message {
  font-size: 0.9rem;
  color: var(--text-color);
}

.notification-close {
  position: absolute;
  top: 5px;
  right: 5px;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #999;
  transition: color 0.2s ease;
}

.notification-close:hover {
  color: #333;
}

.notification[data-type="message"] {
  border-left-color: #4caf50;
}

.notification[data-type="message"] .notification-title {
  color: #4caf50;
}

.notification[data-type="friend_request"] {
  border-left-color: #2196F3;
}

.notification[data-type="friend_request"] .notification-title {
  color: #2196F3;
}

.notification-hide {
  opacity: 0;
  transform: translateX(100%);
}

@keyframes slide-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.page-with-scrollable-content .container {
  margin-bottom: calc(var(--footer-height) + 20px);
  padding-bottom: calc(var(--footer-height) + 2rem);
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    padding: 1rem;
    height: auto;
  }
  
  .navbar-nav {
    margin-top: 1rem;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
  
  .card {
    padding: 1.25rem;
  }
  
  .container {
    padding-top: calc(var(--navbar-height) + 1rem);
  }
  
  .section {
    margin: 1.5rem 0;
  }
  
  .btn {
    padding: 0.7rem 1.2rem;
  }
  
  footer.site-footer {
    padding: 1.5rem 1rem 1rem;
  }
  
  .footer-container {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .footer-section {
    text-align: center;
  }
}

.page-header {
  text-align: center;
  margin-bottom: var(--section-spacing);
  position: relative;
  padding-bottom: 1rem;
}

.page-header h1 {
  font-size: 2.75rem;
  color: var(--text-color);
  margin-bottom: 0.75rem;
  position: relative;
  display: inline-block;
}

.page-header h1:after {
  content: '';
  position: absolute;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

.page-header p {
  font-size: 1.2rem;
  opacity: 0.8;
  max-width: 600px;
  margin: 1rem auto 0;
}

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

.section {
  margin: var(--section-spacing) 0;
  position: relative;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  width: 50%;
  height: 3px;
  background: linear-gradient(to right, var(--gradient-start), var(--gradient-end));
  bottom: -5px;
  left: 0;
}

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

.fade-in {
  animation: fadeIn 0.8s ease forwards;
  opacity: 0;
}

.alert {
  padding: 1rem;
  border-radius: 5px;
  margin-bottom: 1rem;
}

.alert-error {
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

.alert-success {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

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

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

.auth-links {
  text-align: center;
  margin-top: 1.5rem;
}

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

.auth-links a:hover {
  color: var(--hover-color);
}

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

.dashboard-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  min-height: 250px;
}

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

.game-container {
  margin-top: var(--navbar-height);
  margin-bottom: var(--footer-height);
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 2000;
  padding: 1rem;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
  top: 0;
}

/* Dark Mode Styles */
body.dark-mode {
  /* Dark mode gradient background */
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: #e0e0e0;
  
  /* Override variables for dark mode */
  --text-color: #e0e0e0;
  --text-secondary: #b0b0b0;
  --text-muted: #888;
  --bg-color: #121212;
  --card-bg: rgba(40, 40, 40, 0.9);
  --input-bg: #2c2c2c;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  --primary-color: #bb86fc;
  --accent-color: #03dac6;
  --hover-color: #03dac6;
}

/* Navbar and Footer Dark Mode */
body.dark-mode .navbar,
body.dark-mode footer.site-footer {
  background-color: rgba(30, 30, 30, 0.95);
  border-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .navbar-brand,
body.dark-mode .nav-link,
body.dark-mode footer.site-footer a,
body.dark-mode footer.site-footer p {
  color: #e0e0e0;
}

/* Card Dark Mode */
body.dark-mode .card,
body.dark-mode section.card {
  background-color: rgba(40, 40, 40, 0.9);
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

/* Form Elements Dark Mode */
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
  background-color: #2c2c2c;
  border-color: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
  color: #888;
}

/* Button Dark Mode */
body.dark-mode .btn-primary {
  background-color: #bb86fc;
  color: #121212;
}

body.dark-mode .btn-primary:hover {
  background-color: #9979d5;
}

body.dark-mode .btn-secondary {
  background-color: #03dac6;
  color: #121212;
}

body.dark-mode .btn-secondary:hover {
  background-color: #00b5a3;
}

/* Links Dark Mode */
body.dark-mode a {
  color: #bb86fc;
}

body.dark-mode a:hover {
  color: #9979d5;
}

/* Borders and Dividers Dark Mode */
body.dark-mode hr,
body.dark-mode .divider {
  border-color: rgba(255, 255, 255, 0.1);
}



