/* --- Base Variables --- */
:root {
  /* Main color palette */
  --primary-color: #6A5ACD;        /* Slate blue */
  --secondary-color: #9370DB;      /* Medium purple */
  --accent-color: #8A2BE2;         /* Blue violet */
  --text-color: #333333;
  --light-text-color: #ffffff;
  --background-color: #f8f9fa;
  --card-background: #ffffff;
  
  /* Game colors */
  --correct-color: #6aaa64;
  --present-color: #c9b458;
  --absent-color: #787c7e;
  --key-bg: #d3d6da;
  --key-text: #1a1a1a;
  
  /* UI elements */
  --border-radius: 10px;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --transition-speed: 0.3s;
  
  /* Responsive variables */
  --content-padding: 1rem;
  --mobile-font-size: 0.95rem;
  --keyboard-spacing: 0.25rem;
  --tile-size-mobile: 2.5rem;
  --tile-size-small: 2rem;
  --footer-height-mobile: 1.5rem; /* Fixed footer height */
}

/* Make sure we have a good viewport scale */
@viewport {
  width: device-width;
  zoom: 1.0;
}

/* --- Base styles --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  touch-action: manipulation; /* Disable double-tap zoom on mobile */
}

/* Disable transitions and animations for everything by default - will be selectively enabled */
body, .app-container, .main-content, .main-footer, .keyboard, .key, 
.tile, .primary-button, .secondary-button {
  transition-property: none !important;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-color);
}

button {
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
}

ul {
  list-style: none;
}

/* --- Layout --- */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

.main-content {
  flex: 1;
  width: 100%;
  max-width: 800px; /* Increased max-width for desktop */
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* --- Header --- */
.main-header {
  background-color: var(--card-background);
  box-shadow: var(--box-shadow);
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.8rem;
  color: var(--primary-color);
}

.site-title span {
  color: var(--accent-color);
}

.main-nav ul {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  font-weight: 500;
  padding: 0.5rem;
  position: relative;
  min-height: 44px; /* Minimum touch target size */
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width 0.2s;
}

.nav-link:hover::after {
  width: 100%;
}

/* --- Footer --- */
.main-footer {
  background-color: var(--card-background);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
  padding: 1.5rem 1rem;
  margin-top: auto;
  height: auto; /* Default height */
  z-index: 2; /* Ensure it's above content */
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  color: #777;
  font-size: 0.875rem;
}

/* --- Game container --- */
.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* --- Challenge info --- */
.challenge-info {
  text-align: center;
  margin-bottom: 1.5rem;
  width: 100%;
}

.mod-info {
  color: #666;
  font-style: italic;
  margin-bottom: 0.5rem;
}

.hint-box {
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 1rem;
  border-left: 4px solid var(--primary-color);
  margin-bottom: 1.5rem;
}

.hint-image img {
  max-width: 100%;
  border-radius: var(--border-radius);
  margin-top: 0.5rem;
}

/* --- Game board --- */
#game-board {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  width: 100%;
  max-width: 480px; /* Increased for better desktop display */
}

.row {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  justify-content: center;
}

.tile {
  width: 4.25rem; /* Slightly larger tiles on desktop */
  height: 4.25rem;
  border: 2px solid #d3d6da;
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  font-weight: bold;
  text-transform: uppercase;
  backface-visibility: hidden;
  transform: translateZ(0); /* Force hardware acceleration */
  -webkit-transform: translateZ(0);
}

.tile[data-state="empty"] {
  border: 2px solid #d3d6da;
}

.tile[data-state="filled"] {
  border: 2px solid #878a8c;
}

.tile[data-state="correct"] {
  background-color: var(--correct-color);
  border-color: var(--correct-color);
  color: white;
  animation: flip 0.5s;
}

.tile[data-state="present"] {
  background-color: var(--present-color);
  border-color: var(--present-color);
  color: white;
  animation: flip 0.5s;
}

.tile[data-state="absent"] {
  background-color: var(--absent-color);
  border-color: var(--absent-color);
  color: white;
  animation: flip 0.5s;
}

.tile[data-phantom="true"] {
  opacity: 0.4;
  background-color: #f0f0f0;
  border-color: #d0d0d0;
  pointer-events: none;
  cursor: not-allowed;
}

.tile[data-active="true"] {
  border-color: var(--primary-color);
  box-shadow: 0 0 5px var(--primary-color);
}

