/* General Styles */
body {
  font-family: 'JetBrains Mono', monospace;
  margin: 0;
  padding: 0;
  background-color: #f6f1eb; /* Warm creamy white */
  color: #4b3832; /* Cozy dark brown */
  line-height: 1.6;
  font-size: 16px;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Header */
header {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 2rem 1rem;
  padding-top: 3.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-family: 'Quicksand', sans-serif;
  position: relative;
}

header .header-content {
  padding: 0.5rem;
}

header h1 {
  margin: 0;
  font-size: 2.2rem;
}

header p {
  margin: 0.5rem 0 0;
}

/* Media query for mobile devices */
@media screen and (max-width: 480px) {
  header h1 {
    font-size: 1.8rem;
  }
  
  header p {
    font-size: 0.9rem;
  }
}

/* Main Layout */
main .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Tools Section */
.tools-section {
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: #4b3832;
  font-family: 'Quicksand', sans-serif;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #6d4c41, #36ad69);
  border-radius: 2px;
}

/* Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Tool Card */
.tool-card {
  background: #fff;
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 2px solid #000000;
  display: flex;
  flex-direction: column;
  min-height: 120px;
  max-height: 120px;
  box-sizing: border-box;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #36ad69, #6d4c41);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.tool-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  border-color: #36ad69;
}

.tool-card:hover::before {
  opacity: 0.05;
}

.tool-card:hover .tool-icon {
  transform: scale(1.05);
}

.tool-card:hover .tool-info {
  opacity: 1;
  transform: translateY(0);
}

/* Tool Icon */
.tool-icon {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
  position: relative;
  z-index: 2;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.tool-svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
  transition: all 0.4s ease;
  border-radius: 20px;
  max-width: 100%;
  max-height: 100%;
}

.tool-placeholder {
  font-size: 4rem;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Tool Info */
.tool-info {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem;
  opacity: 0;
  transform: translateY(0);
  transition: all 0.4s ease;
  z-index: 3;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  pointer-events: none;
}

.tool-info h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: #4b3832;
  font-family: 'Quicksand', sans-serif;
  transition: color 0.3s ease;
}

.tool-info p {
  color: #666;
  line-height: 1.4;
  margin: 0;
  font-size: 0.85rem;
}



/* Footer Styles */
footer {
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));
  backdrop-filter: blur(10px);
  padding: 2rem 0;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, 
    transparent, 
    rgba(255, 255, 255, 0.5), 
    transparent
  );
}

.footer-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer-content p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.social-icon {
  color: #333;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.social-icon:hover {
  transform: translateY(-3px);
}

.fa-github:hover {
  color: #2b3137;
}

.fa-itch-io:hover {
  color: #fa5c5c;
}

.fa-mug-hot:hover {
  color: #8b4513;
}

.fa-envelope:hover {
  color: #007bff;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
  }
  
  .tool-card {
    min-height: 110px;
    max-height: 110px;
  }
}

@media screen and (max-width: 768px) {
  main .container {
    padding: 1rem;
  }
  
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .tool-card {
    min-height: 100px;
    max-height: 100px;
    padding: 0;
  }
  
  .section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
  }
  
  .tool-info h3 {
    font-size: 1.1rem;
  }
  
  .tool-info p {
    font-size: 0.8rem;
  }
  
  .tool-svg {
    object-fit: contain;
    width: 100%;
    height: 100%;
  }
  
  .tool-placeholder {
    font-size: 3rem;
  }
}

@media screen and (max-width: 480px) {
  .tools-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .tool-card {
    min-height: 80px;
    max-height: 80px;
    max-width: 250px;
    margin: 0 auto;
    padding: 0;
  }
  
  .section-title {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
  }
  
  .tool-info h3 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
  }
  
  .tool-info p {
    font-size: 0.75rem;
    line-height: 1.3;
  }
  
  .tool-svg {
    object-fit: contain;
    width: 100%;
    height: 100%;
  }
  
  .tool-placeholder {
    font-size: 2.5rem;
  }
}

/* Extra small mobile devices */
@media screen and (max-width: 360px) {
  .tool-card {
    min-height: 70px;
    max-height: 70px;
    max-width: 200px;
  }
  
  .tool-placeholder {
    font-size: 2rem;
  }
  
  .tool-info h3 {
    font-size: 0.9rem;
  }
  
  .tool-info p {
    font-size: 0.7rem;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.tool-card:focus {
  outline: 3px solid #36ad69;
  outline-offset: 2px;
}

/* Loading animation for cards */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tool-card {
  animation: fadeInUp 0.6s ease forwards;
}

.tool-card:nth-child(1) { animation-delay: 0.1s; }
.tool-card:nth-child(2) { animation-delay: 0.2s; }
.tool-card:nth-child(3) { animation-delay: 0.3s; }
.tool-card:nth-child(4) { animation-delay: 0.4s; }
.tool-card:nth-child(5) { animation-delay: 0.5s; }
.tool-card:nth-child(6) { animation-delay: 0.6s; }
.tool-card:nth-child(7) { animation-delay: 0.7s; }
.tool-card:nth-child(8) { animation-delay: 0.8s; }
.tool-card:nth-child(9) { animation-delay: 0.9s; }
.tool-card:nth-child(10) { animation-delay: 1.0s; }

/* Header top-right: language + donate */
.header-actions {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1000;
}

.header-lang-btn {
  margin: 0;
  padding: 0 14px;
  min-height: 52px;
  border-radius: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-family: 'Quicksand', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.header-lang-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.55);
  transform: scale(1.05);
}

.header-lang-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.header-lang-btn .fa-globe {
  font-size: 1.1rem;
  opacity: 0.95;
}

.header-lang-code {
  min-width: 1.75rem;
  text-align: center;
}

/* Header donate (coffee) — opens support modal */
.header-donate-btn {
  position: static;
  margin: 0;
  padding: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-tap-highlight-color: transparent;
}

.header-donate-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.55);
  transform: scale(1.08);
}

