/* CSS Variables */
:root {
  --felt-green: #0d5d2e;
  --felt-green-dark: #0a4a24;
  --felt-green-light: #1a7a3e;
  --gold: #ffd700;
  --gold-dark: #ccaa00;
  --card-red: #dc143c;
  --card-black: #1a1a1a;
  --cream: #f5f5dc;
  --cream-light: #fafafa;
  --white: #ffffff;
  --text-dark: #2c2c2c;
  --text-light: #666;
  --shadow: rgba(0, 0, 0, 0.3);
  --shadow-heavy: rgba(0, 0, 0, 0.5);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--cream-light);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--felt-green) 0%, var(--felt-green-dark) 100%);
  overflow: hidden;
  padding: 2rem;
}

.floating-cards {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
}

.card-float {
  position: absolute;
  font-size: 4rem;
  opacity: 0.3;
  animation: float 20s infinite ease-in-out;
}

.card-1 {
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.card-2 {
  top: 20%;
  right: 15%;
  animation-delay: 2s;
}

.card-3 {
  top: 60%;
  left: 20%;
  animation-delay: 4s;
}

.card-4 {
  bottom: 15%;
  right: 10%;
  animation-delay: 6s;
}

.card-5 {
  top: 40%;
  left: 5%;
  animation-delay: 8s;
}

.card-6 {
  bottom: 30%;
  right: 25%;
  animation-delay: 10s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(30px, -30px) rotate(5deg);
  }
  50% {
    transform: translate(-20px, 20px) rotate(-5deg);
  }
  75% {
    transform: translate(20px, 30px) rotate(3deg);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--white);
  animation: fadeInUp 1s ease-out;
}

.hero-title {
  font-family: 'Bangers', cursive;
  font-size: clamp(3rem, 8vw, 6rem);
  margin-bottom: 1rem;
  letter-spacing: 0.1em;
  text-shadow: 3px 3px 6px var(--shadow-heavy);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.suit {
  font-size: clamp(2rem, 6vw, 4rem);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.hero-subtitle {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--gold);
  text-shadow: 2px 2px 4px var(--shadow);
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  max-width: 600px;
  margin: 0 auto 2rem;
  opacity: 0.95;
  line-height: 1.8;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--gold);
  color: var(--felt-green-dark);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  border-radius: 50px;
  box-shadow: 0 4px 15px var(--shadow);
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--shadow-heavy);
  background: var(--gold-dark);
}

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

/* Section Styles */
section {
  padding: 5rem 0;
}

.section-title {
  font-family: 'Bangers', cursive;
  font-size: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
  margin-bottom: 3rem;
  color: var(--felt-green);
  letter-spacing: 0.05em;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 100px;
  height: 4px;
  background: var(--gold);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* Game Section */
.game-section {
  background: var(--white);
}

.game-content {
  max-width: 800px;
  margin: 0 auto;
}

.game-card {
  background: linear-gradient(135deg, var(--felt-green) 0%, var(--felt-green-light) 100%);
  color: var(--white);
  padding: 3rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px var(--shadow);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.game-card::before {
  content: '🃏';
  position: absolute;
  top: -20px;
  right: -20px;
  font-size: 10rem;
  opacity: 0.1;
  transform: rotate(15deg);
}

.game-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}

.game-description {
  font-size: 1.125rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.game-description:last-child {
  margin-bottom: 0;
}

/* Features Section */
.features-section {
  background: var(--cream);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.feature-card {
  perspective: 1000px;
  height: 300px;
}

.feature-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.feature-card:hover .feature-card-inner {
  transform: rotateY(180deg);
}

.feature-card-front,
.feature-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  box-shadow: 0 5px 20px var(--shadow);
}

.feature-card-front {
  background: var(--white);
  color: var(--felt-green);
}

.feature-card-back {
  background: var(--felt-green);
  color: var(--white);
  transform: rotateY(180deg);
}

.feature-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.feature-title {
  font-family: 'Bangers', cursive;
  font-size: 1.5rem;
  text-align: center;
  letter-spacing: 0.05em;
}

.feature-card-back p {
  text-align: center;
  line-height: 1.6;
  font-size: 1rem;
}

/* Legends Section */
.legends-section {
  background: var(--white);
}

.legends-subtitle {
  text-align: center;
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 3rem;
  font-style: italic;
}

.legends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.legend-card {
  background: var(--cream);
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  border: 3px solid transparent;
  box-shadow: 0 3px 10px var(--shadow);
}

.legend-card:hover {
  transform: translateY(-10px);
  border-color: var(--gold);
  box-shadow: 0 8px 25px var(--shadow);
}

.legend-emoji {
  font-size: 4rem;
  margin-bottom: 1rem;
  filter: drop-shadow(2px 2px 4px var(--shadow));
}

.legend-name {
  font-family: 'Bangers', cursive;
  font-size: 1.75rem;
  color: var(--felt-green);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.legend-role {
  color: var(--text-light);
  font-size: 0.9rem;
  font-style: italic;
}

/* Tech Section */
.tech-section {
  background: var(--felt-green);
  color: var(--white);
}

.tech-section .section-title {
  color: var(--gold);
}

.tech-section .section-title::after {
  background: var(--white);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.tech-item {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 15px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.tech-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
  border-color: var(--gold);
}

.tech-label {
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.tech-value {
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Footer */
.footer {
  background: var(--felt-green-dark);
  color: var(--white);
  padding: 3rem 0;
  text-align: center;
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
}

.footer-text {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.coffee {
  font-size: 1.5rem;
  display: inline-block;
  animation: rotate 3s infinite linear;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.footer-author {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.footer-author a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-author a:hover {
  color: var(--gold-dark);
  text-decoration: underline;
}

.footer-license {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.footer-links {
  margin-top: 1.5rem;
}

.footer-links a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--gold-dark);
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }

  section {
    padding: 3rem 0;
  }

  .hero-title {
    flex-direction: column;
    gap: 0.5rem;
  }

  .features-grid,
  .legends-grid,
  .tech-grid {
    grid-template-columns: 1fr;
  }

  .game-card {
    padding: 2rem 1.5rem;
  }

  .feature-card {
    height: 250px;
  }

  .legend-card {
    padding: 1.5rem;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .floating-cards {
    display: none;
  }
}

/* Scroll Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
