/* Chess Tic-Tac-Toe - Professional Chess Theme */

:root {
  /* Chess Color Palette */
  --chess-light: #f0d9b5;
  --chess-dark: #b58863;
  --chess-board-border: #8b6914;
  --chess-gold: #daa520;
  --chess-deep-gold: #b8860b;
  
  /* Royal Colors */
  --royal-white: #faf8f3;
  --royal-black: #2c2c2c;
  --royal-purple: #663399;
  --royal-blue: #1e3a8a;
  --royal-red: #dc2626;
  
  /* Modern UI Colors */
  --bg-primary: #1a1a1a;
  --bg-secondary: #2a2a2a;
  --bg-card: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  
  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  
  /* Shadows & Effects */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Animation Timing */
  --transition-fast: 150ms ease-out;
  --transition-normal: 250ms ease-out;
  --transition-slow: 350ms ease-out;
  --transition-bounce: 350ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.chess-pattern {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.03;
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 20px, #000 20px, #000 40px),
    repeating-linear-gradient(-45deg, transparent, transparent 20px, #000 20px, #000 40px);
  pointer-events: none;
  z-index: -1;
}

.app {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

/* Header Styles */
.game-header {
  text-align: center;
  margin-bottom: 2rem;
}

.title-section {
  animation: slideInFromTop var(--transition-slow);
}

.game-title {
  font-family: 'Crimson Text', serif;
  font-size: 3.5rem;
  font-weight: 600;
  color: var(--royal-purple);
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.chess-icon {
  font-size: 3rem;
  color: var(--chess-gold);
  animation: glow 3s ease-in-out infinite alternate;
}

.game-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Status Section */
.game-status {
  margin-bottom: 2rem;
  animation: slideInFromLeft var(--transition-slow) 0.1s both;
}

.status-cards {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.status-card {
  background: var(--bg-card);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  min-width: 180px;
  text-align: center;
  transition: all var(--transition-normal);
  border: 2px solid transparent;
}

.status-card.current-turn {
  border-color: var(--info);
  background: linear-gradient(135deg, #dbeafe 0%, #f0f9ff 100%);
}

.status-card.game-phase {
  border-color: var(--warning);
  background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
}

.status-card.winner-card {
  border-color: var(--success);
  background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 100%);
  animation: victory-pulse 1s ease-in-out infinite alternate;
}

.status-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.status-value {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Game Controls */
.game-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2rem;
  animation: slideInFromRight var(--transition-slow) 0.2s both;
}

.action-panel, .hand-panel {
  background: var(--bg-card);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid #e5e7eb;
}

.panel-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-align: center;
}

.action-buttons {
  display: flex;
  gap: 0.75rem;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
  min-width: 80px;
}

.action-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--info);
}

.action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f9fafb;
}

.action-btn.active {
  border-color: var(--info);
  background: linear-gradient(135deg, #dbeafe 0%, #f0f9ff 100%);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-icon {
  font-size: 1.5rem;
}

.btn-text {
  font-size: 0.875rem;
  font-weight: 600;
}

/* Hand Panel */
.piece-collection {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  min-width: 240px;
}

.hand-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.hand-card:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--chess-gold);
}

.hand-card:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #f9fafb;
}

.hand-card.selected {
  border-color: var(--chess-gold);
  background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

/* Game Message */
.game-message {
  background: var(--bg-card);
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  font-weight: 500;
  color: var(--danger);
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fee2e2;
  box-shadow: var(--shadow-sm);
}

.game-message:empty {
  display: none;
}

/* Battlefield Section */
.battlefield {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
  animation: slideInFromBottom var(--transition-slow) 0.3s both;
}

.board-wrapper {
  position: relative;
}

.chess-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: var(--chess-board-border);
  padding: 1.25rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
  max-width: 420px;
  margin: 0 auto;
}

.chess-board::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(218, 165, 32, 0.1) 0%, rgba(184, 134, 11, 0.1) 100%);
  pointer-events: none;
}

