body {
    background-color: #121212;
    color: #f0f0f0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

a {
    color: #f48fb1;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

header {
    background-color: #1e1e1e;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 5;
}

header a {
    margin-right: 1rem;
}

/* Grid de projetos na home */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

.project-card {
    background-color: #1f1f1f;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(255, 20, 147, 0.3);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
    text-decoration: none;
    color: inherit;
    cursor: pointer; /* Aplica o cursor de clique ao card */
}

.project-card:hover {
    transform: scale(1.02);
}

.project-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 2px solid #333;
    border-radius: 16px 16px 0 0;
    transition: opacity 0.3s ease;
}

.project-card h3 {
    margin: 1rem;
    font-size: 1.3rem;
    color: #ff4081;
}

.project-card p {
    margin: 0 1rem 1rem;
    color: #ccc;
}

/* Apresentação (markdown) */
.presentation {
    padding: 2rem;
    max-width: 900px;
    margin: auto;
    line-height: 1.7;
}

.markdown h1, .markdown h2, .markdown h3 {
    color: #ff4081;
}

.markdown p {
    margin-bottom: 1rem;
}

/* Carrossel */
.carousel-container {
    margin: 2rem auto;
    max-width: 800px;
    border-radius: 12px;
    overflow: hidden;
    background: #1e1e1e;
}

.carousel-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}

.swiper-button-next,
.swiper-button-prev {
    color: #ff4081;
}

.swiper-pagination-bullet-active {
    background: #ff4081;
}

/* Detalhes do projeto */
.project-detail {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
    background: #1c1c1c;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(255, 20, 147, 0.2);
}

.project-detail h2 {
    color: #ff4081;
    margin-bottom: 1rem;
}

.project-detail p {
    margin-bottom: 1.5rem;
    color: #ddd;
}

.project-detail a {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: #ff4081;
    color: #fff;
    border-radius: 8px;
    font-weight: bold;
    transition: background 0.2s ease;
}

.project-detail a:hover {
    background: #ff79a1;
}

/* Formulários e Admin */
form label {
    display: block;
    margin-top: 1rem;
    color: #ff79a1;
}

form input, form textarea, form button {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.5rem;
    background: #2b2b2b;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
}

form button {
    background: #ff4081;
    border: none;
    cursor: pointer;
    font-weight: bold;
    margin-top: 1.5rem;
}

form button:hover {
    background: #ff79a1;
}

/* Responsivo */
@media (max-width: 768px) {
    .project-card img {
        height: 140px;
    }

    .carousel-img {
        height: 250px;
    }

    .project-detail {
        padding: 1rem;
    }

    .project-grid {
        padding: 1rem;
        grid-template-columns: 1fr;
    }
}

/* Container base */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    box-sizing: border-box;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* EDIÇÃO ESPECÍFICA PARA editar.html */
.edit-form {
    background-color: #1e1e1e;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(255, 20, 147, 0.2);
    max-width: 900px;
    margin: 2rem auto;
}

.edit-form input[type="text"],
.edit-form textarea,
.edit-form input[type="file"] {
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    background-color: #1f1f1f;
    color: white;
}

.edit-form button {
    padding: 0.6rem 1.2rem;
    background-color: #444;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.edit-form button:hover {
    background-color: #666;
}

.edit-image-preview {
    position: relative;
    display: inline-block;
    margin: 0.5rem;
    padding-top: 1.5rem;
}

.edit-image-preview img {
    max-width: 150px;
    max-height: 150px;
    border-radius: 12px;
    object-fit: cover;
    display: block;
}


/* Ajustes para o formulário de edição */
.admin-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(255, 20, 147, 0.2);
}

.admin-form label {
    display: block;
    margin-top: 1rem;
    color: #ff79a1;
}

.admin-form input[type="text"],
.admin-form input[type="url"],
.admin-form textarea,
.admin-form input[type="file"] {
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    background-color: #1f1f1f;
    color: white;
}

.admin-form button {
    padding: 0.6rem 1.2rem;
    background-color: #ff4081;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.admin-form button:hover {
    background-color: #ff79a1;
}

/* Visualização das imagens */
.image-preview {
    position: relative;
    margin-bottom: 1rem;
}

.preview-img {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
}

/* Botão de remover simplificado */
.remove-btn {
    display: block;
    width: auto;
    padding: 0.6rem;
    background-color: #c00;
    color: white;
    border: none;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
    margin-top: 1rem;
}

.remove-btn:hover {
    background-color: #e00;
}

/* Grid para imagens extras */
.clickable-img {
    display: block;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.clickable-img:hover {
    transform: scale(1.02);
}

.clickable-img::after {
    content: "🗑️ Clique para remover";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 0, 0, 0.5);
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-shadow: 1px 1px 2px #000;
}

.clickable-img:hover::after {
    opacity: 1;
}

/* As imagens seguem o mesmo estilo */
.preview-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
}

/* Grid e responsividade continuam igual */
.extra-images-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    max-width: 100%;
    margin-top: 1rem;
}

.extra-images-grid img {
    max-width: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.extra-img-box {
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

@media (max-width: 768px) {
    .extra-images-grid {
        grid-template-columns: 1fr 1fr;
    }

    .preview-img {
        height: 150px;
    }
}

/* Animação de remoção de imagens */
.project-card img.removed {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card img.removed + .remove-btn {
    display: block;
    opacity: 1;
}


/* Header geral */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: #111;
  border-bottom: 2px solid #333;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Lado esquerdo e direito */
.header-left,
.header-right {
  display: flex;
  align-items: center;
}

/* Botão ícone */
.icon-button {
  font-size: 1.8rem;
  text-decoration: none;
  color: #fff;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  transition: background 0.3s ease;
}

.icon-button:hover {
  background-color: #222;
}

/* Link do GitHub */
.header-right a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  background-color: #444;
  transition: background 0.3s ease;
}

.header-right a:hover {
  background-color: #666;
}

/* Responsividade */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
  }

  .header-left,
  .header-right {
    justify-content: center;
    width: 100%;
  }

  .icon-button,
  .header-right a {
    font-size: 1.4rem;
    padding: 0.5rem 1rem;
  }
}

@media (max-width: 480px) {
  .icon-button,
  .header-right a {
    font-size: 1.2rem;
    padding: 0.4rem 0.8rem;
  }
}
