/*  
    ====================================
     STYLES FOR play.tpl
    ==================================== 
*/

/* === PAGE LAYOUT === */
.startgame-page {
  padding: 8rem 0 2rem;
}

.startgame-header {
  text-align: center;
  margin-bottom: 10rem;
}

.startgame-title {
  /* font-size: clamp(2rem, 5vw, 3.5rem); */
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.startgame-title-normal {
  color: var(--foreground);
}

.startgame-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--muted-foreground);
  margin-bottom: 0;
  animation-delay: 0.1s;
}

/* === STEPS GRID === */
.startgame-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  /* margin-bottom: 4rem; */
  margin: 0 10rem;
}

@media (min-width: 1920px) {
  .startgame-steps-grid {
    margin: 0 0rem;
  }
}

@media (max-width: 1920px) {
  .startgame-steps-grid {
    margin: 0 0rem;
  }
}

/* === STEP CARD === */
.startgame-step-card {
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: visible; /* ← ДОБАВЬ ЭТО */
}

/* === DROPDOWN === */
.startgame-dropdown {
  position: relative;
  z-index: 10; /* ← ДОБАВЬ ЭТО */
}

.startgame-dropdown-trigger {
  cursor: pointer;
  transition: all 0.3s ease;
}

.startgame-dropdown-icon {
  transition: transform 0.3s ease;
  transform: rotate(180deg);
}

.startgame-dropdown.active .startgame-dropdown-icon {
  transform: rotate(0deg);
}

.startgame-dropdown-menu {
  position: absolute;
  bottom: calc(100% + 0.5rem); /* ← ИЗМЕНИЛ С top НА bottom */
  left: 0;
  right: 0;
  padding: 1rem;
  background: var(--glass-bg-br);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px); /* ← ИЗМЕНИЛ С -10px НА 10px */
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.startgame-dropdown.active .startgame-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* .startgame-dropdown::before {
  content: '';
  position: absolute;
  top: -0.5rem;
  left: 0;
  right: 0;
  height: 0.5rem;
  z-index: 9998;
} */

/* === STEP HEADER === */
.startgame-step-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.startgame-step-icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.startgame-step-icon-1 {
  background: linear-gradient(135deg, hsl(302, 99%, 50%), hsl(302, 99%, 60%));
  box-shadow: 0 4px 20px hsla(302, 99%, 50%, 0.4);
}

.startgame-step-icon-2 {
  background: linear-gradient(135deg, hsl(180, 87%, 57%), hsl(180, 87%, 67%));
  box-shadow: 0 4px 20px hsla(180, 87%, 57%, 0.4);
}

.startgame-step-icon-3 {
  background: linear-gradient(135deg, hsl(302, 99%, 50%), hsl(180, 87%, 57%));
  box-shadow: 0 4px 20px hsla(302, 99%, 50%, 0.4);
}

.startgame-step-number {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  font-weight: 500;
}

.startgame-step-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
}

/* === STEP CONTENT === */
.startgame-step-content {
  flex-grow: 1;
}

.startgame-step-description {
  color: var(--muted-foreground);
  margin-bottom: 0;
  line-height: 1.6;
}

/* === STEP ACTION === */
.startgame-step-action {
  margin-top: 2rem;
}

.startgame-step-spacer {
  margin-top: 0;
}

/* === BUTTONS === */
.startgame-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  font-size: 1.125rem;
  text-decoration: none;
}

.startgame-btn span,
.startgame-btn svg {
  position: relative;
  z-index: 1;
}

/* === DISABLED BUTTON === */
.btn-disabled {
  background: var(--muted) !important;
  color: var(--muted-foreground) !important;
  border: 1px solid var(--border) !important;
  cursor: not-allowed !important;
  opacity: 0.5 !important;
  pointer-events: none !important;
}

.btn-disabled:hover {
  cursor: not-allowed !important;
  background: var(--muted) !important;
  color: var(--muted-foreground) !important;
  transform: none !important;
}