.header-donate-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.header-donate-btn img {
  display: block;
  width: 34px;
  height: 34px;
  pointer-events: none;
}

/* Updates Modal */
.updates-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.updates-modal.show {
  opacity: 1;
}

.updates-modal-content {
  background: white;
  border-radius: 15px;
  max-width: 800px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.updates-modal.show .updates-modal-content {
  transform: scale(1);
}

.updates-modal-header {
  background: linear-gradient(135deg, #36ad69, #2d8f56);
  color: white;
  padding: 20px 25px;
  border-radius: 15px 15px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1;
}

.updates-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-family: 'Quicksand', sans-serif;
}

.updates-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.updates-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.updates-modal-body {
  padding: 25px;
}

.update-item {
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 2px solid #f0f0f0;
}

.update-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.update-item h3 {
  color: #36ad69;
  font-size: 1.2rem;
  margin: 0 0 10px 0;
  font-family: 'Quicksand', sans-serif;
}

.update-item p {
  color: #666;
  margin: 0 0 15px 0;
  font-size: 0.9rem;
}

.update-item ul {
  margin: 0;
  padding-left: 20px;
}

.update-item li {
  margin-bottom: 8px;
  color: #4b3832;
  line-height: 1.5;
}

/* Donate Button */
.donate-btn {
  display: inline-block;
  background: linear-gradient(135deg, #36ad69 0%, #2d8b56 100%);
  color: white;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(54, 173, 105, 0.3);
  font-family: 'Quicksand', sans-serif;
}

.donate-btn:hover {
  background: linear-gradient(135deg, #2d8b56 0%, #36ad69 100%);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(54, 173, 105, 0.4);
}

.donate-btn i {
  margin-right: 8px;
  font-size: 1.3rem;
}

.donate-modal-mp {
  text-align: center;
  color: #444;
  font-size: 0.95rem;
  margin: 1rem 0 1.25rem;
  line-height: 1.5;
}

.donate-modal-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0 1rem;
}

.donate-modal-actions .donate-btn {
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-sizing: border-box;
}

.donate-btn--paypal {
  background: linear-gradient(135deg, #0070ba 0%, #003087 100%);
  box-shadow: 0 4px 15px rgba(0, 112, 186, 0.35);
}

.donate-btn--paypal:hover {
  background: linear-gradient(135deg, #005ea6 0%, #002d6b 100%);
  box-shadow: 0 6px 20px rgba(0, 112, 186, 0.45);
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
  .header-actions {
    top: 15px;
    right: 15px;
    gap: 8px;
  }

  .header-lang-btn {
    min-height: 48px;
    padding: 0 12px;
    font-size: 0.88rem;
  }

  .header-donate-btn {
    width: 48px;
    height: 48px;
    padding: 5px;
  }
  
  .header-donate-btn img {
    width: 30px;
    height: 30px;
  }
  
  .updates-modal {
    padding: 10px;
  }
  
  .updates-modal-content {
    max-height: 90vh;
  }
  
  .updates-modal-header {
    padding: 15px 20px;
  }
  
  .updates-modal-header h2 {
    font-size: 1.3rem;
  }
  
  .updates-modal-body {
    padding: 20px;
  }
  
  .update-item h3 {
    font-size: 1.1rem;
  }
  
  .update-item li {
    font-size: 0.9rem;
  }
}

@media screen and (max-width: 480px) {
  .header-actions {
    top: 10px;
    right: 10px;
    gap: 6px;
  }

  .header-lang-btn {
    min-height: 44px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .header-lang-btn .fa-globe {
    font-size: 1rem;
  }

  .header-donate-btn {
    width: 44px;
    height: 44px;
    padding: 4px;
  }
  
  .header-donate-btn img {
    width: 28px;
    height: 28px;
  }
  
  .updates-modal-header {
    padding: 12px 15px;
  }
  
  .updates-modal-header h2 {
    font-size: 1.2rem;
  }
  
  .updates-modal-body {
    padding: 15px;
  }
  
  .update-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
  }
}
