/* Updated styles.css with icon adjustments */

body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: 'Orbitron', sans-serif;
  background: url('images/bgcodmreal.jpg') no-repeat center center fixed;
  background-size: cover;
}

#game-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

canvas#graph-canvas {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

#icons-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 20px;
  font-weight: bold;
  border: 2px solid;
  background: transparent;
  z-index: 3;
  pointer-events: auto; /* ✅ allow clicking */
}

.icon .points {
  position: absolute;
  bottom: -22px;
  font-size: 14px;
  color: orange;
  text-shadow: 0 0 3px orange;
}

#tictactoe {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-columns: repeat(3, 100px);
  grid-template-rows: repeat(3, 100px);
  gap: 5px;
}

.cell {
  width: 100px;
  height: 100px;
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid #00ffcc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 70px;
  font-weight: bold;
  color: #00ffcc;
  cursor: pointer;
  transition: background 0.2s ease;
}

/* Default all borders to visible first */
.cell {
  border: 2px solid currentColor;
  background: rgba(0, 0, 0, 0.4); /* was 0.7 */
}


/* Remove borders for specific cells based on position */
.cell[data-cell="1"] {
  border-left: none;
  border-top: none;
}
.cell[data-cell="2"] {
  border-top: none;
}
.cell[data-cell="3"] {
  border-top: none;
  border-right: none;
}
.cell[data-cell="4"] {
  border-left: none;
}
.cell[data-cell="6"] {
  border-right: none;
}
.cell[data-cell="7"] {
  border-left: none;
  border-bottom: none;
}
.cell[data-cell="8"] {
  border-bottom: none;
}
.cell[data-cell="9"] {
  border-bottom: none;
  border-right: none;
}


.cell:hover {
  background: rgba(0, 255, 204, 0.2);
}

@media (max-width: 768px) {
  #tictactoe {
    grid-template-columns: repeat(3, 70px);
    grid-template-rows: repeat(3, 70px);
  }

  .cell {
    width: 70px;
    height: 70px;
    font-size: 44px;
  }

  .icon {
    width: 40px;
    height: 40px;
    font-size: 17px;
  }

  .icon .points {
    font-size: 12px;
  }
}

#keyboard-instructions1 {
  position: absolute;
  bottom: 20px;
  left: 10%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #00ffcc;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 16px;
  text-align: center;
  z-index: 5;
  box-shadow: 0 0 10px #00ffcc;
  cursor: pointer;
  border: none;
}

#keyboard-instructions2 {
  position: absolute;
  bottom: 20px;
  left: 30%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #00ffcc;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 16px;
  text-align: center;
  z-index: 5;
  box-shadow: 0 0 10px #00ffcc;
  cursor: pointer;
  border: none;
}

#tictactoe.hidden {
  display: none;
}

.cell.x {
  color: #ff6600;
}

.cell.o {
  color: #00ccff;
}


/* Balance box (reuse for Unverify Balance too) */
.balance-box {
    background: rgba(0, 0, 0, 0.5); 
    color: #fff;
    border-radius: 8px;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    font-size: 18px;
    font-family: 'Courier New', monospace;
    box-shadow: 0 0 8px #0ff;
}

/* Unverify Balance (top-left) */
.unverify-balance {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5); 
    color: #fff;
    border-radius: 8px;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    font-size: 18px;
    font-family: 'Courier New', monospace;
    box-shadow: 0 0 8px #0ff;
}

/* Main Balance (top-right) */
.main-balance {
    position: absolute;
    top: 10px;
    right: 100px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5); 
    color: #fff;
    border-radius: 8px;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    font-size: 18px;
    font-family: 'Courier New', monospace;
    box-shadow: 0 0 8px #0ff;
}

/* Ad Banner on Right Side */
.ad-banner-right {
  margin-top: 180px;
  margin-right: 50px;
  width: 120px; /* adjust size as needed */
  float: right; /* align under the balance on the right */
  text-align: right;
}

.ad-banner-right img {
  position: relative;
  z-index: 1000;
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
  animation: glowPulse 2s infinite ease-in-out;
  cursor: pointer;
}

/* Glow + Pulse Animation */
@keyframes glowPulse {
  0% {
    transform: scale(1);
    box-shadow: 
      0 0 10px rgba(255, 255, 0, 0.6),   /* outer glow */
      inset 0 0 10px rgba(255, 255, 0, 0.5); /* inner glow */
  }
  50% {
    transform: scale(1.1);
    box-shadow: 
      0 0 25px rgba(255, 255, 0, 0.9),   /* stronger outer glow */
      inset 0 0 20px rgba(255, 255, 0, 0.7); /* stronger inner glow */
  }
  100% {
    transform: scale(1);
    box-shadow: 
      0 0 10px rgba(255, 255, 0, 0.6),   /* outer glow */
      inset 0 0 10px rgba(255, 255, 0, 0.5); /* inner glow */
  }
}


/* Top icons (outside balance box) */
#topIcons {
  position: absolute;
  top: 10px;
  right: 10px; /* adjust so they sit just left of #pointBalance or just after */
  display: flex;
  gap: 10px;
  z-index: 1000;
}

