@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300..800;1,300..800&family=Syne:wght@400..800&display=swap');

:root {
  /* High-end Aurora Color Palette */
  --color-bg-base: #07050f; /* Deep obsidian starry night */
  --color-card-bg: rgba(14, 11, 26, 0.45); /* Highly translucent violet-gray glass */
  --color-card-bg-hover: rgba(22, 18, 38, 0.6);
  
  /* Aurora Glow Colors */
  --color-accent-purple: #8b5cf6; /* Royal Violet */
  --color-accent-purple-glow: rgba(139, 92, 246, 0.15);
  
  --color-accent-cyan: #06b6d4; /* Cyber Cyan */
  --color-accent-cyan-glow: rgba(6, 182, 212, 0.15);
  
  --color-accent-rose: #ec4899; /* Radiant Rose Pink */
  --color-accent-rose-glow: rgba(236, 72, 153, 0.15);

  --color-accent-gold: #f59e0b; /* Warm Amber Gold */
  
  /* Text */
  --color-text-white: #ffffff;
  --color-text-primary: #f3f4f6;
  --color-text-secondary: #a7a9be;
  --color-text-muted: #6b7280;

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;

  /* Border Radii */
  --radius-xl: 32px;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-pill: 9999px;

  /* Global Transitions */
  --ease-spring: cubic-bezier(0.25, 1, 0.5, 1);
  --transition-slow: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-normal: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-fast: all 0.15s ease;
}

/* Base Settings & Core Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100vh;
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg-base);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

body.no-scroll {
  overflow: hidden;
}

/* Custom Interactive Selection & Scrollbars */
::selection {
  background: rgba(139, 92, 246, 0.3);
  color: var(--color-text-white);
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-base);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-pill);
  border: 3px solid var(--color-bg-base);
  transition: var(--transition-normal);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent-purple);
}

/* Interactive Ambient Background Elements */
.ambient-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 50px 50px;
  background-position: center;
  z-index: -1;
  pointer-events: none;
  opacity: 0.8;
}

.aurora-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: -2;
  filter: blur(150px);
  opacity: 0.18;
  mix-blend-mode: screen;
}

.aurora-glow-1 {
  top: -10%;
  left: 10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, var(--color-accent-purple) 0%, transparent 70%);
  animation: float-aurora-1 25s infinite alternate ease-in-out;
}

.aurora-glow-2 {
  bottom: -15%;
  right: 5%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--color-accent-cyan) 0%, transparent 70%);
  animation: float-aurora-2 30s infinite alternate ease-in-out;
}

.aurora-glow-3 {
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, var(--color-accent-rose) 0%, transparent 75%);
  animation: float-aurora-3 28s infinite alternate ease-in-out;
  opacity: 0.12;
}

@keyframes float-aurora-1 {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); }
  100% { transform: translate(60px, 40px) scale(1.15) rotate(15deg); }
}

@keyframes float-aurora-2 {
  0% { transform: translate(0, 0) scale(1.1) rotate(0deg); }
  100% { transform: translate(-80px, -50px) scale(0.9) rotate(-20deg); }
}

@keyframes float-aurora-3 {
  0% { transform: translate(-50%, -50%) rotate(0deg) scale(0.95); }
  100% { transform: translate(-45%, -55%) rotate(180deg) scale(1.1); }
}

/* Local Global Header Styles Override */
.header {
  background: rgba(7, 5, 15, 0.45);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
  height: 84px;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 60px;
  z-index: 1000;
  transition: var(--transition-slow);
}

.header.active {
  background: rgba(7, 5, 15, 0.95);
  border-bottom: 1px solid rgba(139, 92, 246, 0.35);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.logo {
  height: 38px;
  width: auto;
  cursor: pointer;
  transition: var(--transition-normal);
  filter: drop-shadow(0 0 0px transparent);
  border-radius: 0;
}

.logo:hover {
  filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.6));
  transform: scale(1.02);
}

.desktopNav {
  display: flex;
  gap: 36px;
  align-items: center;
}

.desktopNav a {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  position: relative;
  padding: 10px 0;
  transition: var(--transition-normal);
}

.desktopNav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent-purple), var(--color-accent-rose));
  transition: var(--transition-normal);
  transform: translateX(-50%);
  border-radius: 1px;
}

