/*!
 * Board Gaming Theme CSS
 * Styleful default theme for board gaming documentation and tools
 * Features dice, cards, and classic board game aesthetics
 */

/* Board Gaming Color Variables */
:root {
  /* Primary Board Gaming Colors */
  --gaming-rich-red: #B71C1C;
  --gaming-deep-green: #1B5E20;
  --gaming-royal-blue: #0D47A1;
  --gaming-golden-yellow: #F57F17;
  --gaming-warm-brown: #3E2723;
  --gaming-ivory: #FFF8E1;
  --gaming-parchment: #F5F5DC;
  --gaming-dark-wood: #4A2C2A;
  
  /* Accent Colors */
  --gaming-dice-white: #FAFAFA;
  --gaming-dice-black: #212121;
  --gaming-silver: #CFD8DC;
  --gaming-bronze: #8D6E63;
  --gaming-copper: #BF6B00;
  
  /* Card and Board Colors */
  --gaming-card-face: #FFFDE7;
  --gaming-card-back: #3F51B5;
  --gaming-board-light: #8BC34A;
  --gaming-board-dark: #388E3C;
  
  /* Gradients */
  --gaming-gradient-warm: linear-gradient(135deg, var(--gaming-golden-yellow) 0%, var(--gaming-copper) 100%);
  --gaming-gradient-cool: linear-gradient(135deg, var(--gaming-royal-blue) 0%, var(--gaming-deep-green) 100%);
  --gaming-gradient-wood: linear-gradient(180deg, var(--gaming-warm-brown) 0%, var(--gaming-dark-wood) 100%);
  --gaming-gradient-card: linear-gradient(145deg, var(--gaming-card-face) 0%, var(--gaming-ivory) 100%);
  
  /* Shadows and Effects */
  --gaming-shadow-dice: 0 4px 8px rgba(0, 0, 0, 0.3), inset 0 1px 2px rgba(255, 255, 255, 0.2);
  --gaming-shadow-card: 0 6px 20px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
  --gaming-shadow-board: 0 8px 32px rgba(0, 0, 0, 0.2);
  --gaming-glow-warm: 0 0 20px rgba(245, 127, 23, 0.3);
  --gaming-glow-cool: 0 0 15px rgba(13, 71, 161, 0.2);
}

/* Base Gaming Theme Application */
.gaming-theme {
  background: var(--gaming-parchment);
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(245, 127, 23, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(13, 71, 161, 0.1) 0%, transparent 50%);
  min-height: 100vh;
  position: relative;
}

/* Section Styling - Card-like appearance */
.gaming-theme section {
  background: var(--gaming-gradient-card);
  border: 2px solid var(--gaming-bronze);
  border-radius: 12px;
  box-shadow: var(--gaming-shadow-card);
  margin: 1.5rem 0;
  padding: 2rem;
  position: relative;
  transition: all 0.3s ease;
}

.gaming-theme section:hover {
  transform: translateY(-2px);
  box-shadow: var(--gaming-shadow-board);
}