/* Phantom state styling */
.tile[data-state="phantom"] {
  opacity: 0.3;
  color: #999;
  background-color: #f5f5f5;
  border-color: #d0d0d0;
  border-style: dotted;
  font-size: 1.5rem;
  pointer-events: none;
}

.tile[data-current="true"] {
  border-color: var(--primary-color);
  box-shadow: 0 0 8px rgba(106, 90, 205, 0.5);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(106, 90, 205, 0.5); }
  70% { box-shadow: 0 0 0 5px rgba(106, 90, 205, 0); }
  100% { box-shadow: 0 0 0 0 rgba(106, 90, 205, 0); }
}

@keyframes flip {
  0% {
    transform: rotateX(0);
  }
  50% {
    transform: rotateX(90deg);
  }
  100% {
    transform: rotateX(0);
  }
}

/* --- Keyboard --- */
.keyboard {
  width: 100%;
  max-width: 600px; /* Increased for better desktop layout */
  margin: 1rem auto 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transform: translateZ(0); /* Force hardware acceleration */
  -webkit-transform: translateZ(0);
  transform: translate3d(0,0,0);
  -webkit-transform: translate3d(0,0,0);
}

.keyboard-row {
  display: flex;
  gap: 0.35rem;
  width: 100%;
  justify-content: center;
}