.square {
  position: relative;
  aspect-ratio: 1;
  border: none;
  border-radius: 0.5rem;
  padding: 0.625rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  background: var(--chess-light);
  color: var(--text-primary);
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 85px;
  overflow: hidden;
}

.square:nth-child(odd) {
  background: var(--chess-light);
}

.square:nth-child(even) {
  background: var(--chess-dark);
}

.square:hover:not(.occupied) {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, #fff 0%, var(--chess-light) 100%);
}

.square.selected {
  transform: scale(1.05);
  box-shadow: 0 0 0 4px var(--info), var(--shadow-xl);
  background: linear-gradient(135deg, #dbeafe 0%, #f0f9ff 100%);
  animation: selected-pulse 1.5s ease-in-out infinite;
}

.square.targetable {
  animation: targetable-glow 1.5s ease-in-out infinite;
  box-shadow: 0 0 0 3px var(--success), var(--shadow-lg);
}

.square.occupied {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Chess Pieces */
.piece {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  animation: piece-appear var(--transition-bounce);
}

.piece-symbol {
  font-size: clamp(1.2rem, 6vw, 2.5rem);
  line-height: 1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  transition: font-size var(--transition-normal);
}

.piece-symbol.white {
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.piece-symbol.black {
  color: var(--royal-black);
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
}

.badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-block;
  border: 2px solid;
  animation: badge-spin 0.5s ease-out;
}

.badge.white {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-color: var(--chess-board-border);
}

.badge.black {
  background: linear-gradient(135deg, var(--royal-black) 0%, #1f2937 100%);
  border-color: var(--chess-gold);
}

/* Board Coordinates - Hidden for cleaner UI */
.board-coordinates {
  display: none;
}

.coord-numbers, .coord-letters {
  display: none;
}

.coord-numbers span, .coord-letters span {
  display: none;
}

.coord {
  display: none;
}

/* Game Guide */
.game-guide {
  background: var(--bg-card);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid #e5e7eb;
  height: fit-content;
  position: sticky;
  top: 2rem;
}

.guide-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--royal-purple);
  margin-bottom: 1.5rem;
  text-align: center;
}

.rules-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.rule-section {
  border-bottom: 1px solid #f3f4f6;
  padding-bottom: 1rem;
}

.rule-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.rule-section h4 {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.rule-section p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.rule-list {
  list-style: none;
  padding-left: 0;
}

.rule-list li {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  padding-left: 1rem;
  position: relative;
}

.rule-list li::before {
  content: '♦';
  position: absolute;
  left: 0;
  color: var(--chess-gold);
  font-weight: bold;
}

/* Piece Legend */
.piece-legend {
  margin-top: 1rem;
}

.legend-pieces {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.legend-piece {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: #f8fafc;
}

.piece-name {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.875rem;
}

/* New Game Button */
.new-game-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 3rem;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-xl);
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.new-game-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.new-game-btn span:first-child {
  font-size: 1.25rem;
}

/* Piece Selector Modal */
.piece-selector-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modal-appear var(--transition-normal) ease-out;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg-card);
  border-radius: 1rem;
  box-shadow: var(--shadow-xl);
  max-width: 400px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  border: 2px solid var(--chess-gold);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, var(--chess-light) 0%, var(--chess-gold) 100%);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--royal-black);
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  font-weight: bold;
  color: var(--royal-black);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: scale(1.1);
}

.modal-body {
  padding: 1.5rem;
}

.piece-options {
  display: grid;
  gap: 0.75rem;
}

.piece-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: left;
  font-family: inherit;
}

.piece-option:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--chess-gold);
  background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
}

