:root {
    --bg-color: #121212;
    --text-color: #f8f9fa;
    --cell-bg: #1e1e1e;
    --cell-border: #555;
    --nav-bg: #121416;
    --nav-text: #f8f9fa;
    --x-color: #ff6b6b;
    --o-color: #51cf66;
    --board-bg: transparent;
    --border-color: #495057;
    --input-bg: #343a40;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --gradDark: hsl(198, 44%, 11%);
    --gradLight: hsl(198, 39%, 29%);
  }
  
  .light-mode {
    --bg-color: #f8f9fa;
    --text-color: #212529;
    --cell-bg: #ffffff;
    --cell-border: #dee2e6;
    --nav-bg: #343a40;
    --nav-text: #f8f9fa;
    --x-color: #dc3545;
    --o-color: #28a745;
    --board-bg: transparent;
    --border-color: #adb5bd;
    --input-bg: #e9ecef;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --gradDark: hsl(144, 100%, 89%);
    --gradLight: hsl(42, 94%, 76%);
  }
  
  body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    background: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  
  .container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
  }
  
  .navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--nav-bg);
    color: var(--nav-text);
    box-shadow: 0 4px 12px var(--shadow-color);
    position: relative;
    z-index: 10;
  }
  
  .nav-left {
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px var(--shadow-color);
  }
  
  .nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
  }
  
  button, .support-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    background-color: #495057;
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px var(--shadow-color);
  }
  
  button:hover, .support-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color);
  }
  
  .sound-btn.on {
    background-color: #28a745;
  }
  
  .ai-btn {
    background-color: #007bff;
  }
  
  .ai-btn.on {
    background-color: #17a2b8;
  }
  
  .support-btn {
    background-color: #ff0000;
    text-decoration: none;
    display: inline-block;
  }
  
  /* Developed by https://www.linkedin.com/in/msubham/ */
  /* Theme Switch Styles */
  .theme-switch-container {
    display: flex;
    align-items: center;
  }
  
  .theme-switch__input {
    opacity: 0;
    position: absolute;
  }
  
  .theme-switch__label {
    width: 51px;
    height: 26px;
    background-color: #495057;
    border-radius: 50px;
    position: relative;
    padding: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px var(--shadow-color);
  }
  
  .theme-switch__label i {
    font-size: 14px;
    color: rgb(255, 255, 255);
    z-index: 1;
  }
  
  .theme-switch__label::after {
    content: '';
    position: absolute;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background-color: rgb(255, 255, 255);
    top: px;
    left: px;
    transition: transform 0.3s ease;
  }
  
  .theme-switch__input:checked + .theme-switch__label::after {
    transform: translateX(24px);
  }
  
  /* Player input styles */
  .player-input {
    background-color: var(--input-bg);
    padding: 20px;
    border-radius: 10px;
    max-width: 300px;
    margin: 20px auto;
    box-shadow: 0 6px 12px var(--shadow-color);
  }
  
  .player-input h2 {
    margin-top: 0;
    color: var(--text-color);
    text-shadow: 1px 1px 2px var(--shadow-color);
  }
    /* Developed by https://www.linkedin.com/in/msubham/ */
  .input-group {
    padding-right: 20px;
    margin: 15px 0;
    text-align: left;
  }
  
  .input-group label {
    display: block;
    margin-bottom: 5px;
    margin-right: 20px;
    font-weight: bold;
  }
  
  .input-group input {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid var(--cell-border);
    background-color: var(--cell-bg);
    color: var(--text-color);
    box-shadow: inset 0 1px 3px var(--shadow-color);
  }
  
  #start-game {
    background-color: #28a745;
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    margin-top: 10px;
  }
  
  /* Scoreboard styles */
  .scoreboard {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 20px 0;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px var(--shadow-color);
  }
  
  .score {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 30px;
    border-radius: 8px;
    min-width: 10px;
    box-shadow: 0 4px 8px var(--shadow-color);
  }
    /* Developed by https://www.linkedin.com/in/msubham/ */
  .x-score {
    background-color: rgba(255, 107, 107, 0.1);
    border: 2px solid var(--x-color);
    color: var(--x-color);
 }
  
  .o-score {
    background-color: rgba(81, 207, 102, 0.1);
    border: 2px solid var(--o-color);
    color: var(--o-color);
  }
  
  .light-mode .x-score {
    background-color: rgba(220, 53, 69, 0.1);
  }
  
  .light-mode .o-score {
    background-color: rgba(40, 167, 69, 0.1);
  }
  
  .vs {
    font-size: 1.5rem;
    color: var(--text-color);
    text-shadow: 1px 1px 2px var(--shadow-color);
  }
  
  .player-name {
    font-size: 1rem;
    margin-bottom: 5px;
  }
  
  .score-count {
    font-size: 1.8rem;
  }
  
  /* Board styles */
  .board-container {
    position: relative;
    width: 312px;
    margin: 20px auto;
    box-shadow: 0 8px 16px var(--shadow-color);
    border-radius: 10px;
  }
    /* Developed by https://www.linkedin.com/in/msubham/ */
  .board {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    grid-gap: 6px;
    background: var(--board-bg);
    position: relative;
    z-index: 1;
    border-radius: 8px;
    overflow: hidden;
  }
  
  .board-border {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 3px solid var(--border-color);
    border-radius: 12px;
    z-index: 0;
    transition: all 0.3s ease;
  }
  
  .board-border.x-turn {
    animation: x-pulse 1.5s infinite;
    border-color: var(--x-color);
  }
  
  .board-border.o-turn {
    animation: o-pulse 1.5s infinite;
    border-color: var(--o-color);
  }
  
  @keyframes x-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(255, 107, 107, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
  }
    /* Developed by https://www.linkedin.com/in/msubham/ */
  @keyframes o-pulse {
    0% { box-shadow: 0 0 0 0 rgba(81, 207, 102, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(81, 207, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(81, 207, 102, 0); }
  }
  
  .cell {
    width: 100px;
    height: 100px;
    background-color: var(--cell-bg);
    border: 2px solid var(--cell-border);
    font-size: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    color: var(--text-color);
    position: relative;
    overflow: hidden;
  }
  
  .cell.x-move {
    color: var(--x-color);
  }
  
  .cell.o-move {
    color: var(--o-color);
  }
  
  .cell:hover {
    transform: scale(1.03);
    box-shadow: 0 0 15px var(--shadow-color);
  }
  
  .winning-cells {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: none;
  }
    /* Developed by https://www.linkedin.com/in/msubham/ */
  .winning-cell {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 5px;
    animation: blink 0.5s infinite alternate;
  }
  
  @keyframes blink {
    from { opacity: 0.3; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1.1); }
  }
  
  #status {
    font-size: 1.2rem;
    margin: 20px 0;
    min-height: 24px;
    text-shadow: 1px 1px 2px var(--shadow-color);
  }
  
  #restart-btn {
    background-color: #495057;
    padding: 12px 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
  }
  
  #restart-btn.x-win {
    background-color: var(--x-color);
  }
  
  #restart-btn.o-win {
    background-color: var(--o-color);
  }
  
  /* Win animation */
  .win-animation {
    animation: win-glow 0.4s;
  }
  
  @keyframes win-glow {
    0% { box-shadow: 0 0 5px 0px var(--x-color); }
    50% { box-shadow: 0 0 20px 10px var(--x-color); }
    100% { box-shadow: 0 0 5px 0px var(--x-color); }
  }
  
  .draw-animation {
    animation: draw-glow 1s;
  }  /* Developed by https://www.linkedin.com/in/msubham/ */
  
  @keyframes draw-glow {
    0% { box-shadow: 0 0 5px 0px var(--x-color), 0 0 5px 0px var(--o-color); }
    50% { box-shadow: 0 0 20px 10px var(--x-color), 0 0 20px 10px var(--o-color); }
    100% { box-shadow: 0 0 5px 0px var(--x-color), 0 0 5px 0px var(--o-color); }
  }
  
  /* Footer Styles */
  .footer {
    background-color: var(--nav-bg);
    color: var(--nav-text);
    padding: 10px;
    text-align: center;
    box-shadow: 0 -4px 12px var(--shadow-color);
  }
  
  .footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  
  .github-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background-color: #333;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
  }
  
  .github-btn:hover {
    background-color: #555;
    transform: translateY(-2px);
  }
  
  .copyright {
    font-size: 0.8rem;
    opacity: 0.8;
  }
    /* Developed by https://www.linkedin.com/in/msubham/ */
  /* Mobile optimization */
  @media (max-width: 600px) {
    .navbar {
      flex-direction: column;
      padding: 10px;
    }
    
    .nav-left {
      margin-bottom: 10px;
    }
    
    .nav-right {
      width: 100%;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 10px;
    }
    
    .theme-switch__label {
      width: 45px;
      height: 24px;
    }
    
    .theme-switch__label::after {
      width: 20px;
      height: 20px;
    }
    
    .theme-switch__input:checked + .theme-switch__label::after {
      transform: translateX(19px);
    }
    
    .board {
      grid-template-columns: repeat(3, 80px);
    }
    
    .cell {
      width: 80px;
      height: 80px;
      font-size: 36px;
    }
    
    .board-container {
      width: 252px;
    }
    
    .scoreboard {
      flex-direction: column;
      gap: 10px;
    }
    
    .vs {
      display: none;
    }
  }