.key {
  min-width: 2.5rem;
  height: 3.5rem;
  border-radius: var(--border-radius);
  border: none;
  background-color: var(--key-bg);
  color: var(--key-text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-transform: uppercase;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  -webkit-tap-highlight-color: transparent;
  transform: translateZ(0); /* Force hardware acceleration */
  -webkit-transform: translateZ(0);
  transform: translate3d(0,0,0);
  -webkit-transform: translate3d(0,0,0);
  will-change: background-color;
  backface-visibility: hidden;
}

/* Use opacity for active state instead of transforms */
.key:active {
  opacity: 0.8;
}

.key-flash {
  opacity: 0.8 !important;
}

.key-wide {
  min-width: 4rem;
  font-size: 0.75rem;
}

.key-correct {
  background-color: var(--correct-color);
  color: white;
}

.key-present {
  background-color: var(--present-color);
  color: white;
}

.key-absent {
  background-color: var(--absent-color);
  color: white;
}

/* --- Results sharing --- */
.share-results {
  width: 100%;
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  text-align: center;
  position: relative;
  border-top: 3px solid var(--secondary-color);
  transform: translateZ(0); /* Force hardware acceleration */
  -webkit-transform: translateZ(0);
}

.share-results.highlight {
  box-shadow: 0 0 20px rgba(106, 90, 205, 0.5);
  border-top: 3px solid var(--primary-color);
  animation: pulse-share 2s;
}

@keyframes pulse-share {
  0% { box-shadow: 0 0 0 0 rgba(106, 90, 205, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(106, 90, 205, 0); }
  100% { box-shadow: 0 0 0 0 rgba(106, 90, 205, 0); }
}

.share-button {
  background-color: #3b5999;
  position: relative;
  overflow: hidden;
}

.share-button:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { left: -100%; }
  20% { left: 100%; }
  100% { left: 100%; }
}

.results-pattern {
  font-family: monospace;
  white-space: pre;
  margin: 1rem 0;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 8px;
  text-align: left;
  overflow-x: auto;
  border: 1px solid #e9ecef;
}

/* Share icon */
.share-icon {
  display: inline-block;
  margin-right: 5px;
  animation: bounce 1s infinite;
}

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

.share-results p {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.word-reveal {
  margin: 1.25rem 0;
  padding: 0.75rem;
  font-size: 1.1rem;
  background-color: #f8f9fa;
  border-radius: 8px;
  display: inline-block;
  font-weight: 500;
}

.word-success {
  color: var(--correct-color);
  border-left: 4px solid var(--correct-color);
}

.word-failure {
  color: var(--absent-color);
  border-left: 4px solid var(--absent-color);
}

/* Discord embed refresh link */
.discord-share-tip {
  margin-top: 1.5rem;
  padding: 0.75rem;
  background-color: rgba(106, 90, 205, 0.05);
  border-radius: var(--border-radius);
  border-left: 3px solid var(--primary-color);
}

.discord-share-tip p {
  font-size: 0.85rem;
  color: #666;
  margin: 0;
}

.discord-refresh-link {
  color: var(--primary-color);
  text-decoration: underline;
  font-weight: 500;
}

.discord-refresh-link:hover {
  color: var(--accent-color);
}

/* Discord alternate message textarea */
.discord-message {
  font-family: monospace;
  resize: vertical;
  min-height: 120px;
}

/* --- Buttons --- */
.primary-button {
  background-color: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  display: inline-block;
  text-align: center;
  min-height: 44px; /* Minimum touch target size */
  -webkit-tap-highlight-color: transparent;
}

.primary-button:active {
  opacity: 0.9;
}

.secondary-button {
  background-color: transparent;
  color: var(--primary-color);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border: 1px solid var(--primary-color);
  border-radius: var(--border-radius);
  box-shadow: none;
  text-align: center;
  text-decoration: none;
  min-height: 44px; /* Minimum touch target size */
  -webkit-tap-highlight-color: transparent;
}

.secondary-button:active {
  opacity: 0.8;
  background-color: rgba(106, 90, 205, 0.05);
}

/* --- Challenge list --- */
.challenges-list {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

.challenge-card {
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 1.5rem;
  border-top: 3px solid var(--secondary-color);
}

.active-challenge {
  border-top: 3px solid var(--primary-color);
}

.challenge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.75rem;
}

.challenge-title {
  font-size: 1.4rem;
  color: var(--text-color);
  margin: 0;
}

.active-badge {
  background-color: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.challenge-details {
  margin-bottom: 1.5rem;
  color: #666;
  font-size: 0.9rem;
}

.challenge-details p {
  margin: 0.5rem 0;
}

.challenge-stats {
  display: flex;
  justify-content: space-around;
  gap: 1rem;
  margin: 1.5rem 0;
  text-align: center;
}

.stat-item {
  flex: 1;
}

.challenge-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

.challenge-actions .primary-button,
.challenge-actions .secondary-button {
  flex: 1;
}

/* --- Notifications --- */
.notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--correct-color);
  color: white;
  padding: 12px 24px;
  border-radius: var(--border-radius);
  z-index: 1000;
  box-shadow: var(--box-shadow);
  border-left: 4px solid #4a7c4a;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  text-align: center;
  max-width: 80%;
  font-weight: bold;
  font-size: 1.1rem;
  margin-right: 50vw;
}

.notification.show {
  opacity: 1;
}

/* --- Game Result Banner --- */
.game-result-banner {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 500px;
  background-color: var(--card-background);
  color: var(--text-color);
  padding: 16px 24px;
  border-radius: var(--border-radius);
  z-index: 1001;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: slideDown 0.5s ease-out forwards;
  opacity: 0;
  transform: translateZ(0); /* Force hardware acceleration */
  -webkit-transform: translateZ(0);
}

.game-result-banner.win {
  border-top: 4px solid var(--correct-color);
}

.game-result-banner.lose {
  border-top: 4px solid var(--absent-color);
}

.result-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.game-result-banner.win .result-title {
  color: var(--correct-color);
}

.game-result-banner.lose .result-title {
  color: var(--absent-color);
}

.result-word {
  font-size: 1.2rem;
  margin: 0 0 8px 0;
}

.banner-actions {
  display: flex;
  gap: 16px;
  width: 100%;
  justify-content: center;
}

@keyframes slideDown {
  0% { transform: translate(-50%, -100px); opacity: 0; }
  100% { transform: translate(-50%, 0); opacity: 1; }
}

/* --- Name input container --- */
.name-input-container {
  width: 100%;
  margin: 1.5rem 0;
  padding: 1.5rem;
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  text-align: center;
  border-top: 4px solid var(--primary-color);
}

.input-group {
  display: flex;
  gap: 0.75rem;
  margin: 1rem 0;
  justify-content: center;
}

#player-name {
  padding: 0.75rem 1rem;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  color: var(--text-color);
  font-size: 1rem;
  min-width: 200px;
  min-height: 44px; /* Minimum touch target size */
}

#player-name:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(106, 90, 205, 0.25);
  outline: none;
}

.submit-message {
  margin-top: 1rem;
  padding: 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
}

.submit-message.success {
  color: var(--correct-color);
  background-color: rgba(106, 170, 100, 0.1);
  padding: 0.5rem 1rem;
}

.submit-message.error {
  color: #dc3545;
  background-color: rgba(220, 53, 69, 0.1);
  padding: 0.5rem 1rem;
}

