/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #1db954;
  --primary-dark: #1aa34a;
  --secondary-color: #191414;
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-light: #f8f9fa;
  --bg-card: #ffffff;
  --border-color: #e1e1e1;
  --success: #28a745;
  --warning: #ffc107;
  --error: #dc3545;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* Navigation */
.navbar {
  background-color: var(--secondary-color);
  padding: 1rem 0;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar .logo {
  color: var(--text-light);
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--primary-color);
}

/* Main Content */
main {
  flex: 1;
  padding: 2rem 0;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 0;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  color: var(--text-light);
  border-radius: 12px;
  margin-bottom: 3rem;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero .subtitle {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.cta-section {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 25px;
  transition: all 0.3s;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--primary-color);
  border-radius: 10px;
  padding: 5px 10px;
  color: var(--text-light);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--text-light);
}

.btn-secondary:hover {
  background-color: #2c2c2c;
}

.btn-success {
  background-color: var(--success);
  color: var(--text-light);
}

.btn-warning {
  background-color: var(--warning);
  color: var(--text-dark);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Features Section */
.features {
  margin: 3rem 0;
}

.features h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.feature-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* Requirements Section */
.requirements {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin: 2rem 0;
}

.requirements h2 {
  margin-bottom: 1rem;
}

.requirements ul {
  list-style: none;
  padding-left: 0;
}

.requirements li {
  padding: 0.5rem 0;
  font-size: 1.1rem;
}

/* Dashboard */
.dashboard h1 {
  margin-bottom: 2rem;
}

.actions {
  margin: 2rem 0;
  text-align: center;
}

.games-section {
  margin: 3rem 0;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.game-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.game-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.game-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.game-info {
  margin: 1rem 0;
}

.game-info p {
  margin: 0.5rem 0;
}

.game-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.status-ready {
  background-color: #e3f2fd;
  color: #1976d2;
}

.status-playing {
  background-color: #e8f5e9;
  color: var(--success);
}

.status-paused {
  background-color: #fff3e0;
  color: #f57c00;
}

.status-finished {
  background-color: #fce4ec;
  color: #c2185b;
}

.empty-state {
  text-align: center;
  padding: 3rem;
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

/* Forms */
.game-form {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-width: 600px;
  margin: 2rem auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-group small {
  display: block;
  margin-top: 0.25rem;
  color: #666;
  font-size: 0.85rem;
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Host Game */
.host-game h1 {
  margin-bottom: 0.5rem;
}

.game-id {
  color: #666;
  margin-bottom: 2rem;
}

.game-controls {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.playback-info {
  text-align: center;
  margin-bottom: 2rem;
}

.playback-info h2 {
  margin-bottom: 1rem;
}

.track-number {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
}

.track-details {
  font-size: 1.5rem;
  margin: 1rem 0;
  min-height: 2rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin: 1rem 0;
}

.progress {
  height: 100%;
  background-color: var(--primary-color);
  transition: width 0.3s;
}

.control-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.game-status {
  text-align: center;
  margin-top: 1rem;
}

.game-info-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.info-card {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.info-card h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.info-card ul {
  list-style: none;
}

.info-card li {
  padding: 0.25rem 0;
}

.instructions {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin: 2rem 0;
}

.instructions h3 {
  margin-bottom: 1rem;
}

.instructions code {
  background-color: var(--bg-light);
  padding: 0.5rem;
  border-radius: 4px;
  display: block;
  margin: 0.5rem 0;
  overflow-x: auto;
  font-size: 0.9rem;
}

/* Cards Display */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.card-item {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-align: center;
}

.card-preview img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
}

.card-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

.view-card {
  max-width: 800px;
  margin: 0 auto;
}

.card-display {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin: 2rem 0;
  text-align: center;
}

.full-card {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Error Page */
.error-page {
  text-align: center;
  padding: 4rem 2rem;
}

.error-icon {
  font-size: 5rem;
  margin-bottom: 1rem;
}

.error-message {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin: 2rem auto;
  max-width: 600px;
}

/* Help Section */
.help-section {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin: 2rem 0;
}

.help-section h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* Footer */
.footer {
  background-color: var(--secondary-color);
  color: var(--text-light);
  padding: 2rem 0;
  margin-top: auto;
  text-align: center;
}

.footer a {
  color: var(--primary-color);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero .subtitle {
    font-size: 1rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .control-buttons {
    flex-direction: column;
  }

  .btn-large {
    width: 100%;
  }

  .game-info-section {
    grid-template-columns: 1fr;
  }

  .nav-links {
    flex-direction: column;
    gap: 0.5rem;
  }
}