.piece-option:focus {
  outline: none;
  border-color: var(--info);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.piece-option .piece-symbol {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  line-height: 1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.piece-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.piece-info strong {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.piece-info span {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Tutorial Modal */
.tutorial-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modal-appear var(--transition-normal) ease-out;
  pointer-events: all;
  padding: 1rem;
}

.tutorial-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(102, 51, 153, 0.95) 0%, rgba(31, 58, 138, 0.95) 100%);
  backdrop-filter: blur(8px);
}

.tutorial-content {
  position: relative;
  background: var(--bg-card);
  border-radius: 1.5rem;
  box-shadow: var(--shadow-xl);
  max-width: 600px;
  width: 100%;
  max-height: calc(100vh - 2rem);
  overflow: hidden;
  border: 3px solid var(--chess-gold);
  animation: tutorial-content-appear 0.5s ease-out 0.2s both;
}

.tutorial-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 2px solid #e5e7eb;
  background: linear-gradient(135deg, var(--chess-light) 0%, var(--chess-gold) 100%);
}

.tutorial-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--royal-black);
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
}

.tutorial-close {
  background: none;
  border: none;
  font-size: 2rem;
  font-weight: bold;
  color: var(--royal-black);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  touch-action: manipulation;
}

.tutorial-close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: scale(1.1);
}

.tutorial-body {
  padding: 2rem;
  min-height: 300px;
  position: relative;
  overflow-y: auto;
  max-height: calc(100vh - 200px);
}

.tutorial-step {
  display: none;
  animation: tutorial-step-fade-in 0.3s ease-out;
}

.tutorial-step.active {
  display: block;
}

.tutorial-step-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.tutorial-step-number {
  background: linear-gradient(135deg, var(--royal-purple) 0%, #663399 100%);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
  box-shadow: var(--shadow-md);
}

.tutorial-step-header h4 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.tutorial-step-content {
  color: var(--text-secondary);
  line-height: 1.6;
}

.tutorial-step-content p {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.tutorial-step-content ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.5rem;
}

.tutorial-step-content li {
  margin-bottom: 0.75rem;
  padding-left: 0;
  font-size: 0.95rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.tutorial-highlight {
  background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
  border: 2px solid var(--chess-gold);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.tutorial-footer {
  border-top: 2px solid #e5e7eb;
  padding: 1.5rem 2rem;
  background: #f8fafc;
}

.tutorial-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.tutorial-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
}

.tutorial-btn.primary {
  background: linear-gradient(135deg, var(--royal-purple) 0%, #663399 100%);
  color: white;
  box-shadow: var(--shadow-md);
}

.tutorial-btn.secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 2px solid #e5e7eb;
}

.tutorial-btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
}

.tutorial-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.tutorial-btn.primary:hover:not(:disabled) {
  box-shadow: var(--shadow-lg);
}

.tutorial-btn.secondary:hover:not(:disabled) {
  border-color: var(--chess-gold);
  background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
}

.tutorial-dots {
  display: flex;
  gap: 0.5rem;
}

.tutorial-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d1d5db;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.tutorial-dot.active {
  background: var(--royal-purple);
  transform: scale(1.2);
}

.tutorial-dot:hover {
  background: var(--chess-gold);
  transform: scale(1.1);
}

.tutorial-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tutorial-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.tutorial-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid #d1d5db;
  background: var(--bg-card);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.tutorial-checkbox input[type="checkbox"]:checked {
  background: var(--royal-purple);
  border-color: var(--royal-purple);
}

.tutorial-checkbox:hover input[type="checkbox"] {
  border-color: var(--chess-gold);
}

/* Victory Celebration Modal */
.victory-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: victory-modal-appear 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: all;
}

.victory-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.95) 0%, rgba(5, 150, 105, 0.95) 100%);
  backdrop-filter: blur(8px);
}

.victory-content {
  position: relative;
  background: var(--bg-card);
  border-radius: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 500px;
  width: 90%;
  text-align: center;
  overflow: hidden;
  border: 4px solid var(--chess-gold);
  animation: victory-content-bounce 1s ease-out 0.3s both;
}