.leaderboard-link {
  margin-top: 1.5rem;
  display: none;
  animation: fadeIn 0.5s;
}

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

/* --- Home page --- */
.welcome-box {
  text-align: center;
  margin-bottom: 3rem;
}

.welcome-heading {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.welcome-subtitle {
  font-size: 1.25rem;
  color: #666;
  margin-bottom: 2rem;
}

.challenge-box, .no-challenge-box {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  text-align: center;
  background-color: var(--card-background);
}

.challenge-box {
  border-top: 4px solid var(--primary-color);
}

.no-challenge-box {
  border-top: 4px solid var(--absent-color);
}

.instructions-box {
  background-color: var(--card-background);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-top: 2rem;
}

.instructions-box h2 {
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-size: 1.5rem;
}

.instructions-box ul {
  list-style-type: none;
  padding-left: 0.5rem;
}

.instructions-box li {
  margin-bottom: 0.75rem;
  position: relative;
  padding-left: 1.75rem;
}

.instructions-box li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

/* --- Admin panel --- */
.admin-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

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

.admin-form {
  background-color: var(--card-background);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 2rem;
  border-top: 4px solid var(--primary-color);
}

.admin-heading {
  margin-bottom: 0;
  color: var(--primary-color);
  font-size: 1.75rem;
}

.logout-link {
  color: #666;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
}

.logout-link:hover {
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input, 
.form-group select, 
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  color: var(--text-color);
  font-size: 1rem;
  min-height: 44px; /* Minimum touch target size */
}

/* Fix for iOS input zoom */
@media screen and (max-width: 768px) {
  input, select, textarea {
    font-size: 16px; /* Minimum font size to prevent iOS zooming */
  }
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(106, 90, 205, 0.25);
  outline: none;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.help-text {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.5rem;
  font-style: italic;
}

.or-divider {
  margin: 1.5rem 0;
  text-align: center;
  position: relative;
  color: #777;
  font-weight: 500;
}

.or-divider::before,
.or-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background-color: #dee2e6;
}

.or-divider::before {
  left: 0;
}

.or-divider::after {
  right: 0;
}

.result-box {
  background-color: var(--card-background);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-top: 2rem;
  border-top: 4px solid var(--correct-color);
}

.result-box h3 {
  color: var(--correct-color);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.link-box, 
.message-box {
  display: flex;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
}

.link-box input, 
.message-box textarea {
  flex-grow: 1;
  padding: 0.75rem 1rem;
  background-color: #585858;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  color: var(--text-color);
  font-size: 0.95rem;
}

.link-box input:focus, 
.message-box textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(106, 90, 205, 0.25);
  outline: none;
}

.message-box textarea {
  min-height: 120px;
  font-family: inherit;
  resize: vertical;
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.usage-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  align-items: flex-end;
}

.usage-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
}

.usage-filter-group input,
.usage-filter-group select,
.usage-filter-group button {
  width: 100%;
}

.usage-filter-group input,
.usage-filter-group select {
  background-color: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text-color);
  border-radius: var(--border-radius);
  padding: 0.65rem 0.9rem;
  min-height: 42px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.usage-filter-group input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 0.9rem;
}

.usage-filter-group select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-color) 50%),
    linear-gradient(135deg, var(--text-color) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}

.usage-filter-group input:focus,
.usage-filter-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(106, 90, 205, 0.2);
}

.usage-filter-clear {
  min-width: 140px;
}

.usage-state {
  padding: 12px 14px;
  border-radius: var(--border-radius);
  margin-bottom: 12px;
  background-color: rgba(0, 0, 0, 0.03);
  color: var(--text-color);
}

.usage-state-loading {
  background-color: rgba(106, 90, 205, 0.08);
}

.usage-state-empty {
  background-color: rgba(52, 152, 219, 0.08);
}

.usage-state-error {
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

.usage-table-wrapper {
  width: 100%;
  overflow-x: auto;
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 1rem;
  margin-bottom: 1rem;
}

.usage-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  color: var(--text-color);
}

.usage-table th,
.usage-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--divider-color, #e9ecef);
}

.usage-table th {
  background-color: var(--input-bg);
  color: var(--primary-color);
  font-weight: 600;
}

.usage-table tbody tr:hover {
  background-color: var(--table-hover-bg);
}

.usage-pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin: 10px 0 20px;
}

