/* Base styles */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f2f3f5;
  color: #333;
}

#container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  background: #0066cc;
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
}

#user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#user-info span {
  font-weight: 500;
}

.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.btn.primary {
  background: #0066cc;
  color: #fff;
}

.btn:hover {
  opacity: 0.9;
}

main {
  flex: 1;
  padding: 2rem;
}

.section {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.card {
  background: #fff;
  border-radius: 6px;
  padding: 1rem 1.5rem;
  width: 200px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: inherit;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.card h3 {
  margin-top: 0;
}

footer {
  background: #f2f3f5;
  padding: 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: #777;
}

.hidden {
  display: none;
}

/* Game pages */
.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.game-board {
  display: grid;
  margin-top: 1rem;
  gap: 4px;
  background: #ddd;
  padding: 4px;
  border-radius: 6px;
}

.game-board .cell {
  width: 60px;
  height: 60px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 4px;
  user-select: none;
}

.game-board .cell.taken {
  cursor: default;
  font-weight: bold;
}

.status {
  margin-top: 1rem;
  font-size: 1.1rem;
}

.chat-container {
  margin-top: 1rem;
  width: 100%;
  max-width: 400px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  display: flex;
  flex-direction: column;
  height: 250px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.chat-input {
  display: flex;
  border-top: 1px solid #eee;
}

.chat-input input {
  flex: 1;
  border: none;
  padding: 0.5rem;
  font-size: 1rem;
  border-radius: 0 0 0 6px;
  outline: none;
}

.chat-input button {
  border: none;
  background: #0066cc;
  color: #fff;
  padding: 0 1rem;
  cursor: pointer;
  border-radius: 0 0 6px 0;
}

.chat-bubble {
  margin: 4px 0;
  padding: 6px 10px;
  border-radius: 12px;
  max-width: 70%;
  word-break: break-word;
}

.chat-bubble.self {
  align-self: flex-end;
  background: var(--bubble-color, #0084ff);
  color: #fff;
}

.chat-bubble.other {
  align-self: flex-start;
  background: #eee;
  color: #333;
}

/* Discs for Connect 4 */
.disc {
  display: inline-block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.disc.red {
  background: #e53935;
}
.disc.yellow {
  background: #fbc02d;
}

/* Store page */
.store-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.store-item {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1rem;
  width: 200px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.color-preview {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin: 0 auto 0.5rem;
  border: 1px solid #ccc;
}

.store-item button {
  margin-top: 0.5rem;
}