.victory-header {
  background: linear-gradient(135deg, var(--chess-gold) 0%, var(--chess-deep-gold) 100%);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.victory-crown {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: crown-bounce 1s ease-in-out infinite alternate;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.victory-title {
  font-family: 'Crimson Text', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--royal-black);
  margin: 0;
  text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.3);
  animation: victory-text-glow 2s ease-in-out infinite alternate;
}

.victory-subtitle {
  font-size: 1.2rem;
  color: var(--royal-black);
  margin: 0.5rem 0 0 0;
  font-weight: 500;
  opacity: 0.8;
}

.victory-body {
  padding: 2rem;
  background: var(--bg-card);
}

.victory-message {
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.victory-stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 1rem;
  border: 2px solid #e5e7eb;
}

.victory-stat {
  text-align: center;
}

.victory-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--royal-purple);
  margin-bottom: 0.25rem;
}

.victory-stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.victory-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.victory-btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
}

.victory-btn.primary {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  color: white;
  box-shadow: var(--shadow-lg);
}

.victory-btn.secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 2px solid #e5e7eb;
}

.victory-btn:hover {
  transform: translateY(-2px) scale(1.05);
}

.victory-btn.primary:hover {
  box-shadow: var(--shadow-xl);
}

.victory-btn.secondary:hover {
  border-color: var(--chess-gold);
  background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
}

/* Confetti Animation */
.confetti-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  animation: confetti-fall linear infinite;
}

.confetti-piece:nth-child(odd) {
  background: var(--chess-gold);
  border-radius: 50%;
}

.confetti-piece:nth-child(even) {
  background: var(--royal-purple);
}

.confetti-piece:nth-child(3n) {
  background: var(--success);
  transform: rotate(45deg);
}

.confetti-piece:nth-child(4n) {
  background: var(--info);
  border-radius: 50%;
  width: 8px;
  height: 8px;
}

.confetti-piece:nth-child(5n) {
  background: var(--warning);
  width: 10px;
  height: 10px;
}

/* Fireworks Effect */
.fireworks-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

.firework {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  animation: firework-burst 1.5s ease-out infinite;
}

.firework:nth-child(1n) { background: var(--chess-gold); }
.firework:nth-child(2n) { background: var(--royal-purple); }
.firework:nth-child(3n) { background: var(--success); }
.firework:nth-child(4n) { background: var(--info); }
.firework:nth-child(5n) { background: var(--warning); }

/* Utility Classes */
.hidden {
  display: none !important;
}

/* Animations */
@keyframes slideInFromTop {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

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

@keyframes glow {
  from {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  }
  to {
    text-shadow: 0 0 20px var(--chess-gold), 2px 2px 4px rgba(0, 0, 0, 0.1);
  }
}

@keyframes victory-pulse {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.02);
  }
}

@keyframes selected-pulse {
  0%, 100% {
    box-shadow: 0 0 0 4px var(--info), var(--shadow-xl);
  }
  50% {
    box-shadow: 0 0 0 6px var(--info), var(--shadow-xl);
  }
}

@keyframes targetable-glow {
  0%, 100% {
    box-shadow: 0 0 0 3px var(--success), var(--shadow-lg);
  }
  50% {
    box-shadow: 0 0 0 5px var(--success), var(--shadow-xl);
  }
}

@keyframes piece-appear {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes badge-spin {
  from {
    transform: rotate(-180deg) scale(0.8);
  }
  to {
    transform: rotate(0deg) scale(1);
  }
}

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

/* Victory Celebration Keyframes */
@keyframes victory-modal-appear {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(8px);
  }
}

@keyframes victory-content-bounce {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(-50px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes crown-bounce {
  from {
    transform: translateY(0) rotate(-5deg);
  }
  to {
    transform: translateY(-10px) rotate(5deg);
  }
}

@keyframes victory-text-glow {
  from {
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.3);
  }
  to {
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.3), 0 0 20px rgba(218, 165, 32, 0.6);
  }
}

