body {
    margin: 0;
    overflow: hidden;
    font-family: Arial, sans-serif;
    background-image: url('assets/background5.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}
#canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent !important;
    z-index: 3; /* Higher than video and hand-canvas */
}
#video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures video covers entire area while maintaining aspect ratio */
    z-index: 1; /* Lowest layer - background webcam feed */
    transform: scaleX(-1); /* Mirror the webcam feed horizontally */
    opacity: 1.0;
}
#hand-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2; /* Above video but below 3D canvas */
    pointer-events: none;
}
#status {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background-color: rgba(0, 5, 78, 0.7);
    padding: 10px;
    /* border-radius: 5px; */
    z-index: 10;
    font-size: 16px;
}
#controls {
    position: absolute;
    top: 5px;
    left: 5px;
    z-index: 10;
}
button {
    padding: 8px 16px;
    margin-right: 10px;
    background-color: #7f037b;
    color: white;
    border: none;
    /* border-radius: 4px; */
    cursor: pointer;
}
button:hover {
    background-color: #d700d0;
}
/* Style for zoom buttons */
#zoomInBtn, #zoomOutBtn {
    font-weight: bold;
    font-size: 16px;
    padding: 8px 12px;
    min-width: 40px;
}
#debug {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 10px;
    /* border-radius: 5px; */
    z-index: 10;
    font-size: 12px;
    text-align: center;
    min-width: 300px;
}
#loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    z-index: 100;
}

/* Multiplayer styling */
  .ui-panel {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    border-radius: 5px;
    font-family: Arial, sans-serif;
    z-index: 100;
  }
  
  #multiplayer-status {
    top: 10px;
    right: 10px;
    text-align: right;
  }
  
  #game-controls {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
  }
  
  button {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    font-weight: bold;
  }
  
  button:hover {
    background-color: #45a049;
  }
  
  #resignBtn {
    background-color: #f44336;
  }
  
  #resignBtn:hover {
    background-color: #d32f2f;
  }

/* Start screen styles */
  #start-screen {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.5);
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 1000;
  }
  
  .start-menu {
      background-color: #fff;
      border-radius: 8px;
      padding: 30px;
      width: 400px;
      text-align: center;
      box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  }
  
  .start-menu h1 {
      margin-top: 0;
      color: #333;
      font-size: 28px;
  }
  
  .start-menu p {
      color: #666;
      margin-bottom: 30px;
  }
  
  .online-users {
      background-color: #f0f0f0;
      padding: 10px;
      border-radius: 5px;
      margin-bottom: 20px;
  }
  
  .game-btn {
      display: block;
      width: 100%;
      padding: 15px;
      margin-bottom: 15px;
      background-color: #4a72b0;
      color: white;
      border: none;
      border-radius: 5px;
      font-size: 16px;
      cursor: pointer;
      transition: background-color 0.3s;
  }
  
  .game-btn:hover {
      background-color: #345d9d;
  }
  
  .game-btn:last-child {
      margin-bottom: 0;
  }
  
  .waiting-message {
      display: none;
      margin-top: 20px;
      padding: 15px;
      background-color: #fff3cd;
      border-radius: 5px;
      color: #856404;
  }
  
  .loading-spinner {
      display: inline-block;
      width: 20px;
      height: 20px;
      border: 3px solid rgba(0,0,0,0.1);
      border-radius: 50%;
      border-top-color: #856404;
      animation: spin 1s ease-in-out infinite;
      margin-right: 10px;
  }
  
  @keyframes spin {
      to { transform: rotate(360deg); }
  }

  /* Chess Clock Styles - Add this to the end of your styles.css file */
.chess-clock {
    position: absolute;
    background-color: white;
    color: black;
    padding: 15px 20px;
    font-family: 'Courier New', monospace;
    font-size: 24px;
    font-weight: bold;
    z-index: 15;
    border: 5px solid transparent;
    min-width: 100px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.chess-clock.active {
    border-color: #ffff00;
    box-shadow: 0 0 15px rgba(255, 255, 0, 0.6);
}

#human-clock {
    bottom: 30px;
    right: 30px;
}

#robot-clock {
    top: 30px; /* Below the status bar */
    right: 30px;
}

.chess-clock .clock-label {
    font-size: 16px;
    font-weight: normal;
    margin-bottom: 5px;
    color: #666;
}

.chess-clock .time-display {
    font-size: 32px;
    font-weight: bold;
    color: black;
}

.chess-clock.time-warning {
    background-color: #ffeeee;
    border-color: #ff4444;
}

.chess-clock.time-critical {
    background-color: #ffcccc;
    border-color: #ff0000;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}