.usage-pagination button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .usage-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .usage-filter-group {
    width: 100%;
  }

  .usage-table {
    min-width: 600px;
  }
}

/* --- Leaderboard Styling --- */
.leaderboard-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
}

.leaderboard-header {
  text-align: center;
  margin-bottom: 2rem;
}

.leaderboard-title {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 0.5rem;
  font-family: 'Montserrat', sans-serif;
}

.challenge-meta {
  background-color: var(--card-background);
  padding:.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 2rem;
  text-align: center;
}

.leaderboard-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.stat-box {
  text-align: center;
  padding: 1.25rem 1.5rem;
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  min-width: 120px;
  box-shadow: var(--box-shadow);
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
  line-height: 1.2;
}

.stat-label {
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.5rem;
}

.leaderboard-table-container {
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 1.5rem;
  margin-bottom: 2rem;
  overflow-x: auto;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text-color);
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
}

.leaderboard-table th {
  background-color: #f8f9fa;
  color: var(--primary-color);
  font-weight: 600;
  position: sticky;
  top: 0;
}

.leaderboard-table tr:hover {
  background-color: #f8f9fa;
}

.rank-cell {
  text-align: center;
  font-weight: bold;
}

.guesses-cell {
  text-align: center;
}

.top-rank {
  background-color: rgba(106, 90, 205, 0.05);
}

.top-rank-1 {
  background-color: rgba(255, 215, 0, 0.1);
}

.top-rank-2 {
  background-color: rgba(192, 192, 192, 0.1);
}

.top-rank-3 {
  background-color: rgba(205, 127, 50, 0.1);
}

.result-cell {
  text-align: center;
}

.result-win {
  color: var(--correct-color);
  font-weight: 600;
}

.result-lose {
  color: var(--absent-color);
  font-weight: 600;
}

.no-scores {
  text-align: center;
  padding: 2rem;
  color: #777;
}

/* --- Modal --- */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s;
}

.modal-content {
  background-color: var(--card-background);
  padding: 2rem;
  border-radius: var(--border-radius);
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  position: relative;
  animation: slideUp 0.3s;
}

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

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #aaa;
}

.modal-title {
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  font-size: 1.5rem;
}

.share-link,
.share-message {
  margin: 1.5rem 0;
}

.share-link input,
.share-message textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  color: var(--text-color);
  font-size: 0.95rem;
}

.share-link input:focus,
.share-message textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(106, 90, 205, 0.25);
  outline: none;
}

.share-message textarea {
  min-height: 120px;
  font-family: monospace;
  resize: vertical;
}

/* --- Toast notifications --- */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--card-background);
  color: var(--text-color);
  padding: 12px 24px;
  border-radius: var(--border-radius);
  z-index: 2000;
  box-shadow: var(--box-shadow);
  border-left: 4px solid var(--primary-color);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
}

/* --- Error pages --- */
.error-container {
  text-align: center;
  padding: 2rem 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.error-code {
  font-size: 8rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1;
  opacity: 0.5;
  margin-bottom: 1rem;
  font-family: 'Montserrat', sans-serif;
}

.error-title {
  font-size: 2rem;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.error-message {
  color: #666;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.error-actions {
  margin-top: 2rem;
}

/* --- Login page --- */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 70vh;
  padding: 2rem 1rem;
}

.login-card {
  background-color: var(--card-background);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  border-top: 4px solid var(--primary-color);
}

.login-title {
  color: var(--primary-color);
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
}

.login-error {
  background-color: rgba(220, 53, 69, 0.1);
  color: #dc3545;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
  text-align: center;
  border-left: 4px solid #dc3545;
}

.login-form .form-group {
  margin-bottom: 1.5rem;
}

.login-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.login-form input {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  color: var(--text-color);
  font-size: 1rem;
}

.login-form input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(106, 90, 205, 0.25);
  outline: none;
}

.login-button {
  width: 100%;
  margin-top: 1rem;
}

.login-footer {
  margin-top: 2rem;
  text-align: center;
}

.back-link {
  color: #666;
  text-decoration: none;
  font-size: 0.9rem;
}

/* --- Loading screen --- */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--background-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loading-screen.hide {
  opacity: 0;
  visibility: hidden;
}

.loader {
  width: 48px;
  height: 48px;
  border: 5px solid var(--primary-color);
  border-bottom-color: transparent;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
  margin-bottom: 1rem;
}