@keyframes confetti-fall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

@keyframes firework-burst {
  0% {
    transform: scale(0) translateX(0) translateY(0);
    opacity: 1;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: scale(1) translateX(var(--random-x, 50px)) translateY(var(--random-y, 50px));
    opacity: 0;
  }
}

@keyframes tutorial-content-appear {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-30px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes tutorial-step-fade-in {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Enhanced Mobile-First Responsive Design */

/* Tutorial Mobile Responsiveness */
@media (max-width: 768px) {
  .tutorial-modal {
    padding: 0.75rem;
    align-items: flex-start;
    padding-top: 2rem;
  }
  
  .tutorial-content {
    max-width: 100%;
    max-height: calc(100vh - 1.5rem);
    border-radius: 1rem;
    border-width: 2px;
  }
  
  .tutorial-header {
    padding: 1rem 1.25rem;
  }
  
  .tutorial-header h3 {
    font-size: 1.25rem;
  }
  
  .tutorial-close {
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
  }
  
  .tutorial-body {
    padding: 1.5rem;
    min-height: 200px;
    max-height: calc(100vh - 240px);
  }
  
  .tutorial-step-header {
    gap: 0.75rem;
    margin-bottom: 1rem;
  }
  
  .tutorial-step-number {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  
  .tutorial-step-header h4 {
    font-size: 1.125rem;
  }
  
  .tutorial-step-content p {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
  }
  
  .tutorial-step-content li {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }
  
  .tutorial-highlight {
    padding: 0.75rem;
    font-size: 0.85rem;
  }
  
  .tutorial-footer {
    padding: 1rem 1.25rem;
  }
  
  .tutorial-navigation {
    margin-bottom: 1rem;
  }
  
  .tutorial-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
  }
  
  .tutorial-dots {
    gap: 0.4rem;
  }
  
  .tutorial-dot {
    width: 10px;
    height: 10px;
  }
  
  .tutorial-checkbox {
    font-size: 0.85rem;
  }
  
  .tutorial-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 480px) {
  .tutorial-modal {
    padding: 0.5rem;
    padding-top: 1rem;
  }
  
  .tutorial-content {
    border-radius: 0.75rem;
    max-height: calc(100vh - 1rem);
  }
  
  .tutorial-header {
    padding: 0.75rem 1rem;
  }
  
  .tutorial-header h3 {
    font-size: 1.125rem;
  }
  
  .tutorial-close {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
  
  .tutorial-body {
    padding: 1rem;
    min-height: 150px;
    max-height: calc(100vh - 200px);
  }
  
  .tutorial-step-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }
  
  .tutorial-step-number {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
  
  .tutorial-step-header h4 {
    font-size: 1rem;
  }
  
  .tutorial-step-content p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }
  
  .tutorial-step-content li {
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
  }
  
  .tutorial-highlight {
    padding: 0.6rem;
    font-size: 0.8rem;
  }
  
  .tutorial-footer {
    padding: 0.75rem 1rem;
  }
  
  .tutorial-navigation {
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }
  
  .tutorial-btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
  
  .tutorial-actions {
    flex-direction: column-reverse;
    gap: 0.75rem;
    align-items: center;
  }
  
  .tutorial-checkbox {
    font-size: 0.8rem;
  }
  
  .tutorial-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
  }
}

/* Landscape orientation for tutorial */
@media (max-height: 600px) and (orientation: landscape) {
  .tutorial-modal {
    align-items: flex-start;
    padding-top: 0.5rem;
  }
  
  .tutorial-content {
    max-height: calc(100vh - 1rem);
  }
  
  .tutorial-body {
    max-height: calc(100vh - 160px);
    padding: 1rem 1.5rem;
  }
  
  .tutorial-step-header {
    margin-bottom: 0.75rem;
  }
  
  .tutorial-step-content p {
    margin-bottom: 0.5rem;
  }
  
  .tutorial-footer {
    padding: 0.75rem 1.5rem;
  }
}

/* Quick Rules Access Button */
.rules-toggle-btn {
  display: none;
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, var(--royal-purple) 0%, #663399 100%);
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
  z-index: 100;
}

.rules-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-xl);
}

