body { 
  font-family: 'Inter', Arial, sans-serif; 
  background: linear-gradient(135deg, #26a69a 0%, #00897b 50%, #00695c 100%);
  background-attachment: fixed;
  margin: 0;
  min-height: 100vh;
  padding-top: 70px;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(55, 71, 79, 0.98);
  backdrop-filter: blur(10px);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 1000;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-logo {
  font-size: 16px;
  font-weight: 700;
  color: #26a69a;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
}

.header-logo span:last-child {
  color: #fff;
}

.header-nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.header-nav a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 8px 14px;
  border-radius: 6px;
  transition: background 0.2s;
}

.header-nav a:hover {
  background: rgba(255,255,255,0.1);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-online {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(38, 166, 154, 0.2);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.5px;
}

.header-online-dot {
  width: 8px;
  height: 8px;
  background: #4caf50;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.container { 
  max-width: 700px; 
  margin: 20px auto; 
  background: rgba(255, 255, 255, 0.98);
  border-radius: 12px; 
  box-shadow: 0 4px 20px rgba(0,0,0,0.2); 
  padding: 24px; 
}

h1 { 
  text-align: center; 
  margin-bottom: 24px;
  color: #263238;
  font-size: 2em;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
#status, #game-status { text-align: center; margin: 12px 0; font-size: 1.1em; }

/* Time Control Grid */
.time-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Mode Toggle Buttons */
.mode-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.mode-btn.active#quick-match-btn {
  background: #667eea !important;
  color: #fff !important;
}

.mode-btn.active#private-match-btn {
  background: #ff6b6b !important;
  color: #fff !important;
}

/* Time Control Buttons - Default (Quick Match Purple) */
.time-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 12px;
  padding: 20px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  color: white;
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 90px;
}

/* Time Control Buttons - Private Match Mode (Red) */
.time-btn.private-mode {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.time-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.time-btn.private-mode:hover {
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.time-btn:active {
  transform: translateY(-1px);
}

.time-btn.selected {
  background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
  box-shadow: 0 4px 16px rgba(76, 175, 80, 0.5);
  transform: scale(1.05);
}

.time-btn div {
  font-size: 1.8em;
  font-weight: bold;
  line-height: 1;
}

.time-btn span {
  font-size: 0.85em;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

/* Remove old private button styles - no longer needed */

@media (max-width: 600px) {
  .time-grid {
    gap: 8px;
    margin: 16px 0;
  }
  
  .time-btn, .time-btn-private {
    padding: 16px 12px;
    min-height: 75px;
    border-radius: 10px;
  }
  
  .time-btn div, .time-btn-private div {
    font-size: 1.4em;
  }
  
  .time-btn span, .time-btn-private span {
    font-size: 0.75em;
  }
}

@media (max-width: 400px) {
  .time-grid {
    gap: 6px;
  }
  
  .time-btn, .time-btn-private {
    padding: 12px 8px;
    min-height: 65px;
    border-radius: 8px;
  }
  
  .time-btn div, .time-btn-private div {
    font-size: 1.2em;
  }
  
  .time-btn span, .time-btn-private span {
    font-size: 0.7em;
  }
}

.board { 
  display: grid; 
  grid-template-columns: repeat(8, 70px); 
  grid-template-rows: repeat(8, 70px); 
  gap: 0; 
  justify-content: center; 
  margin: 20px 0;
}
.cell { 
  width: 70px; 
  height: 70px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 3em; 
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.cell.light { background: #f0d9b5; }
.cell.dark { background: #b58863; }
.cell.selected { box-shadow: inset 0 0 0 3px #4caf50; }
.cell.valid-move { background: rgba(76, 175, 80, 0.3) !important; }
.cell.valid-move::after {
  content: '';
  width: 20px;
  height: 20px;
  background: rgba(76, 175, 80, 0.6);
  border-radius: 50%;
}
.cell.drag-hover { 
  box-shadow: inset 0 0 0 3px #2196f3; 
  background: rgba(33, 150, 243, 0.4) !important; 
}
.cell:hover { opacity: 0.8; }
#restart { display: block; margin: 0 auto; padding: 8px 24px; font-size: 1em; border-radius: 6px; border: none; background: #0077cc; color: #fff; cursor: pointer; }
#restart:hover { background: #005fa3; }

/* Mobile responsive styles */
@media (max-width: 700px) {
  .container { 
    margin: 20px auto; 
    padding: 16px; 
    border-radius: 8px;
  }
  
  h1 { 
    font-size: 1.5em; 
    margin-bottom: 16px; 
  }
  
  .board { 
    grid-template-columns: repeat(8, 45px); 
    grid-template-rows: repeat(8, 45px); 
    margin: 12px 0;
  }
  
  .cell { 
    width: 45px; 
    height: 45px; 
    font-size: 2em; 
  }
  
  #status, #game-status { 
    font-size: 1em; 
    margin: 8px 0; 
  }
  
  #player-names {
    font-size: 0.9em;
  }
  
  #player-names span {
    min-width: 80px !important;
  }
  
  #player-names img,
  #player-names div[style*="border-radius: 50%"] {
    width: 24px !important;
    height: 24px !important;
  }
}

@media (max-width: 400px) {
  .container { 
    margin: 10px; 
    padding: 12px; 
  }
  
  h1 { 
    font-size: 1.3em; 
  }
  
  .board { 
    grid-template-columns: repeat(8, 38px); 
    grid-template-rows: repeat(8, 38px); 
  }
  
  .cell { 
    width: 38px; 
    height: 38px; 
    font-size: 1.6em; 
  }
  
  #player-names {
    font-size: 0.85em;
  }
  
  #player-names span {
    min-width: 60px !important;
    margin-left: 6px !important;
    margin-right: 6px !important;
  }
  
  #player-names img,
  #player-names div[style*="border-radius: 50%"] {
    width: 20px !important;
    height: 20px !important;
  }
  
  #timer-container {
    font-size: 0.9em;
  }
}