.loading-text {
  color: var(--primary-color);
  font-weight: 500;
  font-size: 16px;
}

@keyframes rotation {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* --- Special handling for keyboard-open state --- */
/* Prevent the keyboard-open class from causing layout shifts */
body.keyboard-open {
  /* Lock body when virtual keyboard is open to prevent scroll jumps */
  height: 100% !important;
  overflow: hidden !important;
}

/* --- Responsive styles --- */

/* Mobile responsive */
@media (max-width: 768px) {
  body {
    font-size: var(--mobile-font-size);
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }
  
  .app-container {
    min-height: 100vh;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }
  
  /* Main layout adjustments */
  .main-content {
    padding: 1rem 0.5rem;
    width: 100%;
    /* Add fixed padding to accommodate the footer */
    padding-bottom: calc(var(--footer-height-mobile) + 2rem);
  }
  
  .header-content {
    flex-direction: column;
    padding: 0.5rem;
    gap: 0.5rem;
  }
  
  .site-title {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
  }
  
  /* Game result banner adjustments */
  .game-result-banner {
    top: 120px; /* Adjust top position for mobile devices with stacked header */
    padding: 12px 16px;
  }
  
  .result-title {
    font-size: 1.25rem;
  }
  
  .banner-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .banner-actions .primary-button,
  .banner-actions .secondary-button {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.9rem;
  }
  
  /* Game board adjustments */
  #game-board {
    max-width: 100%;
    gap: 0.3rem;
  }
  
  .row {
    gap: 0.3rem;
    width: 100%;
    justify-content: center;
  }
  
  .tile {
    width: var(--tile-size-mobile); /* Smaller tiles on mobile */
    height: var(--tile-size-mobile);
    font-size: 1.2rem;
    border-width: 1px;
  }
  
  /* Keyboard adjustments - prevent any transforms */
  .keyboard {
    max-width: 100%;
    margin: 0.75rem auto 2.5rem; /* Adjusted bottom margin */
    gap: 0.3rem;
    width: 98%; /* Ensure keyboard isn't wider than viewport */
    padding: 0 5px; /* Add some padding to prevent edge touching */
    position: relative !important;
    transform: none !important;
    -webkit-transform: none !important;
  }
  
  .keyboard-row {
    gap: var(--keyboard-spacing);
    width: 100%;
    justify-content: center;
  }
  
  /* Keys should not transform at all on mobile */
  .key {
    min-width: calc((100% / 10) - (var(--keyboard-spacing) * 2)); /* Auto-size keys based on row width */
    height: 2.75rem;
    font-size: 0.75rem;
    padding: 0.1rem;
    transition: none !important; /* Disable all transitions */
    transform: none !important;
    -webkit-transform: none !important;
    box-shadow: none !important; /* Remove box-shadow to prevent repaints */
    will-change: opacity; /* Only optimize opacity changes */
  }
  
  /* Active state only changes opacity */
  .key:active {
    opacity: 0.7;
    background-color: rgba(106, 90, 205, 0.1);
  }
  
  .key-wide {
    min-width: calc((100% / 7) - (var(--keyboard-spacing) * 2)); /* Wider keys for Enter/Backspace */
    font-size: 0.7rem;
  }
  
  /* Share results adjustments */
  .share-results {
    padding: 1rem;
  }
  
  .results-pattern {
    font-size: 0.75rem;
    padding: 0.75rem;
    overflow-x: auto;
  }
  
  /* Name input container adjustments */
  .name-input-container {
    padding: 1rem;
  }
  
  .input-group {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  #player-name, .primary-button {
    width: 100%;
    padding: 0.5rem 0.75rem;
  }
  
  /* Challenge info adjustments */
  .challenge-info {
    margin-bottom: 1rem;
  }
  
  .hint-box {
    padding: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
  }
  
  /* Footer - fixed height and position to prevent layout shifts */
  .main-footer {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: var(--footer-height-mobile) !important;
    max-height: var(--footer-height-mobile) !important;
    padding: 0.3rem !important;
    z-index: 5 !important;
    font-size: 0.7rem !important;
    line-height: 1 !important;
    overflow: hidden !important;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.1) !important;
    background-color: var(--card-background) !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    transition: none !important;
  }
  
  .main-footer .footer-content {
    flex-direction: row !important;
    justify-content: space-between !important;
    gap: 0.25rem !important;
    font-size: 0.7rem !important;
    height: 100% !important;
    padding: 0 0.5rem !important;
  }
  
  /* When virtual keyboard is open, we still keep footer visible but slightly transparent */
  .keyboard-open .main-footer {
    opacity: 0.7 !important;
    transition: opacity 0.2s !important;
  }
  
  /* Keep keyboard in place when virtual keyboard is open */
  .keyboard-open .keyboard {
    transform: none !important;
    -webkit-transform: none !important;
  }
  
  /* Keyboard key sizing overrides for small screens */
  #keyboard .key {
    min-width: auto; 
    width: calc((100% / 10) - (var(--keyboard-spacing) * 2));
  }
  
  #keyboard .key-wide {
    width: calc((100% / 5) - (var(--keyboard-spacing) * 2));
  }
  
  /* Loading screen adjustments */
  .loader {
    width: 36px;
    height: 36px;
    border-width: 4px;
  }
  
  .loading-text {
    font-size: 14px;
  }
  
  /* Admin form adjustments */
  .admin-form {
    padding: 1.5rem 1rem;
  }
  
  /* Leaderboard adjustments */
  .leaderboard-stats {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .stat-box {
    width: 100%;
    max-width: 250px;
  }
  
  .leaderboard-table th,
  .leaderboard-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
  }
  
  /* Modal adjustments */
  .modal-content {
    padding: 1.5rem 1rem;
  }
  
  /* Challenge card adjustments */
  .challenge-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .challenge-stats {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .challenge-actions {
    flex-direction: column;
  }
}

