/* Base styles */
body { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    min-height: 100vh; 
    margin: 0; 
    padding: 20px;
    font-family: 'Orbitron', sans-serif; 
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), 
                url('1276411-widescreen-ultra-hd-3d-wallpapers-1080p-1920x1080.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    color: #fff;
    position: relative;
    overflow-x: hidden;
    box-sizing: border-box;
  }
  
  body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(138, 43, 226, 0.1) 0%, rgba(0, 0, 0, 0.1) 70%);
    z-index: -1;
    animation: pulse 8s infinite alternate;
  }
  
  @keyframes pulse {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
  }
  .container { 
    text-align: center;
    background: rgba(20, 20, 40, 0.9);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.5);
    border: 1px solid rgba(138, 43, 226, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    box-sizing: border-box;
    overflow: hidden;
  }
  
  .container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
   
    background-size: 100%;
    z-index: -1;
    border-radius: 22px;
    opacity: 0.7;
    animation: borderGlow 15s linear infinite;
  }
  
  @keyframes borderGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
  canvas { 
    background: rgba(30, 30, 50, 0.9); 
    display: block; 
    margin: 15px auto; 
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.3);
    border-radius: 10px;
    border: 2px solid rgba(138, 43, 226, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
    width: 100%;
    max-width: 600px;
    height: auto;
    aspect-ratio: 1/1;
  }
  
  canvas:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(138, 43, 226, 0.5);
  }
  /* Time Controls */
.time-controls {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.time-option {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.2s;
}

.time-option:hover {
  background: rgba(255, 255, 255, 0.2);
}

.time-option input[type="radio"] {
  margin: 0;
}

/* Timer Display */
.timer-container {
  display: flex;
  justify-content: space-between;
  margin: 10px 0;
  gap: 10px;
}

.timer {
  min-width: 80px;
  text-align: center;
  padding: 5px 15px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.3);
  font-family: 'Orbitron', sans-serif;
  font-weight: bold;
  letter-spacing: 1px;
}

#whiteTimer {
  color: #fff;
  border: 2px solid #fff;
  transition: all 0.3s ease;
}

#blackTimer {
  color: #000;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #000;
  transition: all 0.3s ease;
}

/* Active timer styles */
#whiteTimer.active-timer {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

#blackTimer.active-timer {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
  transform: scale(1.05);
  color: #000;
  border: 2px solid #000;
}

.controls { 
    margin: 15px 0;
    padding: 15px;
    background: rgba(30, 30, 50, 0.7);
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    width: 100%;
    box-sizing: border-box;
  }
  .winner-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 30px 20px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    text-align: center;
    z-index: 1000;
    opacity: 0;
    border: 2px solid #4cc9f0;
    transition: all 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    width: 90%;
    max-width: 400px;
    box-sizing: border-box;
  }
  .winner-popup.show {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    animation: pulse 2s infinite;
  }
  
  @keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(76, 201, 240, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(76, 201, 240, 0); }
    100% { box-shadow: 0 0 0 0 rgba(76, 201, 240, 0); }
  }
  .winner-popup h2 {
    margin: 0 0 20px;
    color: #4cc9f0;
    font-size: 2.5em;
    text-shadow: 0 0 10px rgba(76, 201, 240, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
  }
  
  @keyframes glow {
    from { text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #4cc9f0, 0 0 20px #4cc9f0; }
    to { text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #4cc9f0, 0 0 40px #4cc9f0; }
  }
  .winner-popup p {
    font-size: 1.5em;
    margin: 0 0 30px;
    color: #f8f9fa;
    text-shadow: 0 0 5px rgba(255,255,255,0.5);
  }
  /* Modal styles */
  .modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
  }
  
  .modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  }
  
  .input-group {
    margin-bottom: 15px;
  }
  
  .input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
  }
  
  .input-group input[type="text"] {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #444;
    border-radius: 25px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.1);
    color: rgb(0, 0, 0);
    margin-top: 5px;
    transition: all 0.3s;
  }
  
  .input-group input[type="text"]:focus {
    outline: none;
    border-color: #8a2be2;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
  }
  
  .input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #181818;
  }
  
  .input-group input[type="checkbox"],
  .input-group input[type="radio"] {
    margin-right: 8px;
    transform: scale(1.2);
  }
  
  .time-options {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    justify-content: center;
  }
  
  .time-options label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
  }
  
  .time-options label:hover {
    background: rgba(138, 43, 226, 0.3);
  }
  
  .start-button {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1.1em;
    width: 100%;
    margin-top: 20px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
  }
  
  .start-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(76, 175, 80, 0.5);
  }
  
  .start-button:active {
    transform: translateY(1px);
  }
  
  .start-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    transition: 0.6s;
  }
  
  .start-button:hover::after {
    transform: translateX(100%);
  }
  
  .winner-popup button {
    background: linear-gradient(45deg, #4cc9f0, #4895ef);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.3s;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(76, 201, 240, 0.4);
    position: relative;
    overflow: hidden;
  }
  
  .winner-popup button:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(76, 201, 240, 0.6);
  }
  
  .winner-popup button:active {
    transform: translateY(1px);
  }
  
  .winner-popup button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    transition: 0.6s;
  }
  
  .winner-popup button:hover::after {
    transform: translateX(100%);
  }
  button { 
    padding: 10px 20px; 
    border-radius: 30px; 
    border: none; 
    background: linear-gradient(45deg, #8a2be2, #4b0082);
    color: white;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
  }
  
  button:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(138, 43, 226, 0.5);
  }
  
  button:active {
    transform: translateY(1px);
  }
  
  button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    transition: 0.6s;
  }
  
  button:hover::after {
    transform: translateX(100%);
  }
  p.note { 
    font-size:14px; 
    color:#ccc;
    max-width: 500px;
    margin: 15px auto 0;
    line-height: 1.5;
    text-shadow: 0 0 10px rgba(255,255,255,0.1);
  }
  #status { 
    margin: 15px 0; 
    font-weight: 700; 
    min-height: 20px;
    color: #ffcc00;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
    font-size: 1.1em;
    letter-spacing: 1px;
  }
 






    





