/*!*
 * This file is part of the SplendidBear Websites' projects.
 *
 * Copyright (c) 2026 @ www.splendidbear.org
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

#mine-wrapper .game-wrapper .game-overlay {
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;

  z-index: 200;

  -webkit-border-radius: 10px;
  border-radius: 10px;
}

#mine-wrapper .game-wrapper .game-overlay.hide {
  display: none;
}

#mine-wrapper .game-wrapper .game-overlay .game-overlay-window {
   background: linear-gradient(135deg, rgba(7, 9, 13, 0.98) 0%, rgba(10, 20, 35, 0.98) 100%);
   border: 2px solid rgba(35, 111, 135, 0.4);
   backdrop-filter: blur(12px);
   font-family: 'Rajdhani', sans-serif;
   color: #fff;
   width: 100%;
   max-width: 680px;
   padding: 40px;
   border-radius: 16px;
   box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7), 0 0 40px rgba(35, 111, 135, 0.15);
   display: flex;
   flex-direction: column;
   gap: 0;
   animation: slideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
   overflow: hidden;
   max-height: 90vh;
 }

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#mine-wrapper .game-wrapper .game-overlay .game-overlay-window h1 {
   font-weight: 800;
   font-size: 32px;
   color: #fff;
   margin: 0 0 50px 0;
   letter-spacing: 1px;
   overflow: hidden;
   text-overflow: ellipsis;
   display: -webkit-box;
   -webkit-line-clamp: 2;
   -webkit-box-orient: vertical;
 }

#mine-wrapper .game-wrapper .game-overlay .game-overlay-window h2 {
  font-size: 14px;
  color: rgba(149, 207, 245, 0.6);
  margin: 0 0 30px 0;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
}

#mine-wrapper .game-wrapper .game-overlay .game-overlay-window .resign {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-transform: none;
  letter-spacing: normal;
  font-size: inherit;

  a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(to bottom, #236f87 0%, #1a5068 100%);
    border: 2px solid #2e7a9a;
    color: #e0f4ff;
    font: 800 13px 'Rajdhani', sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 100%;
    max-width: 260px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(35, 111, 135, 0.25);
    text-decoration: none;

    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
      transition: left 0.4s ease;
    }

    &:hover {
      background: linear-gradient(to bottom, #2d8aa8 0%, #236f87 100%);
      border-color: #5ba4d4;
      color: #fff;
      box-shadow: 0 8px 24px rgba(35, 111, 135, 0.4);
      transform: translateY(-2px);

      &::before {
        left: 100%;
      }
    }

    &:active {
      transform: translateY(0);
    }

    &:first-child {
      background: linear-gradient(to bottom, #8a2323 0%, #681a1a 100%);
      border-color: #9a2e2e;
      color: #ffe0e0;
      box-shadow: 0 4px 12px rgba(135, 35, 35, 0.25);

      &:hover {
        background: linear-gradient(to bottom, #a82d2d 0%, #872323 100%);
        border-color: #d45b5b;
        color: #fff;
        box-shadow: 0 8px 24px rgba(135, 35, 35, 0.4);
      }
    }
  }
}

#mine-wrapper .game-wrapper .game-overlay .game-overlay-window:has(.resign) h1 {
  text-align: center;
  margin-bottom: 24px;
}

#mine-wrapper .game-wrapper .game-overlay .game-overlay-window:has(.resign) h2 {
  text-align: center;
  color: inherit;
  font-size: inherit;
  letter-spacing: normal;
  text-transform: none;
  font-weight: normal;
  margin: 0;
}

#mine-wrapper .game-wrapper .game-overlay .game-overlay-window h3 {
  font-size: 16px;
  color: #236f87;
}

#mine-wrapper .game-wrapper .game-overlay .game-overlay-window .share-invite {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#mine-wrapper .game-wrapper .game-overlay .game-overlay-window .share-invite-label {
  font-size: 13px;
  color: #386e8c;
  margin: 0 0 8px;
  font-style: italic;
}

.waiting-options {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto;
  gap: 10px;
  align-items: stretch;
  width: 100%;
  animation: fadeInUp 0.6s ease-out 0.2s both;

  &.waiting-options--invite-only {
    grid-template-columns: 1fr;
  }

  @media (max-width: 600px) {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.waiting-option {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 15px;
  background: linear-gradient(135deg, rgba(35, 111, 135, 0.08) 0%, rgba(26, 80, 104, 0.08) 100%);
  border: 2px solid rgba(35, 111, 135, 0.2);
  border-radius: 12px;
  transition: all 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  animation: scaleIn 0.5s ease-out;

  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(35, 111, 135, 0.15), transparent);
    transition: left 0.5s ease;
  }

  &:hover {
    border-color: rgba(35, 111, 135, 0.45);
    background: linear-gradient(135deg, rgba(35, 111, 135, 0.12) 0%, rgba(26, 80, 104, 0.12) 100%);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(35, 111, 135, 0.2);

    &::before {
      left: 100%;
    }
  }
}

.waiting-option-header {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 800;
  font-size: 17px;
  color: #fff;
  letter-spacing: 1px;
  text-transform: uppercase;

  i {
    font-size: 20px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, rgba(35, 111, 135, 0.4) 0%, rgba(35, 111, 135, 0.2) 100%);
    border: 2px solid rgba(35, 111, 135, 0.5);
    border-radius: 8px;
    transition: all 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
  }

  &:hover i {
    background: linear-gradient(135deg, rgba(35, 111, 135, 0.6) 0%, rgba(35, 111, 135, 0.4) 100%);
    border-color: rgba(35, 111, 135, 0.8);
    transform: scale(1.15) rotate(-8deg);
    box-shadow: 0 0 20px rgba(35, 111, 135, 0.4);
  }
}

.waiting-option-desc {
   font: 600 12px 'Rajdhani', sans-serif;
   color: rgba(149, 207, 245, 0.75);
   margin: 0;
   letter-spacing: 0.4px;
   line-height: 1.4;
   overflow: hidden;
   text-overflow: ellipsis;
   display: -webkit-box;
   -webkit-line-clamp: 3;
   -webkit-box-orient: vertical;
 }

.waiting-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  animation: slideIn 0.7s ease-out 0.4s both;

  &::before,
  &::after {
    content: '';
    width: 2px;
    height: 20px;
    background: linear-gradient(
      to bottom,
      rgba(35, 111, 135, 0.1),
      rgba(35, 111, 135, 0.4),
      rgba(35, 111, 135, 0.1)
    );
  }

  &::after {
    display: none;
  }

  span {
    font: 700 11px 'Rajdhani', sans-serif;
    color: rgba(35, 111, 135, 0.6);
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 0 8px;
  }

  @media (max-width: 600px) {
    flex-direction: row;
    margin: 8px 0;

    &::before,
    &::after {
      content: '';
      flex: 1;
      width: auto;
      height: 1px;
      background: linear-gradient(
        to right,
        rgba(35, 111, 135, 0),
        rgba(35, 111, 135, 0.3),
        rgba(35, 111, 135, 0)
      );
    }

    &::after {
      display: block;
    }
  }
}

#mine-wrapper .game-wrapper .game-overlay .game-overlay-window .share-invite {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

#mine-wrapper .game-wrapper .game-overlay .game-overlay-window .share-url-box {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #d0e8f5 0%, #c5dff0 100%);
  border: 2px solid #7ab8d8;
  border-radius: 8px;
  padding: 0 10px;
  cursor: text;
  transition: all 300ms ease;
  position: relative;
  overflow: hidden;

  &:hover {
    border-color: #236f87;
    box-shadow: 0 4px 12px rgba(35, 111, 135, 0.2);
  }

  &:focus-within {
    border-color: #236f87;
    box-shadow: 0 0 16px rgba(35, 111, 135, 0.35);
  }
}

#mine-wrapper .game-wrapper .game-overlay .game-overlay-window .share-url-icon {
  color: #236f87;
  font-size: 13px;
  flex-shrink: 0;
  margin-right: 8px;
  opacity: 0.7;
}

#mine-wrapper .game-wrapper .game-overlay .game-overlay-window .share-url-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  height: 40px;
  color: #1a4a6a;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: text;
  min-width: 0;

  &::selection {
    background: rgba(35, 111, 135, 0.3);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#mine-wrapper .game-wrapper .game-overlay .game-overlay-window .browse-players-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(to bottom, #236f87 0%, #1a5068 100%);
  border: 2px solid #2e7a9a;
  color: #e0f4ff;
  font: 700 13px 'Rajdhani', sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 100%;
  font-weight: 800;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(35, 111, 135, 0.25);

  i {
    font-size: 15px;
  }

  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.4s ease;
  }

  &:hover {
    background: linear-gradient(to bottom, #2d8aa8 0%, #236f87 100%);
    border-color: #5ba4d4;
    color: #fff;
    box-shadow: 0 8px 24px rgba(35, 111, 135, 0.4);
    transform: translateY(-2px);

    &::before {
      left: 100%;
    }
  }

  &:active {
    transform: translateY(0);
  }
}

#mine-wrapper .game-wrapper .game-overlay .game-overlay-window .share-copy-btn {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   gap: 9px;
   background: linear-gradient(to bottom, #236f87 0%, #1a5068 100%);
   border: 2px solid #2e7a9a;
   color: #e0f4ff;
   font-family: 'Rajdhani', sans-serif;
   font-size: 13px;
   font-weight: 800;
   letter-spacing: 1px;
   text-transform: uppercase;
   padding: 12px 24px;
   border-radius: 8px;
   cursor: pointer;
   transition: all 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
   width: 100%;
   position: relative;
   overflow: hidden;
   box-shadow: 0 4px 12px rgba(35, 111, 135, 0.25);

   &::before {
     content: '';
     position: absolute;
     top: 0;
     left: -100%;
     width: 100%;
     height: 100%;
     background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
     transition: left 0.4s ease;
   }

   &:hover {
     background: linear-gradient(to bottom, #2d8aa8 0%, #236f87 100%);
     border-color: #5ba4d4;
     color: #fff;
     box-shadow: 0 8px 24px rgba(35, 111, 135, 0.4);
     transform: translateY(-2px);

     &::before {
       left: 100%;
     }
   }

   &:active {
     transform: translateY(0);
   }

   &.copied {
     background: linear-gradient(to bottom, #1a6844 0%, #135233 100%);
     border-color: #2a9e60;
     color: #a0f0c0;
     box-shadow: 0 4px 12px rgba(26, 104, 68, 0.4);
   }
}

#mine-wrapper .game-wrapper .game-overlay .game-overlay-window .game-overlay-actions {
   display: flex;
   align-items: stretch;
   gap: 12px;
   margin-top: 20px;
   width: 100%;

   > * {
     flex: 1 1 0;
     margin-top: 0 !important;
   }
}

#mine-wrapper .game-wrapper .game-overlay .game-overlay-window .game-overlay-share {
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 9px;
   background: linear-gradient(to bottom, #236f87 0%, #1a5068 100%);
   border: 2px solid #2e7a9a;
   color: #e0f4ff;
   font-family: 'Rajdhani', sans-serif;
   font-size: 13px;
   font-weight: 800;
   letter-spacing: 1px;
   text-transform: uppercase;
   padding: 12px 24px;
   border-radius: 8px;
   cursor: pointer;
   transition: all 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
   width: 100%;
   margin-top: 20px;
   position: relative;
   overflow: hidden;
   box-shadow: 0 4px 12px rgba(35, 111, 135, 0.25);
   z-index: 10;

   &::before {
     content: '';
     position: absolute;
     top: 0;
     left: -100%;
     width: 100%;
     height: 100%;
     background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
     transition: left 0.4s ease;
   }

   &:hover {
     background: linear-gradient(to bottom, #2d8aa8 0%, #236f87 100%);
     border-color: #5ba4d4;
     color: #fff;
     box-shadow: 0 8px 24px rgba(35, 111, 135, 0.4);
     transform: translateY(-2px);

     &::before {
       left: 100%;
     }
   }

   &:active {
     transform: translateY(0);
   }

   &.copied {
     background: linear-gradient(to bottom, #1a6844 0%, #135233 100%);
     border-color: #2a9e60;
     color: #a0f0c0;
     box-shadow: 0 4px 12px rgba(26, 104, 68, 0.4);
   }

   i {
     font-size: 15px;
   }
}

#mine-wrapper .game-wrapper .game-overlay .game-overlay-window .game-overlay-profile {
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 9px;
   background: linear-gradient(to bottom, #1a6844 0%, #135233 100%);
   border: 2px solid #2a9e60;
   color: #d0ffe0;
   font-family: 'Rajdhani', sans-serif;
   font-size: 13px;
   font-weight: 800;
   letter-spacing: 1px;
   text-transform: uppercase;
   padding: 12px 24px;
   border-radius: 8px;
   cursor: pointer;
   transition: all 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
   width: 100%;
   margin-top: 20px;
   position: relative;
   overflow: hidden;
   box-shadow: 0 4px 12px rgba(42, 158, 96, 0.25);
   text-decoration: none;
   z-index: 10;

   &::before {
     content: '';
     position: absolute;
     top: 0;
     left: -100%;
     width: 100%;
     height: 100%;
     background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
     transition: left 0.4s ease;
   }

   &:hover {
     background: linear-gradient(to bottom, #238f5c 0%, #1a6844 100%);
     border-color: #5ee89a;
     color: #fff;
     box-shadow: 0 8px 24px rgba(42, 158, 96, 0.4);
     transform: translateY(-2px);

     &::before {
       left: 100%;
     }
   }

   &:active {
     transform: translateY(0);
   }

   i {
     font-size: 15px;
   }
}

// CaptchaOverlay Styles
.captcha-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 9, 13, 0.95);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.captcha-content {
  text-align: center;
  color: #fff;
  max-width: 400px;
  padding: 40px;
}

.captcha-icon {
  font-size: 64px;
  color: #236f87;
  margin-bottom: 24px;
}

.captcha-title {
  font: 800 32px 'Rajdhani', sans-serif;
  margin: 0 0 16px;
  letter-spacing: 1px;
}

.captcha-description {
  color: rgba(149, 207, 245, 0.7);
  font: 400 16px 'Rajdhani', sans-serif;
  margin: 0 0 32px;
  letter-spacing: 0.5px;
}

.captcha-button {
  background: linear-gradient(#236f87 0%, #1a5068 100%);
  border: 2px solid #2e7a9a;
  border-radius: 8px;
  color: #e0f4ff;
  cursor: pointer;
  font: 800 18px 'Rajdhani', sans-serif;
  letter-spacing: 2px;
  padding: 16px 40px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  opacity: 1;

  i {
    font-size: 16px;
  }

  &:disabled {
    opacity: 0.7;
    cursor: wait;
  }

  &:hover:not(:disabled) {
    background: linear-gradient(#2d8aa8 0%, #236f87 100%);
    border-color: #5ba4d4;
    color: #fff;
    box-shadow: 0 8px 24px rgba(35, 111, 135, 0.4);
    transform: translateY(-2px);
  }

  &:active:not(:disabled) {
    transform: translateY(0);
  }

  &.captcha-button--error {
    background: linear-gradient(#8a2323 0%, #681a1a 100%);
    border-color: #9a2e2e;

    &:hover {
      background: linear-gradient(#a82d2d 0%, #872323 100%);
      border-color: #d45b5b;
      box-shadow: 0 8px 24px rgba(135, 35, 35, 0.4);
    }
  }

  &.captcha-button--loading {
    opacity: 0.7;
  }
}
