/* Base Styles - Reset và các style cơ bản */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Open Sans", "Segoe UI", sans-serif;
  background-color: #000;
  color: #fff;
  overflow: hidden;
  min-height: 100vh;
}

/* CSS Variables */
:root {
  --primary-color: #ff9800;
  --secondary-color: #4caf50;
  --danger-color: #f44336;
  --text-color: #fff;
  --bg-color: #000;
  --sidebar-bg: #1a1a1a;
  --header-bg: #333;
  --modal-bg: #2a2a2a;
  --border-color: #444;
  --shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
}

p {
  line-height: 1.5;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: none;
  border-radius: var(--border-radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  outline: none;
}

.btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-primary:hover {
  background-color: #45a049;
  transform: translateY(-1px);
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background-color: #d32f2f;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Form Elements */
.form-control {
  background: #333;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 8px 12px;
  border-radius: var(--border-radius);
  font-size: 14px;
  width: 100%;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.2);
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(20px);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scaleOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.9);
  }
}

/* Utility Classes */
.fade-in {
  animation: fadeIn 0.3s ease forwards;
}

.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

.slide-in {
  animation: slideIn 0.3s ease forwards;
}

.slide-out {
  animation: slideOut 0.3s ease forwards;
}

.scale-in {
  animation: scaleIn 0.3s ease forwards;
}

.scale-out {
  animation: scaleOut 0.3s ease forwards;
}

.hidden {
  display: none !important;
}

.visible {
  display: block !important;
}

/* Responsive */
@media (max-width: 768px) {
  .btn {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .form-control {
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* Focus styles for accessibility */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
