/* Global Styles */
body {
  font-family: 'Roboto', sans-serif;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  background: linear-gradient(120deg, #121212, #1f1f1f);
  color: #f0f0f0;
  transition: color 0.5s;
}

body.light {
  background: #f0f0f0;
  color: #121212;
}

/* Typography */
h1, .project a, .contact a, .thanks p, .thanks a, .category-btn, .btn, .controls button, .controls input, .donation-popup, .b2b-message {
  transition: color 0.5s;
}

/* Container */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
}

@media (max-width: 600px) {
  .container {
    padding: 10px;
  }
}

/* Header */
.header {
  text-align: center;
  padding: 50px 0;
}

.header h1 {
  font-size: 2.5em;
  margin: 0;
}

@media (max-width: 600px) {
  .header h1 {
    font-size: 2em;
  }
}

.header p {
  font-size: 1.2em;
}

/* Category */
.category {
  margin-bottom: 30px;
}

/* Projects Slider */
.projects-slider {
  display: flex;
  overflow-x: auto;
  padding-bottom: 20px;
}

/* Project */
.project {
  min-width: 250px;
  margin-right: 20px;
  background: #1f1f1f;
  border-radius: 10px;
  padding: 20px;
  transition: transform 0.3s;
  box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
  animation: fadeInUp 0.15s ease-out;
  margin-bottom: 20px;
}

.project:hover {
  transform: scale(1.05);
}

body.light .project {
  background: #f0f0f0;
}

.project a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid;
  padding-bottom: 2px;
  display: inline-block;
  margin-top: 10px;
}

.project-links a img {
  display: block;
  width: auto;
  height: 30px;
}

/* Contact */
.contact {
  text-align: center;
  padding: 20px 0;
  margin: 0;
}

.contact i {
  font-size: 1.5em;
}

/* Animations */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dark Mode Toggle */
.dark-mode-toggle, .twitter-toggle {
  position: absolute;
  top: 20px;
  font-size: 1.5em;
  cursor: pointer;
}

.dark-mode-toggle {
  right: 20px;
}

.twitter-toggle {
  left: 20px;
}

body.light .dark-mode-toggle, body.light .twitter-toggle {
  color: #121212;
}

/* Buttons */
.btn {
  padding: 5px 10px;
  border: 1px solid #f0f0f0;
  border-radius: 5px;
  text-decoration: none;
  color: #f0f0f0;
  margin-right: 5px;
}

.btn.civitai {
  background-color: blue;
}

.btn.hf {
  background-color: green;
}

/* Controls */
.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.controls button, .controls input {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.2em;
}

/* Search Box */
#search-container {
  position: relative;
  display: inline-block;
}

#search-box {
  position: absolute;
  right: 0;
  top: 0;
  width: 0;
  padding: 5px;
  border-bottom: 1px solid #f0f0f0;
  transition: width 0.5s ease-in-out, opacity 0.5s ease-in-out;
  opacity: 0;
  border-radius: 20px;
  background: #1f1f1f;
  color: #f0f0f0;
}

#search-box.show {
  width: 200px;
  opacity: 1;
  padding: 5px 15px;
}

body.light #search-box {
  background: #f0f0f0;
  color: #121212;
}

/* Projects Grid */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  grid-auto-rows: 1fr;
  gap: 20px;
  overflow: hidden;
  height: calc(2 * 250px); /* Adjust as needed */
  transition: transform 0.3s ease-in-out;
}

@media (max-width: 768px) {
  .projects {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

/* New Tag */
.new-tag {
  background: #ff0000;
  color: #ffffff;
  font-size: 0.8em;
  padding: 2px 5px;
  border-radius: 3px;
  margin-left: 5px;
}

/* Thanks Section */
.thanks {
  text-align: center;
  padding: 20px 0;
}

.thanks p {
  font-size: 0.8em;
}

.thanks a {
  color: inherit;
  text-decoration: none;
}

/* Category Button */
.category-btn {
  padding: 10px 20px;
  margin: 0 10px;
  border: 2px solid transparent;
  background-color: #0078D7;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 20px;
}

.category-btn:hover,
.category-btn:focus {
  background-color: #005EA6;
  border-color: #fff;
}

.category-btn.category-selected {
  background-color: #005EA6;
  border-color: #fff;
}

/* Search and Categories */
.search-and-categories {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#categories-container {
  flex-grow: 1;
  transition: all 0.3s ease;
}

#categories-container.search-active {
  justify-content: flex-start;
}

#sort-btn {
  flex: 1;
  min-width: 50px;
}

#search-container {
  flex: 1;
  min-width: 60px;
  display: flex;
  justify-content: flex-end;
}

/* Project Entering/Leaving */
.project-entering,
.project-leaving {
  animation: fadeInOut 0.5s ease-in-out;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

/* Donation Popup Styles */
.donation-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  text-align: center;
  z-index: 1000;
  background-color: #1f1f1f;
  color: #f0f0f0;
  font-size: 1.2em;
  opacity: 0;
  animation: fadeIn 0.3s ease-out forwards;
  max-width: 90%;
  box-sizing: border-box;
}

@media (max-width: 600px) {
  .donation-popup {
    width: 80%;
    padding: 20px;
    font-size: 1em;
  }

  .donation-popup img {
    width: 50px;
    margin: 10px;
  }

  .close-popup {
    top: 10px;
    right: 10px;
    font-size: 1.5em;
  }
}

body.light .donation-popup {
  background-color: #f0f0f0;
  color: #121212;
}

.donation-popup img {
  width: 60px;
  margin: 15px;
}

.close-popup {
  position: absolute;
  top: 15px;
  right: 15px;
  cursor: pointer;
  font-size: 1.8em;
  color: #f0f0f0;
}

body.light .close-popup {
  color: #121212;
}

/* Add fade-in animation */
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

#prev-btn, #next-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #1f1f1f;
  color: #f0f0f0;
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
}

#prev-btn { left: 10px; }
#next-btn { right: 10px; }

@media (max-width: 600px) {
  #prev-btn, #next-btn {
    top: 60%;
  }
}

/* Support Icons Styles */
.support-icons {
  display: flex;
  justify-content: center;
  margin-top: -35px;
}

.support-icons a img {
  width: 25px;
  margin: 0 10px;
}

/* B2B Message Style */
.b2b-message {
  text-align: center;
  margin-top: 20px;
  font-size: 1em;
}

body.light .b2b-message {
  color: #121212;
}

/* Close Search Button Style */
.close-search {
  display: none;
  cursor: pointer;
  position: absolute;
  right: 10px;
  top: 5px;
  color: #f0f0f0;
  font-size: 1.2em;
}

body.light .close-search {
  color: #121212;
}

.close-search.show {
  display: block;
}

.notification-bar {
  background-color: #333; /* Fundo cinza escuro */
  color: #fff; /* Texto branco */
  text-align: center;
  padding: 10px 0;
  position: relative;
  z-index: 1001; /* Garante que está acima de outros elementos */
}

.notification-bar p {
  margin: 0;
  font-size: 1em;
}

.notification-bar a {
  color: #4caf50; /* Cor verde para o link */
  text-decoration: none;
  font-weight: bold;
}

/* Garante que a barra de notificação seja visível no modo claro */
body.light .notification-bar {
  background-color: #ddd; /* Fundo cinza claro para o modo claro */
  color: #333; /* Texto cinza escuro para o modo claro */
}

/* Design responsivo para visualização móvel */
@media (max-width: 768px) {
  .notification-bar p {
    font-size: 0.9em; /* Fonte um pouco menor para dispositivos móveis */
  }
}