/* === DOWNLOAD BUTTONS === */
.startgame-download-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* === DROPDOWN WARNING === */
.startgame-dropdown-warning {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: hsla(45, 100%, 50%, 0.1);
  border-left: 3px solid hsl(45, 100%, 50%);
  border-radius: calc(var(--radius) - 4px);
  margin-bottom: 1rem;
}

.startgame-dropdown-warning svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.startgame-dropdown-warning-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(45, 100%, 50%);
  margin-bottom: 0.25rem;
}

.startgame-dropdown-warning-text {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

/* === DROPDOWN LINKS === */
.startgame-dropdown-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.startgame-dropdown-item {
  padding: 0.75rem 1rem;
  border-radius: calc(var(--radius) - 4px);
  color: var(--foreground);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s ease;
  font-size: 0.875rem;
}

.startgame-dropdown-item:hover {
  background: hsla(302, 99%, 50%, 0.1);
  color: var(--primary);
}

.startgame-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 0;
}

/* === SCROLL ARROW === */
.startgame-scroll-arrow {
  text-align: center;
  margin: 3rem 0 2rem;
}

.startgame-scroll-arrow a {
  display: inline-block;
  text-decoration: none;
}

.startgame-scroll-arrow svg {
  opacity: 0.6;
  transition: all 0.3s ease;
  animation: float 3s ease-in-out infinite;
}

.startgame-scroll-arrow a:hover svg {
  opacity: 1;
  stroke: var(--primary);
  transform: translateY(5px);
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* === REQUIREMENTS === */
.startgame-requirements {
  margin-top: 2rem;
  text-align: center;
}

.startgame-requirements-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.startgame-requirements-subtitle {
  font-size: 1rem;
  color: var(--muted-foreground);
}

/* === ANIMATIONS === */
@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-up {
  animation: slide-up 0.8s ease-out forwards;
  opacity: 0;
}

.text-gradient-primary {
  background: linear-gradient(135deg, hsl(302, 99%, 50%) 0%, hsl(180, 87%, 57%) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === FREE HIGHLIGHT ANIMATION === */
.free-highlight {
  position: relative;
  display: inline-block;
  font-weight: 700;
  /* font-size: 1.1em; */
  background: linear-gradient(
    45deg,
    #ff6b6b,
    #4ecdc4,
    #45b7d1,
    #96ceb4,
    #feca57,
    #ff9ff3,
    #54a0ff,
    #5f27cd
  );
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rainbow-flow 3s ease-in-out infinite, glow-pulse 2s ease-in-out infinite alternate;
  /* text-shadow: 0 0 20px rgba(255, 255, 255, 0.5); */
  filter: drop-shadow(0 0 8px rgba(255, 107, 107, 0.4));
}

@keyframes rainbow-flow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes glow-pulse {
  0% {
    filter: drop-shadow(0 0 8px rgba(255, 107, 107, 0.4)) brightness(1);
    transform: scale(1);
  }
  100% {
    filter: drop-shadow(0 0 15px rgba(78, 205, 196, 0.6)) brightness(1.1);
    transform: scale(1.02);
  }
}

/* .free-highlight::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(
    45deg,
    rgba(255, 107, 107, 0.3),
    rgba(78, 205, 196, 0.3),
    rgba(69, 183, 209, 0.3),
    rgba(150, 206, 180, 0.3),
    rgba(254, 202, 87, 0.3),
    rgba(255, 159, 243, 0.3),
    rgba(84, 160, 255, 0.3),
    rgba(95, 39, 205, 0.3)
  );
  background-size: 200% 200%;
  border-radius: 6px;
  z-index: -1;
  animation: rainbow-flow 3s ease-in-out infinite;
  opacity: 0.7;
  filter: blur(8px);
} */

/* === RESPONSIVE === */
@media (max-width: 1023px) {
  .startgame-steps-grid {
    grid-template-columns: 1fr;
  }
  
  .startgame-page {
    padding: 2rem 0 1rem;
  }
  
  .startgame-header {
    margin-bottom: 4rem;
  }
}

@media (max-width: 1920px) {
  .startgame-page {
    padding: 3rem 0 0;
    transform: scale(0.9);
  }

  .startgame-header {
    margin-bottom: 4rem;
  }
}

@media (min-width: 1024px) {
  .startgame-steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}