.desktopNav a:hover {
  color: var(--color-text-white);
  text-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

.desktopNav a:hover::after {
  width: 100%;
}

.burger {
  display: none;
  cursor: pointer;
  height: 26px;
  width: auto;
  border-radius: 0;
  transition: var(--transition-normal);
  filter: invert(100%) sepia(0%) saturate(0%) brightness(100%);
}

.burger:hover {
  transform: scale(1.1);
  filter: invert(53%) sepia(93%) saturate(1478%) hue-rotate(220deg) brightness(100%) contrast(100%);
}

/* Mobile Menu Styles Override */
.mobile-menu {
  display: none;
}

@media (max-width: 768px) {
  .header {
    padding: 0 30px;
    height: 76px;
  }
  .desktopNav {
    display: none;
  }
  .burger {
    display: block;
  }
  .mobile-menu {
    position: fixed;
    top: 76px;
    left: 0;
    width: 100%;
    height: calc(100vh - 76px);
    background: rgba(7, 5, 15, 0.96);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 40px;
    z-index: 999;
    box-sizing: border-box;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-slow);
  }
  .mobile-menu.active {
    display: flex;
    animation: fade-slide-down 0.4s var(--ease-spring) forwards;
  }
  .mobile-menu a {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: 100%;
    text-align: center;
    padding: 16px 0;
    transition: var(--transition-normal);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  }
  .mobile-menu a:hover {
    color: var(--color-text-white);
    background: rgba(139, 92, 246, 0.08);
    border-radius: var(--radius-md);
    transform: scale(1.05);
    text-shadow: 0 0 15px var(--color-accent-purple-glow);
  }
}

@keyframes fade-slide-down {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Main Container Layout */
main {
  padding-top: 140px;
  padding-bottom: 100px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: 24px;
  box-sizing: border-box;
  text-align: center;
}

@media (max-width: 1024px) {
  main {
    padding-top: 120px;
    padding-bottom: 80px;
  }
}

/* Premium Card Components (.tile) */
.tile {
  background: var(--color-card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  width: 100%;
  padding: 60px 40px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: var(--transition-slow);
  position: relative;
  overflow: hidden;
}

/* Multi-layered premium card styling on hover */
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
  opacity: 0.6;
  transition: var(--transition-normal);
  pointer-events: none;
}

.tile::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-xl);
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 40%, rgba(255, 255, 255, 0.03));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  transition: var(--transition-slow);
}

.tile:hover {
  background: var(--color-card-bg-hover);
  transform: translateY(-8px) scale(1.005);
  box-shadow: 
    0 30px 60px -20px rgba(0, 0, 0, 0.8),
    0 0 50px rgba(139, 92, 246, 0.1);
}

/* Specific glows for different cards based on hover */
.hero:hover {
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow: 
    0 30px 60px -20px rgba(0, 0, 0, 0.8),
    0 0 50px rgba(139, 92, 246, 0.2);
}

.skracacz:hover {
  border-color: rgba(6, 182, 212, 0.35);
  box-shadow: 
    0 30px 60px -20px rgba(0, 0, 0, 0.8),
    0 0 50px rgba(6, 182, 212, 0.2);
}

.szachy:hover {
  border-color: rgba(236, 72, 153, 0.35);
  box-shadow: 
    0 30px 60px -20px rgba(0, 0, 0, 0.8),
    0 0 50px rgba(236, 72, 153, 0.2);
}

.tile:hover::after {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), transparent 30%, rgba(255, 255, 255, 0.08));
}

.hero:hover::after {
  background: linear-gradient(135deg, var(--color-accent-purple), transparent 50%, rgba(139, 92, 246, 0.3));
}

.skracacz:hover::after {
  background: linear-gradient(135deg, var(--color-accent-cyan), transparent 50%, rgba(6, 182, 212, 0.3));
}

.szachy:hover::after {
  background: linear-gradient(135deg, var(--color-accent-rose), transparent 50%, rgba(236, 72, 153, 0.3));
}

/* Hero Section Styles */
.hero {
  margin-bottom: 40px;
  background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.1) 0%, var(--color-card-bg) 100%);
  border-color: rgba(139, 92, 246, 0.15);
}

/* Custom Interactive Micro-badges */
.cyber-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--color-accent-purple);
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  margin-bottom: 28px;
  text-transform: uppercase;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.05);
  transition: var(--transition-normal);
}

.cyber-badge:hover {
  transform: translateY(-2px);
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow: 0 4px 25px rgba(139, 92, 246, 0.15);
}

.cyber-badge.cyan {
  color: var(--color-accent-cyan);
  background: rgba(6, 182, 212, 0.08);
  border-color: rgba(6, 182, 212, 0.2);
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.05);
}

.cyber-badge.cyan:hover {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.35);
  box-shadow: 0 4px 25px rgba(6, 182, 212, 0.15);
}

.cyber-badge.purple {
  color: var(--color-accent-rose);
  background: rgba(236, 72, 153, 0.08);
  border-color: rgba(236, 72, 153, 0.2);
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.05);
}

.cyber-badge.purple:hover {
  background: rgba(236, 72, 153, 0.12);
  border-color: rgba(236, 72, 153, 0.35);
  box-shadow: 0 4px 25px rgba(236, 72, 153, 0.15);
}

/* Status indicator animation */
.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-accent-purple);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--color-accent-purple);
  animation: pulse-ring 2s infinite ease-in-out;
}

.cyber-badge.cyan .pulse-dot {
  background-color: var(--color-accent-cyan);
  box-shadow: 0 0 10px var(--color-accent-cyan);
}