/* Extra small phone adjustments */
@media (max-width: 320px) {
  :root {
    --keyboard-spacing: 0.15rem;
    --tile-size-small: 1.8rem;
  }
  
  .tile {
    width: var(--tile-size-small);
    height: var(--tile-size-small);
    font-size: 0.9rem;
  }
  
  .key {
    font-size: 0.65rem;
    height: 2.2rem;
    border-radius: 5px;
  }
  
  .key-wide {
    font-size: 0.6rem;
  }
  
  /* Even more compact header */
  .site-title {
    font-size: 1.2rem;
  }
  
  .main-nav ul {
    gap: 0.5rem;
  }
  
  .nav-link {
    padding: 0.2rem;
    font-size: 0.8rem;
  }
}

/* Small phone adjustments */
@media (min-width: 321px) and (max-width: 360px) {
  :root {
    --keyboard-spacing: 0.2rem;
  }
  
  .tile {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
  }
  
  .key {
    height: 2.5rem;
    font-size: 0.7rem;
  }
  
  .key-wide {
    font-size: 0.65rem;
  }
  
  /* Even more compact header */
  .site-title {
    font-size: 1.3rem;
  }
  
  .main-nav ul {
    gap: 1rem;
  }
  
  .nav-link {
    padding: 0.3rem;
    font-size: 0.85rem;
  }
}

/* Medium sized phones */
@media (min-width: 361px) and (max-width: 480px) {
  .tile {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 1.1rem;
  }
  
  .site-title {
    font-size: 1.4rem;
  }
  
  /* Adjust keyboard sizing for better fit */
  .keyboard {
    max-width: 98%;
  }
  
  .key {
    min-width: calc((100% / 10) - 6px);
    height: 2.6rem;
  }
  
  .key-wide {
    min-width: calc((100% / 7) - 6px);
  }
}

/* Landscape mode for phones */
@media (max-height: 480px) and (orientation: landscape) {
  .main-content {
    padding: 0.5rem;
    padding-bottom: calc(var(--footer-height-mobile) + 1rem);
  }
  
  .main-header {
    padding: 0.5rem;
  }
  
  .header-content {
    flex-direction: row;
  }
  
  #game-board {
    margin-bottom: 0.5rem;
  }
  
  .tile {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
  }
  
  .keyboard {
    margin: 0.5rem auto 1.5rem;
  }
  
  .key {
    min-width: 1.8rem;
    height: 2.2rem;
  }
  
  .game-result-banner {
    top: 70px;
  }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  .main-content {
    max-width: 95%;
  }
  
  .tile {
    width: 3.2rem;
    height: 3.2rem;
    font-size: 1.8rem;
  }
  
  .row {
    gap: 0.4rem;
  }
  
  #game-board {
    max-width: 400px;
  }
  
  .keyboard {
    max-width: 550px;
  }
  
  .key {
    min-width: 2.2rem;
    height: 3rem;
  }
}

