/*!*****************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[3]!./src/app/globals.css ***!
  \*****************************************************************************************************************************************************************************************************************************************************************/
/* Global CSS - Code Board Gamer */

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

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #64748b;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --bg: #0f172a;
  --bg-light: #1e293b;
  --bg-lighter: #334155;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --card-bg: #1e293b;
  --card-border: #475569;
}

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

/* Common button styles */
.btn {
  padding: 12px 30px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.btn.primary:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn.secondary {
  background: var(--bg-lighter);
  color: var(--text);
}

.btn.secondary:hover:not(:disabled) {
  background: var(--secondary);
}

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

.btn.danger:hover:not(:disabled) {
  background: #dc2626;
  transform: translateY(-2px);
}

/* Landing page styles */
.landing-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  min-height: 100vh;
}

.logo {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 50px;
  color: var(--text);
}

.games-list {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.game-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-light);
  border-radius: 8px;
  padding: 16px 20px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}

.game-row:hover {
  background: var(--bg-lighter);
}

.game-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.game-arrow {
  color: var(--text-muted);
  font-size: 1.2rem;
}

/* Common link button */
.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 0.9rem;
  margin-top: 15px;
  text-decoration: underline;
}

.btn-link:hover {
  color: var(--primary-dark);
}

/* Back button */
.btn-back {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s;
  text-decoration: none;
  z-index: 100;
}

.btn-back:hover {
  background: var(--bg-light);
  border-color: var(--primary);
  color: var(--text);
}

/* Toast notifications */
.toast-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
}

.toast {
  background: var(--bg-lighter);
  padding: 12px 24px;
  border-radius: 8px;
  margin-top: 10px;
  animation: slideUp 0.3s ease;
}

.toast.error {
  background: var(--danger);
}

.toast.success {
  background: var(--success);
}

.toast.info {
  background: var(--warning);
}

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

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

/* Success button variant */
.btn.success {
  background: var(--success);
  color: white;
}

.btn.success:hover:not(:disabled) {
  background: #16a34a;
  transform: translateY(-2px);
}

/* Input styles */
.input-group {
  margin-bottom: 15px;
}

.input-group input,
.modal-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--bg-light);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.input-group input:focus,
.modal-input:focus {
  border-color: var(--primary);
}

.input-group input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  margin: 15px 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1 1;
  border-bottom: 1px solid var(--card-border);
}

.divider::before {
  margin-right: 10px;
}

.divider::after {
  margin-left: 10px;
}

/* Badge styles */
.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  background: var(--bg-lighter);
  color: var(--text-muted);
}

.badge-host {
  background: var(--primary);
  color: white;
}

.badge-robot {
  background: var(--secondary);
  color: white;
}

.badge-success {
  background: var(--success);
  color: white;
}

.badge-danger {
  background: var(--danger);
  color: white;
}

.badge-warning {
  background: var(--warning);
  color: white;
}

/* Card styles */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
}

.card-header {
  padding: 16px;
  border-bottom: 1px solid var(--card-border);
}

.card-content {
  padding: 16px;
}

.card-footer {
  padding: 16px;
  border-top: 1px solid var(--card-border);
}

/* Modal / Popup styles */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.popup-content {
  background: var(--bg-light);
  padding: 30px;
  border-radius: 12px;
  max-width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  text-align: center;
}

.popup-content h2,
.popup-content h3 {
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

/* Player list styles */
.player-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 20px 0;
}

.player-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-lighter);
  border-radius: 8px;
  transition: opacity 0.2s;
}

.player-item.disconnected {
  opacity: 0.5;
}

.player-item.current {
  border: 1px solid var(--primary);
}

.player-name {
  font-weight: 500;
}

.player-badges {
  display: flex;
  gap: 6px;
}

.kick-btn {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}

.kick-btn:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* Join form styles */
.join-form {
  width: 100%;
  max-width: 300px;
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.join-group {
  display: flex;
  gap: 10px;
}

.join-group input {
  flex: 1 1;
  padding: 12px 16px;
  font-size: 1rem;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: var(--bg-light);
  color: var(--text);
  text-transform: uppercase;
}

/* Lobby styles */
.lobby-screen {
  padding: 40px 20px;
  text-align: center;
}

.room-code {
  color: var(--primary);
  font-family: monospace;
  font-size: 1.2em;
}

.lobby-top-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 20px 0;
}

.player-count {
  color: var(--text-muted);
  margin-bottom: 10px;
}

.lobby-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
}

.waiting-message {
  color: var(--text-muted);
  font-style: italic;
}

/* Action buttons */
.action-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 15px;
}

.vote-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* Screen base */
.screen {
  display: none;
  min-height: 100vh;
  padding: 20px;
}

.screen.active {
  display: block;
}

/* Game layout */
.game-layout {
  min-height: 100vh;
  padding: 20px;
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: var(--bg-light);
  border-radius: 8px;
  margin-bottom: 20px;
}

.game-content {
  display: flex;
  gap: 20px;
}

.panel {
  background: var(--bg-light);
  border-radius: 8px;
  padding: 15px;
}

.panel-title {
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.85rem;
}

/* Player order list */
.player-order-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.player-order-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-lighter);
  border-radius: 6px;
  font-size: 0.9rem;
}

.player-order-item.active {
  border: 1px solid var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.player-order-item.busted {
  opacity: 0.5;
  text-decoration: line-through;
}

.player-order-item.stayed {
  opacity: 0.7;
}

.player-order-num {
  color: var(--text-muted);
  min-width: 20px;
}

.player-order-name {
  flex: 1 1;
}

.player-order-score {
  font-weight: 600;
  color: var(--primary);
}

/* Score list */
.scores-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}

.score-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-lighter);
  border-radius: 8px;
}

.score-item.busted {
  opacity: 0.6;
}

.score-name {
  font-weight: 500;
}

.score-details {
  display: flex;
  gap: 8px;
  align-items: center;
}

.round-score {
  color: var(--success);
  font-weight: 600;
}

.busted-label {
  color: var(--danger);
  font-weight: 600;
}

.bonus {
  color: var(--warning);
  font-size: 0.85rem;
}

.multiplier {
  color: var(--primary);
  font-weight: 600;
}

.total-score {
  font-weight: 600;
}

.rank {
  color: var(--text-muted);
  min-width: 25px;
}

/* Game end */
.game-end-screen {
  text-align: center;
  padding: 60px 20px;
}

.winner-announcement {
  font-size: 1.5rem;
  color: var(--success);
  margin: 20px 0;
}

.game-end-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

.waiting-text {
  color: var(--text-muted);
  font-style: italic;
}

/* Invite flow */
.invite-flow {
  text-align: center;
}

.invite-text {
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.invite-text strong {
  color: var(--primary);
  font-family: monospace;
}

/* Game description */
.game-description {
  margin-top: 30px;
  padding: 20px;
  background: var(--bg-light);
  border-radius: 8px;
  text-align: left;
  max-width: 500px;
}

.game-description h3,
.game-description h4 {
  margin-top: 15px;
  margin-bottom: 8px;
  color: var(--text);
}

.game-description h3:first-child {
  margin-top: 0;
}

.game-description p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