.cyber-badge.purple .pulse-dot {
  background-color: var(--color-accent-rose);
  box-shadow: 0 0 10px var(--color-accent-rose);
}

@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; filter: brightness(1.2); }
  100% { transform: scale(0.8); opacity: 0.6; }
}

/* Premium Typography styling */
.tile h1 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--color-text-white) 30%, var(--color-text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.15;
}

.hero h1 {
  font-size: 3.8rem;
  background: linear-gradient(135deg, var(--color-text-white) 40%, var(--color-accent-purple) 75%, var(--color-accent-rose) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (max-width: 768px) {
  .tile h1 {
    font-size: 2rem;
  }
  .hero h1 {
    font-size: 2.6rem;
  }
}

.tile h2 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--color-text-secondary);
  margin-top: 0;
  margin-bottom: 36px;
  letter-spacing: 0.02em;
  max-width: 600px;
  line-height: 1.5;
}

/* Modern Preview Glass Wrapper */
.preview-wrapper {
  position: relative;
  display: inline-block;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  margin-bottom: 36px;
  transition: var(--transition-slow);
}

.preview-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at center, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
  opacity: 0;
  transition: var(--transition-slow);
  pointer-events: none;
}

.tile:hover .preview-wrapper {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-5px);
}

.hero:hover .preview-wrapper::before {
  opacity: 1;
}

.skracacz:hover .preview-wrapper::before {
  background: radial-gradient(circle at center, rgba(6, 182, 212, 0.12) 0%, transparent 70%);
  opacity: 1;
}

.szachy:hover .preview-wrapper::before {
  background: radial-gradient(circle at center, rgba(236, 72, 153, 0.12) 0%, transparent 70%);
  opacity: 1;
}

.preview {
  height: 128px;
  width: auto;
  object-fit: contain;
  transition: var(--transition-slow);
  display: block;
  border-radius: var(--radius-md);
}

.tile:hover .preview {
  transform: scale(1.05);
  filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.3));
}

/* Micro Corner Accent Elements */
.corner-tl, .corner-tr, .corner-bl, .corner-br {
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: rgba(255, 255, 255, 0.15);
  border-style: solid;
  transition: var(--transition-slow);
}

.corner-tl {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
  border-top-left-radius: 6px;
}

.corner-tr {
  top: -1px;
  right: -1px;
  border-width: 2px 2px 0 0;
  border-top-right-radius: 6px;
}

.corner-bl {
  bottom: -1px;
  left: -1px;
  border-width: 0 0 2px 2px;
  border-bottom-left-radius: 6px;
}

.corner-br {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
  border-bottom-right-radius: 6px;
}

.tile:hover .corner-tl,
.tile:hover .corner-tr,
.tile:hover .corner-bl,
.tile:hover .corner-br {
  width: 14px;
  height: 14px;
}

.hero:hover .corner-tl, .hero:hover .corner-tr, .hero:hover .corner-bl, .hero:hover .corner-br {
  border-color: var(--color-accent-purple);
}

.skracacz:hover .corner-tl, .skracacz:hover .corner-tr, .skracacz:hover .corner-bl, .skracacz:hover .corner-br {
  border-color: var(--color-accent-cyan);
}

.szachy:hover .corner-tl, .szachy:hover .corner-tr, .szachy:hover .corner-bl, .szachy:hover .corner-br {
  border-color: var(--color-accent-rose);
}

/* High-End Dynamic Action Buttons (.dark-button) */
.dark-button {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  color: var(--color-text-white);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  padding: 16px 36px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: var(--transition-slow);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
}

.dark-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: translateX(-100%);
  transition: var(--transition-normal);
}

.dark-button:hover::before {
  transform: translateX(100%);
  transition: all 0.75s ease;
}

.dark-button:hover {
  background: var(--color-text-white);
  color: var(--color-bg-base);
  border-color: var(--color-text-white);
  transform: translateY(-3px);
}

.hero .dark-button:hover {
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
}

.skracacz .dark-button:hover {
  box-shadow: 0 10px 30px rgba(6, 182, 212, 0.4);
}

.szachy .dark-button:hover {
  box-shadow: 0 10px 30px rgba(236, 72, 153, 0.4);
}

.btn-arrow {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: var(--transition-slow);
}

.dark-button:hover .btn-arrow {
  transform: translateX(5px);
}

/* Main Grid Layout */
#index_grid {
  width: 100%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  #index_grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* Local Global Footer Styles Override */
footer {
  background: rgba(7, 5, 15, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  padding: 40px 24px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  margin-top: auto;
  letter-spacing: 0.06em;
  position: relative;
  overflow: hidden;
}

footer a {
  color: var(--color-accent-purple);
  text-decoration: none;
  font-weight: 700;
  transition: var(--transition-normal);
}

footer a:hover {
  color: var(--color-accent-rose);
  text-shadow: 0 0 10px rgba(236, 72, 153, 0.4);
}
