@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --dark-bg: #0f0f23;
  --card-bg: rgba(255, 255, 255, 0.05);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --border-color: rgba(255, 255, 255, 0.1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--dark-bg);
  min-height: 100vh;
  color: var(--text-primary);
}

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

.domino-header {
  text-align: center;
  color: white;
  margin-bottom: 40px;
  position: relative;
}

.back-button {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 10;
  color: var(--text-primary);
  text-decoration: none;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  transition: all 0.3s ease;
  font-weight: 500;
  border: 1px solid var(--border-color);
}

.back-button:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(-5px);
}

.game-icon {
  font-size: 64px;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.domino-header h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 10px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 18px;
  opacity: 0.9;
  color: var(--text-secondary);
}

.domino-main {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
}

.mode-selection h2 {
  text-align: center;
  font-size: 28px;
  margin-bottom: 30px;
  color: var(--text-primary);
}

.mode-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.game-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 30px;
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
  border-color: #667eea;
  background: rgba(255, 255, 255, 0.08);
}

.card-icon {
  font-size: 48px;
  color: #667eea;
  margin-bottom: 20px;
  text-align: center;
}

.game-card h3 {
  font-size: 24px;
  margin-bottom: 10px;
  text-align: center;
  color: var(--text-primary);
}

.card-description {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.players-selector,
.difficulty-selector {
  margin-bottom: 20px;
}

.players-selector label,
.difficulty-selector label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-primary);
}

.players-select,
.difficulty-select {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.players-select:hover,
.difficulty-select:hover {
  border-color: #667eea;
  background: rgba(255, 255, 255, 0.08);
}

.players-select:focus,
.difficulty-select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.players-select option,
.difficulty-select option {
  background: #1a1a2e;
  color: var(--text-primary);
}

.primary-button {
  width: 100%;
  padding: 15px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.primary-button:active {
  transform: translateY(0);
}

.game-rules {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 30px;
  border-left: 4px solid #667eea;
  border: 1px solid var(--border-color);
  border-left: 4px solid #667eea;
}

.game-rules h3 {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.game-rules ul {
  list-style: none;
  padding: 0;
}

.game-rules li {
  padding: 12px 0;
  padding-left: 30px;
  position: relative;
  color: var(--text-secondary);
  line-height: 1.6;
}

.game-rules li:before {
  content: "▸";
  position: absolute;
  left: 0;
  color: #667eea;
  font-weight: bold;
}

@media (max-width: 768px) {
  .domino-header h1 {
    font-size: 36px;
  }

  .mode-cards {
    grid-template-columns: 1fr;
  }

  .domino-main {
    padding: 20px;
  }

  .back-button {
    position: static;
    display: inline-block;
    margin-bottom: 20px;
  }
}