/* Touch-friendly improvements for all mobile devices */
@media (max-width: 1200px) {
  .battlefield {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .board-wrapper {
    order: 1; /* Board comes first on mobile */
  }
  
  .game-guide {
    position: static;
    order: 2; /* Rules come after board on mobile */
  }
  
  .rules-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Better touch targets */
  .square {
    min-height: 70px;
  }
  
  .action-btn, .hand-card {
    min-height: 48px; /* WCAG recommended touch target */
  }
}

/* Tablet and smaller laptops */
@media (max-width: 768px) {
  .app {
    padding: 1rem;
  }
  
  .game-title {
    font-size: 2.5rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .chess-icon {
    font-size: 2rem;
  }
  
  .game-controls {
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: center;
  }
  
  .status-cards {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }
  
  .status-card {
    min-width: 280px;
    width: 100%;
    max-width: 400px;
  }
  
  .piece-collection {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .hand-card {
    padding: 1rem;
    font-size: 0.9rem;
  }
  
  /* Larger board for easier touch interaction */
  .chess-board {
    padding: 0.75rem;
    gap: 3px;
    max-width: 400px;
    margin: 0 auto;
  }
  
  .square {
    min-height: 75px;
    padding: 0.5rem;
  }
  
  
  /* Hide coordinates on smaller screens for cleaner look */
  .board-coordinates {
    display: none;
  }
  
  .coord {
    font-size: 0.6rem;
  }
}

/* Mobile phones (portrait) */
@media (max-width: 480px) {
  .app {
    padding: 0.75rem;
  }
  
  .game-header {
    margin-bottom: 1rem;
  }
  
  .game-title {
    font-size: 2rem;
    text-align: center;
  }
  
  .chess-icon {
    font-size: 1.5rem;
  }
  
  .game-subtitle {
    font-size: 1rem;
    text-align: center;
  }
  
  /* Compact status cards */
  .status-card {
    min-width: 100%;
    padding: 1rem 0.75rem;
  }
  
  .status-label {
    font-size: 0.75rem;
  }
  
  .status-value {
    font-size: 1rem;
  }
  
  /* Simplified controls layout */
  .game-controls {
    gap: 0.75rem;
  }
  
  .action-panel, .hand-panel {
    padding: 1rem;
  }
  
  .panel-title {
    font-size: 1rem;
    margin-bottom: 0.75rem;
  }
  
  .action-buttons {
    gap: 0.5rem;
  }
  
  .action-btn {
    padding: 0.75rem 0.5rem;
    min-width: 70px;
  }
  
  .btn-icon {
    font-size: 1.25rem;
  }
  
  .btn-text {
    font-size: 0.75rem;
  }
  
  /* Single column piece collection for very small screens */
  .piece-collection {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .hand-card {
    padding: 0.75rem;
    justify-content: space-between;
  }
  
  /* Optimized chess board for mobile */
  .chess-board {
    padding: 0.5rem;
    gap: 2px;
    max-width: 320px;
    width: 100%;
  }
  
  .square {
    min-height: 65px;
    padding: 0.25rem;
    border-radius: 0.25rem;
  }
  
  
  /* Compact game message */
  .game-message {
    padding: 0.75rem;
    font-size: 0.9rem;
    min-height: 2.5rem;
  }
  
  /* Simplified game guide for mobile */
  .game-guide {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .guide-title {
    font-size: 1.125rem;
  }
  
  .rules-content {
    gap: 1rem;
  }
  
  .rule-section h4 {
    font-size: 0.95rem;
  }
  
  .rule-section p, .rule-list li {
    font-size: 0.85rem;
  }
  
  /* Hide piece legend on very small screens to save space */
  .piece-legend {
    display: none;
  }
  
  /* Adjust new game button for mobile */
  .new-game-btn {
    bottom: 1rem;
    right: 1rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* Very small screens (landscape phones) */
@media (max-width: 380px) {
  .game-title {
    font-size: 1.75rem;
  }
  
  .chess-icon {
    font-size: 1.25rem;
  }
  
  .chess-board {
    max-width: 280px;
  }
  
  .square {
    min-height: 55px;
  }
  
  
  .status-card {
    padding: 0.75rem 0.5rem;
  }
}

/* Landscape orientation optimizations */
@media (max-height: 600px) and (orientation: landscape) {
  .app {
    padding: 0.5rem;
  }
  
  .game-header {
    margin-bottom: 0.5rem;
  }
  
  .game-status {
    margin-bottom: 1rem;
  }
  
  .status-cards {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .status-card {
    min-width: 150px;
    padding: 0.75rem;
  }
  
  .battlefield {
    grid-template-columns: 1fr 300px;
    gap: 1rem;
    align-items: start;
  }
  
  .game-guide {
    order: 0;
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
  }
  
  .chess-board {
    max-width: 350px;
  }
}

/* High DPI displays (Retina) optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .piece-symbol {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
  }
  
  .square {
    border-radius: 0.375rem; /* Slightly larger radius for crisp edges */
  }
}

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

/* Dark mode support with proper contrast */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --chess-light-dark: #a67c52;
    --chess-dark-dark: #7a5a3f;
  }
  
  body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text-primary);
  }
  
  .chess-pattern {
    opacity: 0.01;
  }
  
  /* Card backgrounds and text */
  .status-card, .action-panel, .hand-panel, .game-guide, .game-message {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: #475569;
  }
  
  /* Ensure all text elements are visible */
  .game-title {
    color: #a855f7; /* Lighter purple for dark mode */
  }
  
  .game-subtitle {
    color: var(--text-secondary);
  }
  
  .status-label {
    color: var(--text-secondary);
  }
  
  .status-value {
    color: var(--text-primary);
  }
  
  .panel-title {
    color: var(--text-primary);
  }
  
  .guide-title {
    color: #a855f7;
  }
  
  .rule-section h4 {
    color: var(--text-primary);
  }
  
  .rule-section p, .rule-list li {
    color: var(--text-secondary);
  }
  
  .piece-name {
    color: var(--text-primary);
  }
  
  /* Chess board colors for dark mode */
  .square {
    color: var(--text-primary);
  }
  
  .square:nth-child(odd) {
    background: var(--chess-light-dark);
  }
  
  .square:nth-child(even) {
    background: var(--chess-dark-dark);
  }
  
  /* Button states */
  .action-btn {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: #475569;
  }
  
  .action-btn:disabled {
    background: #1e293b;
    color: var(--text-muted);
  }
  
  .hand-card {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: #475569;
  }
  
  .hand-card:disabled {
    background: #1e293b;
    color: var(--text-muted);
  }
  
  /* Coordinate text */
  .coord {
    color: var(--text-muted);
  }
  
  .coord-numbers span, .coord-letters span {
    color: var(--text-secondary);
  }
  
  /* Message text */
  .game-message {
    background: var(--bg-card);
    color: #ef4444; /* Keep error messages red but ensure visibility */
    border-color: #7f1d1d;
  }
  
  .game-message:empty {
    border-color: #475569;
  }
  
  /* Special status card backgrounds for dark mode */
  .status-card.current-turn {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    border-color: #3b82f6;
    color: var(--text-primary);
  }
  
  .status-card.game-phase {
    background: linear-gradient(135deg, #d97706 0%, #ea580c 100%);
    border-color: #f59e0b;
    color: var(--text-primary);
  }
  
  .status-card.winner-card {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border-color: #10b981;
    color: var(--text-primary);
  }
  
  /* Active button states for dark mode */
  .action-btn.active {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    border-color: #3b82f6;
    color: var(--text-primary);
  }
  
  .hand-card.selected {
    background: linear-gradient(135deg, #d97706 0%, #ea580c 100%);
    border-color: var(--chess-gold);
    color: var(--text-primary);
  }
}

/* Developer Section Styles */
.developer-section {
  background: linear-gradient(135deg, var(--bg-card) 0%, #f8fafc 100%);
  border-top: 3px solid var(--chess-gold);
  margin-top: 3rem;
  padding: 2rem 0;
  animation: slideInFromBottom var(--transition-slow) 0.4s both;
}

.developer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: center;
}

.developer-info {
  padding: 2rem;
  background: var(--bg-card);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  border: 1px solid #e5e7eb;
  position: relative;
  overflow: hidden;
}

.developer-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, var(--royal-purple) 0%, var(--chess-gold) 100%);
}

.developer-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--royal-purple);
  margin-bottom: 1.5rem;
  text-align: center;
  font-family: 'Crimson Text', serif;
}