#topIcons img {
  width: 38px;
  height: 38px;
  cursor: pointer;
  filter: drop-shadow(0 0 4px #0ff);
}
/* Vertical icons (right side under unverify balance) */
.vertical-icons {
    position: absolute;
    top: 60px; /* under unverify balance */
    left: 10px;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    padding: 10px;
    gap: 14px;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.vertical-icons img {
    width: 38px;
    height: 38px;
    filter: drop-shadow(0 0 4px #0ff);
    cursor: pointer;
}

.iconver {
  position: relative; /* <-- important: makes tooltip relative to each icon */
  display: inline-block;
  cursor: pointer;
}

/* Tooltip style */
.iconver::after {
  content: attr(data-title);
  position: absolute;
  left: 162%;   /* appear to the right of each icon */
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #00ffcc;
  padding: 8px 15px;
  border-radius: 6px;
  font-size: 12px;
  font-family: 'Courier New', monospace;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.iconver::before {
  content: "";
  position: absolute;
  left: 120%;  /* aligns arrow to tooltip box */
  top: 50%;
  transform: translateY(-50%);
  border-width: 8px;
  border-style: solid;
  border-color: transparent rgba(0,0,0,0.6) transparent transparent;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Show on hover */
.iconver:hover::after, .iconver:hover::before {
  opacity: 1;
}


/* Glow Effects */
.glow-red {
  box-shadow: 0 0 20px red !important;
  animation: pulseRed 1s infinite;
}


.glow-green {
  box-shadow: 0 0 20px limegreen !important;
  animation: pulseGreen 1s infinite;
}

@keyframes pulseRed {
  0% { box-shadow: 0 0 5px red; }
  50% { box-shadow: 0 0 20px red; }
  100% { box-shadow: 0 0 5px red; }
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 5px limegreen; }
  50% { box-shadow: 0 0 20px limegreen; }
  100% { box-shadow: 0 0 5px limegreen; }
}

/* Cyan pulse for countdown ONLY */
.countdown-cyan {
  color: #0ff !important;
  text-shadow: 0 0 8px #0ff;
  font-weight: bold;
  animation: countdownPulseCyan 1.2s infinite ease-in-out;
}

@keyframes countdownPulseCyan {
  0%   { transform: scale(1);   text-shadow: 0 0 8px #0ff; }
  50%  { transform: scale(1.2); text-shadow: 0 0 20px #0ff, 0 0 40px #0ff; }
  100% { transform: scale(1);   text-shadow: 0 0 8px #0ff; }
}

/* Red pulse for countdown (timeout/warning) */
.countdown-red {
  color: red !important;
  text-shadow: 0 0 8px red;
  font-weight: bold;
  animation: countdownPulseRed 1s infinite ease-in-out;
}

@keyframes countdownPulseRed {
  0%   { transform: scale(1);   text-shadow: 0 0 8px red; }
  50%  { transform: scale(1.3); text-shadow: 0 0 20px red, 0 0 40px red; }
  100% { transform: scale(1);   text-shadow: 0 0 8px red; }
}

/* Disable clicking + gray out */
.icons-disabled .icon {
  pointer-events: none;   /* 🚫 no clicks */
  opacity: 0.4;           /* 🔳 grayed out */
  filter: grayscale(100%);
}



#tictactoe {
  opacity: 1;                 /* base visible */
  transition: opacity 0.35s ease-out;
  will-change: opacity;
}

#tictactoe.is-fading {
  opacity: 0;                 /* fade target */
}

.hidden { display: none; }    /* if you already use this elsewhere */


/* Task Popup */
#taskPopup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #111;
  color: #00ffff;
  padding: 24px;
  border: 2px solid #00ffff;
  border-radius: 10px;
  box-shadow: 0 0 30px #00ffff;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: 'Courier New', monospace;
}

#taskPopup.hidden {
  display: none;
}

#taskPopup .popup-message {
  font-size: 16px;
  text-align: center;
}

#taskPopup .popup-link {
  background: #00ffff;
  color: #000;
  padding: 10px 18px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.3s ease;
}

#taskPopup .popup-link:hover {
  background: #bada55;
}


#continueGameBtn{
    padding: 10px 18px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s ease;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    background: rgb(0, 0, 0);
    color: #00ffff;
    border: 1px solid #00ffff;
}

#continueGameBtn:hover{
    background: #bada55;
    color:rgb(0, 0, 0);;
}

.hidden {
    display: none;
}

.glow-red {
    background-color: #ffdddd !important;
    box-shadow: 0 0 15px red !important;
}

.glow-green {
    background-color: #ddffdd !important;
    box-shadow: 0 0 15px limegreen !important;
}

.fade-out {
    opacity: 0;
    transition: opacity 2s ease-out;
}

/*start match-making*/
.start-box {
  position: relative;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 350px;
  padding: 40px 30px;
  border-radius: 20px;
  background: rgba(0, 25, 50, 0.25);
  box-shadow: 0 0 20px #00ffff55;
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid rgba(0, 255, 255, 0.2);
}


.player-start{
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5%;
    border: 1px solid #00ffff44;
}


/* Login button */
.start-button {
  padding: 70px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(to right, #004eff, #00ffff);
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
  font-size: 20px;
}

.start-button:hover {
  background: linear-gradient(to right, #00ffff, #004eff);
}

.main-start {
    top: 10px;
    right: 100px;
    background: rgba(0, 0, 0, 0.5); 
    color: #fff;
    border-radius: 8px;
    padding: 8px 14px;
    align-items: center;
    font-size: 18px;
    font-family: 'Courier New', monospace;
    box-shadow: 0 0 8px #0ff;
    margin-bottom: 20px;
    margin-top: -25px;
}

@media (max-width: 768px) {
.start-box {
    top: 25%;
    left: 50%;
    width: 270px;
   }
   
.main-start {
    font-size: 15px;
   }
   
   .ad-banner-right img {
    position: absolute;
    width: 20%;
   }
   
   .ad-banner-right {
    margin-top: 120px;
    margin-right: 180px;
    width: 120px;
   }
   
   .main-balance {
    top: 10px;
    left: 15px;
   }
}