/* Desktop grid layout */
@media (min-width: 768px) {
  .challenges-list {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  }
  
  /* Allow transitions and animations on desktop */
  .key {
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
  }
  
  .key:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  }
  
  .key:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  }
  
  .tile[data-state="filled"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  .stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  }
}

/* iOS-specific fixes */
@supports (-webkit-touch-callout: none) {
  /* Force hardware acceleration on all interactive elements */
  .key, .tile, .keyboard, .main-footer {
    transform: translate3d(0,0,0) !important;
    -webkit-transform: translate3d(0,0,0) !important;
    backface-visibility: hidden !important;
    perspective: 1000px !important;
  }
  
  /* iOS footer fix */
  @media (max-width: 768px) {
    .main-footer {
      position: fixed !important;
      bottom: 0 !important;
      left: 0 !important;
      right: 0 !important;
      height: var(--footer-height-mobile) !important;
      max-height: var(--footer-height-mobile) !important;
      background-color: var(--card-background) !important;
      z-index: 5;
    }
    
    .keyboard-open.main-footer {
      transform: none !important;
      -webkit-transform: none !important;
    }
    
    /* Prevent content from being hidden under virtual keyboard */
    body.keyboard-open {
      min-height: -webkit-fill-available;
    }
  }
}

/* Theme variables */
:root {
  /* Light theme (default) */
  --text-color: #333333;
  --light-text-color: #ffffff;
  --background-color: #f8f9fa;
  --card-background: #ffffff;
  --key-bg: #d3d6da;
  --key-text: #1a1a1a;
  --input-bg: #f8f9fa;
  --input-border: #dee2e6;
  --table-hover-bg: #f8f9fa;
  --divider-color: #dee2e6;
  --tile-border-color: #d3d6da;
  --toast-bg: var(--card-background);
  --header-border: #e9ecef;
  --theme-toggle-bg: #f0f0f0;
}

/* Dark theme variables */
.dark {
  --text-color: #f0f0f0;
  --light-text-color: #ffffff;
  --background-color: #121212;
  --card-background: #1e1e1e;
  --key-bg: #3a3a3c;
  --key-text: #ffffff;
  --input-bg: #2a2a2a;
  --input-border: #3a3a3c;
  --table-hover-bg: #2a2a2a;
  --divider-color: #3a3a3c;
  --tile-border-color: #3a3a3c;
  --toast-bg: #2a2a2a;
  --header-border: #2a2a2a;
  --theme-toggle-bg: #2a2a2a;
}

/* System theme support - only applied if no explicit theme class is set */
@media (prefers-color-scheme: dark) {
  :root:not(.light):not(.dark) {
    --text-color: #f0f0f0;
    --light-text-color: #ffffff;
    --background-color: #121212;
    --card-background: #1e1e1e;
    --key-bg: #3a3a3c;
    --key-text: #ffffff;
    --input-bg: #2a2a2a;
    --input-border: #3a3a3c;
    --table-hover-bg: #2a2a2a;
    --divider-color: #3a3a3c;
    --tile-border-color: #3a3a3c;
    --toast-bg: #2a2a2a;
    --header-border: #2a2a2a;
    --theme-toggle-bg: #2a2a2a;
  }
}

/* Apply theme variables */
.form-group input, 
.form-group select, 
.form-group textarea,
#player-name,
.share-link input,
.share-message textarea {
  background-color: var(--input-bg);
  border-color: var(--input-border);
  color: var(--text-color);
}

.leaderboard-table th {
  background-color: var(--input-bg);
}

.results-pattern,
.word-reveal {
  background-color: var(--input-bg);
  border-color: var(--input-border);
}

.leaderboard-table tr:hover {
  background-color: var(--table-hover-bg);
}

.tile[data-state="empty"] {
  border-color: var(--tile-border-color);
}

.toast,
.notification {
  background-color: var(--toast-bg);
}

.challenge-header {
  border-bottom-color: var(--header-border);
}

.or-divider::before,
.or-divider::after {
  background-color: var(--divider-color);
}

/* Theme toggle button */
.theme-toggle {
  background-color: var(--theme-toggle-bg);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-color);
  transition: background-color 0.3s, transform 0.2s;
}

.theme-toggle:hover {
  background-color: var(--primary-color);
  color: var(--light-text-color);
  transform: scale(1.1);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