/* Section Headers with Dice Motif */
.gaming-theme section h1,
.gaming-theme section h2 {
  color: var(--gaming-rich-red);
  border-bottom: 3px solid var(--gaming-golden-yellow);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.gaming-theme section h1::before,
.gaming-theme section h2::before {
  content: "⚀";
  color: var(--gaming-rich-red);
  font-size: 1.2em;
  margin-right: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  animation: dice-roll 3s ease-in-out infinite;
}

/* Dice roll animation */
@keyframes dice-roll {
  0%, 90%, 100% { content: "⚀"; }
  15% { content: "⚁"; }
  30% { content: "⚂"; }
  45% { content: "⚃"; }
  60% { content: "⚄"; }
  75% { content: "⚅"; }
}

/* Different dice for different heading levels */
.gaming-theme section h2::before {
  animation-delay: 1s;
}

.gaming-theme section h3 {
  color: var(--gaming-deep-green);
  border-left: 4px solid var(--gaming-golden-yellow);
  padding-left: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.gaming-theme section h3::before {
  content: "♠";
  color: var(--gaming-deep-green);
  margin-right: 0.5rem;
  font-size: 1.1em;
}

/* Enhanced Typography */
.gaming-theme section p {
  color: var(--gaming-dark-wood);
  line-height: 1.7;
  margin-bottom: 1.2rem;
  text-align: justify;
}

/* List Styling - Game Board Squares */
.gaming-theme .list-group {
  border: none;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--gaming-shadow-card);
}

.gaming-theme .list-group-item {
  background: var(--gaming-card-face);
  border: 1px solid var(--gaming-bronze);
  border-left: 5px solid var(--gaming-royal-blue);
  padding: 1rem 1.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.gaming-theme .list-group-item:nth-child(even) {
  background: var(--gaming-ivory);
  border-left-color: var(--gaming-deep-green);
}

.gaming-theme .list-group-item:hover {
  background: var(--gaming-gradient-warm);
  border-left-color: var(--gaming-golden-yellow);
  transform: translateX(5px);
  box-shadow: 3px 0 8px rgba(0, 0, 0, 0.2);
}

.gaming-theme .list-group-item::before {
  content: "◆";
  color: var(--gaming-royal-blue);
  margin-right: 0.8rem;
  font-weight: bold;
}

.gaming-theme .list-group-item:nth-child(even)::before {
  content: "◇";
  color: var(--gaming-deep-green);
}

/* Link Styling */
.gaming-theme a {
  color: var(--gaming-royal-blue);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
}

.gaming-theme a:hover {
  color: var(--gaming-rich-red);
  text-shadow: 0 0 8px rgba(183, 28, 28, 0.4);
}

.gaming-theme a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: var(--gaming-gradient-warm);
  transition: width 0.3s ease;
}

.gaming-theme a:hover::after {
  width: 100%;
}

/* Header Enhancement */
.gaming-theme header {
  background: var(--gaming-gradient-cool) !important;
  border-bottom: 4px solid var(--gaming-golden-yellow);
  box-shadow: var(--gaming-shadow-board);
  position: relative;
}

.gaming-theme header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M30 30c0-11.046-8.954-20-20-20s-20 8.954-20 20 8.954 20 20 20 20-8.954 20-20zm0 0c0 11.046 8.954 20 20 20s20-8.954 20-20-8.954-20-20-20-20 8.954-20 20z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
  pointer-events: none;
}

/* Footer Enhancement */
.gaming-theme footer {
  background: var(--gaming-gradient-wood) !important;
  border-top: 4px solid var(--gaming-golden-yellow);
  color: var(--gaming-ivory) !important;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
}

/* Special Gaming Elements */
.gaming-theme .gaming-highlight {
  background: var(--gaming-gradient-warm);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-left: 6px solid var(--gaming-rich-red);
  box-shadow: var(--gaming-shadow-card);
}

.gaming-theme .gaming-highlight::before {
  content: "🎲 ";
  font-size: 1.2em;
  margin-right: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .gaming-theme section {
    margin: 1rem 0;
    padding: 1.5rem;
  }
  
  .gaming-theme section h1::before,
  .gaming-theme section h2::before {
    display: block;
    margin-bottom: 0.3rem;
    margin-right: 0;
  }
}

/* Print Styles */
@media print {
  .gaming-theme {
    background: white;
  }
  
  .gaming-theme section {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
  
  .gaming-theme section h1::before,
  .gaming-theme section h2::before,
  .gaming-theme section h3::before {
    color: black;
  }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
  .gaming-theme section,
  .gaming-theme .list-group-item,
  .gaming-theme a,
  .gaming-theme section h1::before,
  .gaming-theme section h2::before {
    animation: none;
    transition: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .gaming-theme section {
    border-width: 3px;
  }
  
  .gaming-theme section h1,
  .gaming-theme section h2 {
    border-bottom-width: 4px;
  }
}