.developer-name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.crown-icon {
  font-size: 1.5rem;
  animation: crown-bounce 2s ease-in-out infinite alternate;
}

.developer-name strong {
  color: var(--text-primary);
  font-weight: 700;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.developer-description {
  color: var(--text-secondary);
  line-height: 1.6;
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.developer-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.dev-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--bg-card);
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.dev-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

.dev-link.portfolio-link:hover {
  border-color: var(--info);
  background: linear-gradient(135deg, #dbeafe 0%, #f0f9ff 100%);
  color: var(--info);
}

.dev-link.twitter-link:hover {
  border-color: #1da1f2;
  background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
  color: #1da1f2;
}

.link-icon {
  font-size: 1.125rem;
}

.developer-signature {
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--chess-light) 0%, var(--chess-gold) 100%);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--chess-deep-gold);
}

.signature-text {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--royal-black);
  margin-bottom: 0.5rem;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.3);
}

.copyright {
  font-size: 0.875rem;
  color: var(--royal-black);
  opacity: 0.8;
  font-weight: 500;
}

/* Responsive Developer Section */
@media (max-width: 768px) {
  .developer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
  }
  
  .developer-section {
    padding: 1.5rem 0;
    margin-top: 2rem;
  }
  
  .developer-info, .developer-signature {
    padding: 1.5rem;
  }
  
  .developer-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }
  
  .developer-name {
    font-size: 1.125rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .developer-description {
    font-size: 0.95rem;
  }
  
  .developer-links {
    flex-direction: column;
    align-items: center;
  }
  
  .dev-link {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .developer-section {
    margin-top: 1.5rem;
    padding: 1rem 0;
  }
  
  .developer-content {
    padding: 0 0.75rem;
  }
  
  .developer-info, .developer-signature {
    padding: 1rem;
  }
  
  .developer-title {
    font-size: 1.125rem;
  }
  
  .developer-name {
    font-size: 1rem;
  }
  
  .developer-description {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }
  
  .signature-text {
    font-size: 1rem;
  }
  
  .copyright {
    font-size: 0.8rem;
  }
}

/* Simple Footer Styles */
.simple-footer {
  text-align: center;
  padding: 2rem;
  margin-top: 3rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-top: 2px solid var(--chess-gold);
}

.simple-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.5;
  transition: all var(--transition-normal);
  display: inline-block;
}

.simple-footer a:hover {
  color: var(--royal-purple);
  transform: translateY(-2px);
}

/* Dark mode simple footer */
@media (prefers-color-scheme: dark) {
  .simple-footer {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-color: var(--chess-gold);
  }
  
  .simple-footer a {
    color: var(--text-secondary);
  }
  
  .simple-footer a:hover {
    color: #a855f7;
  }
}
