/* --- VARIÁVEIS & TEMAS --- */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-tertiary: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --border-color: #2a2a2a;
  --border-color1: #27203a;
  --accent: #fff;
  --modal-overlay: rgba(0, 0, 0, 0.96);
  --card-overlay: rgba(0, 0, 0, 0.6);
}

body.light-mode {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f8f8;
  --bg-tertiary: #f0f0f0;
  --tw-bg-opacity: .4;
  --text-primary: #0a0a0a;
  --text-secondary: #606060;
  --border-color: #e0e0e0;
  --accent: #000;
  --modal-overlay: rgba(255, 255, 255, 0.96);
  --card-overlay: rgba(255, 255, 255, 0.3);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, sans-serif;
  transition: background-color 0.4s ease, color 0.4s ease;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

/* Garantir que menu mobile não seja afetado pelo flex-col do body */
body.flex.flex-col .mobile-menu-drawer {
  position: fixed;
  z-index: 999999;
}

/* SCROLLBAR */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--text-secondary);
  border-radius: 3px;
}

/* MASONRY GRID - DEFAULT (3 COLUMNS) */
.masonry-grid {
  column-count: 1;
  column-gap: 20px;
}
@media (min-width: 768px) {
  .masonry-grid {
    column-count: 2;
  }
}
@media (min-width: 1200px) {
  .masonry-grid {
    column-count: 3;
  }
}

/* NOVO ESTILO: LAYOUT 5 COLUMNS (Densidade maior) */
.masonry-grid.layout-5 {
  column-count: 2;
  column-gap: 10px;
}
@media (min-width: 768px) {
  .masonry-grid.layout-5 {
    column-count: 3;
  }
}
@media (min-width: 1024px) {
  .masonry-grid.layout-5 {
    column-count: 4;
  }
}
@media (min-width: 1280px) {
  .masonry-grid.layout-5 {
    column-count: 5;
  }
}

/* Admin Grid Layout */
.masonry-grid-admin {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.masonry-grid-admin.layout-5 {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.masonry-grid-admin.layout-5 .admin-project-card {
  break-inside: avoid;
  margin-bottom: 1rem;
}

.layout-btn-admin {
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.layout-btn-admin:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.layout-btn-admin.active {
  background-color: var(--text-primary);
  color: var(--bg-primary);
}

.photo-card {
  break-inside: avoid;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-secondary);
  border-radius: 4px;
}

/* Skeleton loader para imagens */
.image-skeleton {
  width: 100%;
  height: 300px;
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 0%,
    var(--bg-tertiary) 50%,
    var(--bg-secondary) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 4px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Fade in suave para imagens carregadas */
.photo-card img {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.photo-card img.loaded {
  opacity: 1;
}

.photo-card img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

/* Contador de views no canto superior direito */
.views-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  padding: 6px 10px;
  border-radius: 20px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  pointer-events: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.views-badge i {
  width: 14px;
  height: 14px;
  stroke-width: 2;
  flex-shrink: 0;
}

.views-badge span {
  line-height: 1;
  min-width: 12px;
  text-align: center;
  display: inline-block;
  transition: transform 0.2s ease;
}

.views-badge .views-count-number {
  font-weight: 600;
}

/* Ajuste quando há botão de delete (admin) */
.photo-card:has(.delete-btn) .views-badge {
  right: 50px;
}

/* Ajuste quando há badge NEW */
.photo-card:has(.new-badge) .views-badge {
  top: 12px;
}

.photo-card:hover img {
  transform: scale(1.05);
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.5) 35%,
    rgba(0, 0, 0, 0) 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  display: block;
  z-index: 40;
}

.photo-card:hover .photo-overlay {
  opacity: 1;
}

.overlay-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px 10px 40px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  z-index: 9999;
  transform: translateY(10px);
  transition: transform 0.3s ease;
  pointer-events: none;
}

.photo-card:hover .overlay-bottom {
  transform: translateY(0);
}

.overlay-title {
  font-size: 18px;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  margin-bottom: 4px;
  position: relative;
  z-index: 50;
}

.overlay-location {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  margin-bottom: 4px;
  position: relative;
  z-index: 50;
}

.overlay-date {
  font-size: 9px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  text-transform: none;
  margin-top: 2px;
  opacity: 0.9;
  position: relative;
  z-index: 50;
}

/* HEADER & NAV */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
}

/* Garantir que menu mobile fique acima de tudo em mobile */
@media (max-width: 767px) {
  header {
    z-index: 50;
  }
  
  .mobile-menu-drawer {
    z-index: 999999 !important;
  }
}

.nav-filter {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.3s;
  position: relative;
  padding-bottom: 4px;
  white-space: nowrap;
}

.nav-filter:hover,
.nav-filter.active {
  color: var(--text-primary);
}

.nav-filter::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-filter.active::after {
  width: 100%;
}

/* Mobile Navigation */
.mobile-menu-drawer {
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 999999 !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  isolation: isolate;
  pointer-events: none;
}

.mobile-menu-drawer:not(.hidden) {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: all !important;
}

.mobile-menu-overlay {
  z-index: 999998 !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.mobile-menu-content {
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 999999 !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  height: 100vh !important;
  width: 280px !important;
  max-width: 85vw !important;
  isolation: isolate;
  will-change: transform;
}

.mobile-menu-drawer:not(.hidden) .mobile-menu-content {
  transform: translateX(0) !important;
}

/* Esconde menu mobile em telas grandes */
@media (min-width: 768px) {
  .mobile-menu-drawer {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }
  
  .mobile-menu-drawer.hidden {
    display: none !important;
  }
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  margin-bottom: 4px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  position: relative;
  z-index: 1;
}

.mobile-nav-item:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.mobile-nav-item.active {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
}

.mobile-nav-item i {
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.mobile-nav-item:hover i,
.mobile-nav-item.active i {
  opacity: 1;
}

.layout-btn-mobile {
  color: var(--text-secondary);
  transition: all 0.2s ease;
  background: transparent;
}

.layout-btn-mobile:hover,
.layout-btn-mobile.active {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

/* Responsive Navigation */
@media (max-width: 767px) {
  header {
    padding: 1rem;
  }

  .nav-filter {
    font-size: 10px;
  }

  /* Logo menor no mobile */
  header span.text-sm {
    font-size: 11px;
  }

  header .w-5 {
    width: 1rem;
    height: 1rem;
  }

  /* Header mais compacto no mobile */
  header .mb-6 {
    margin-bottom: 1rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  /* Tablet: Nav mais compacta */
  .nav-filter {
    font-size: 10px;
  }

  nav.flex.items-center {
    gap: 1rem;
  }
}

/* MODAL */
.modal-backdrop {
  background: var(--modal-overlay);
  backdrop-filter: blur(8px);
}

.modal-content {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
}

#search-modal .modal-content {
  width: 90%;
  max-width: 700px;
  padding: 32px;
  border-radius: 8px;
}

.search-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 6px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s;
}

.search-input:focus {
  border-color: var(--accent);
}

/* EXIF TAGS */
.exif-tag {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 6px 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Software Icons */
.soft-icon {
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  touch-action: manipulation;
  max-inline-size: max-content;
  height: 30px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  text-transform: capitalize;
  border: 1px solid var(--border-color1);
  transition: all 0.2s ease;
  padding: 0 2rem;
}

.soft-icon:hover {
  transform: scale(1.05);
  background: var(--accent);
  color: var(--bg-primary);
}

.soft-ps {
  background: #001e36;
  color: #31a8ff;
  border: 1px solid rgba(49, 168, 255, 0.3);
  text-transform: capitalize;
}

.soft-max {
  background: #222;
  color: #ffa500;
  border: 1px solid rgba(255, 165, 0, 0.3);
  text-transform: capitalize;

}

.soft-corona {
  background: #333;
  color: #c0392b;
  border: 1px solid rgba(192, 57, 43, 0.3);
  text-transform: capitalize;

}

body.light-mode .soft-ps {
  background: #e6f4ff;
  color: #001e36;
  border: 1px solid #cceeff;
  text-transform: capitalize;

}

body.light-mode .soft-max {
  background: #fff5e6;
  color: #8b4500;
  border: 1px solid #ffeacc;
  text-transform: capitalize;

}

body.light-mode .soft-corona {
  background: #ffe6e6;
  color: #a52a2a;
  border: 1px solid #ffcccc;
  text-transform: capitalize;
}

/* COMMENTS SECTION STYLES */
.comment-input-container {
  position: sticky;
  bottom: 0;
  z-index: 10;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
}

/* Garantir que a área de comentários tenha espaço para scroll */
.comments-section {
  min-height: auto;
}

#comments-list {
  max-height: none;
}

.comment-box textarea {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 4px;
  padding: 12px;
  font-size: 13px;
  resize: none;
  outline: none;
  transition: border-color 0.3s;
  padding-right: 40px;
}

.comment-box textarea:focus {
  border-color: var(--accent);
}

.format-btn.active {
  color: var(--accent) !important;
  background: var(--bg-secondary);
  border-radius: 4px;
  padding: 2px;
}

/* Dropdown de formatação */
.format-dropdown {
  position: relative;
}

.format-dropdown-menu {
  animation: fadeIn 0.2s ease;
}

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

/* Estilos para conteúdo de comentário formatado */
.comment-text-content {
  word-wrap: break-word;
}

.comment-text-content h1,
.comment-text-content h2,
.comment-text-content h3 {
  margin: 0.5em 0;
  font-weight: bold;
}

.comment-text-content h1 { font-size: 1.5em; }
.comment-text-content h2 { font-size: 1.3em; }
.comment-text-content h3 { font-size: 1.1em; }

.comment-text-content ul,
.comment-text-content ol {
  margin: 0.5em 0;
  padding-left: 1.5em;
}

.comment-text-content li {
  margin: 0.25em 0;
}

.comment-text-content a {
  color: var(--accent);
  text-decoration: underline;
}

.comment-text-content a:hover {
  opacity: 0.8;
}

.comment-text-content strong {
  font-weight: bold;
}

.comment-text-content em {
  font-style: italic;
}

.comment-text-content u {
  text-decoration: underline;
}

/* Tooltip de data de criação */
.modal-tooltip {
  animation: fadeInTooltip 0.2s ease;
  transform: translateX(-50%);
  left: 50%;
  margin-left: 0;
}

.modal-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--border-color);
}

.modal-tooltip::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--bg-secondary);
  margin-top: -1px;
}

@keyframes fadeInTooltip {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

#modal-location-display.group:hover #modal-created-tooltip {
  display: block !important;
}

#modal-location-display.group {
  position: relative;
}

/* ANIMATION */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Thumbnail Strip */
.thumbnail-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--text-secondary) var(--bg-primary);
}

.thumbnail-strip::-webkit-scrollbar {
  height: 6px;
}

.thumbnail-strip::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

.thumbnail-strip::-webkit-scrollbar-thumb {
  background: var(--text-secondary);
  border-radius: 3px;
}

.thumbnail-item {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
}

/* Aumenta thumbnails em telas maiores */
@media (min-width: 1024px) {
  .thumbnail-item {
    width: 100px;
    height: 100px;
  }
}

@media (min-width: 1440px) {
  .thumbnail-item {
    width: 120px;
    height: 120px;
  }
}

/* Upload Zone Styles */
.upload-zone {
  transition: all 0.3s ease;
}

.upload-zone:hover {
  background-color: var(--bg-secondary);
}

.file-item {
  transition: transform 0.2s ease;
}

.file-item:hover {
  transform: translateX(4px);
}

/* Comments Section - Larger for big screens */
@media (min-width: 1024px) {
  .comments-section {
    font-size: 1.1rem;
  }
  
  .comments-section h5 {
    font-size: 1.25rem;
  }
}

@media (min-width: 1440px) {
  .comments-section {
    font-size: 1.2rem;
  }
  
  .comments-section h5 {
    font-size: 1.5rem;
  }
}

/* Emoji Picker */
#emoji-picker {
  max-height: 300px;
  overflow-y: auto;
}

#emoji-picker::-webkit-scrollbar {
  width: 4px;
}

#emoji-picker::-webkit-scrollbar-thumb {
  background: var(--text-secondary);
  border-radius: 2px;
}

.emoji-btn {
  transition: transform 0.1s ease;
}

.emoji-btn:hover {
  transform: scale(1.2);
}

.emoji-btn:active {
  transform: scale(0.9);
}

/* Custom Popup Styles */
.custom-popup-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.custom-popup-container.active {
  opacity: 1;
  pointer-events: all;
}

.custom-popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.custom-popup-box {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  min-width: 400px;
  max-width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
  z-index: 10001;
}

.custom-popup-container.active .custom-popup-box {
  transform: scale(1) translateY(0);
}

.custom-popup-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.custom-popup-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.custom-popup-body {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

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

.custom-popup-message {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.6;
  word-wrap: break-word;
}

.custom-popup-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.custom-popup-btn {
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  outline: none;
}

.custom-popup-confirm {
  background: #06b6d4;
  color: white;
}

.custom-popup-confirm:hover {
  background: #0891b2;
  transform: translateY(-1px);
}

.custom-popup-cancel {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.custom-popup-cancel:hover {
  background: var(--bg-primary);
}

@media (max-width: 640px) {
  .custom-popup-box {
    min-width: 90%;
    margin: 20px;
  }
}

/* Contenteditable placeholder */
#comment-text[contenteditable="true"]:empty:before {
  content: attr(data-placeholder);
  color: var(--text-secondary);
  pointer-events: none;
}

#comment-text[contenteditable="true"].empty:before {
  content: attr(data-placeholder);
  color: var(--text-secondary);
  pointer-events: none;
}

#comment-text[contenteditable="true"] {
  color: var(--text-primary);
}

#comment-text[contenteditable="true"]:focus {
  border-color: var(--accent);
}

/* Emoji picker positioning */
#emoji-picker {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 8px;
}

.thumbnail-item.active {
  border-color: var(--accent);
}

.layout-btn {
  color: var(--text-secondary);
  transition: color 0.2s;
}

.layout-btn:hover,
.layout-btn.active {
  color: var(--text-primary);
}

/* VIDEO SUPPORT */
.grid-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.grid-video.playing {
  opacity: 1;
}

.video-indicator {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.6);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 20;
  backdrop-filter: blur(2px);
  opacity: 0.8;
}

.modal-video-player {
  width: 100%;
  height: 100%;
  max-height: 80vh;
  object-fit: cover;
  background: black;
}

/* BADGE "NEW" */
.new-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ff3b30;
  color: white;
  font-size: 9px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 30;
  letter-spacing: 1px;
  box-shadow: 0 2px 10px rgba(255, 59, 48, 0.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* BOTÃO DELETAR (ADMIN) */
.delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ff3b30;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.delete-btn:hover {
  background: #d63026;
  transform: scale(1.1);
}

/* LOGIN OVERLAY (ADMIN) */
#login-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.login-box {
  width: 100%;
  max-width: 320px;
  padding: 40px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  text-align: center;
  background: var(--bg-secondary);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* ADMIN EDIT MODE STYLES */
.admin-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-color);
  justify-content: flex-start;
}

.btn-admin {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  text-transform: uppercase;
}

.btn-edit {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--text-primary);
}

.btn-edit:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

.btn-save {
  background: #10b981;
  color: white;
  border: none;
}

.btn-save:hover {
  background: #059669;
}

.btn-cancel {
  background: #ef4444;
  color: white;
  border: none;
}

.btn-cancel:hover {
  background: #dc2626;
}

/* Inputs de Edição */
.edit-input {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px;
  border-radius: 4px;
  margin-bottom: 5px;
  font-size: inherit;
  font-family: inherit;
}

.edit-input:focus {
  border-color: var(--accent);
  outline: none;
}

.edit-textarea {
  min-height: 100px;
  resize: vertical;
}

/* Overlay "Substituir Imagem" */
.replace-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.replace-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.btn-replace {
  background: white;
  color: black;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: bold;
  font-size: 12px;
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.btn-replace:hover {
  transform: scale(1.05);
}

.thumb-delete-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #ef4444;
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  opacity: 0;
  transition: opacity 0.2s;
  border: 1px solid white;
}

.thumbnail-item:hover .thumb-delete-btn {
  opacity: 1;
}

/* Aumenta botão de adicionar em telas maiores */
@media (min-width: 1024px) {
  .thumb-add-btn {
    width: 100px;
    height: 100px;
  }
}

@media (min-width: 1440px) {
  .thumb-add-btn {
    width: 120px;
    height: 120px;
  }
}

.thumb-add-btn {
  min-width: 80px;
  height: 80px;
  background: var(--bg-tertiary);
  border: 1px dashed var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.thumb-add-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-secondary);
}

/* DRAG AND DROP STYLES */
.thumbnail-item[draggable='true'] {
  cursor: grab;
}

.thumbnail-item.dragging {
  opacity: 0.4;
  border: 2px dashed var(--accent);
  transform: scale(0.9);
}

.thumbnail-item.drag-over {
  border-left: 4px solid var(--accent);
}

/* RESPONSIVIDADE 700-800px - CORREÇÃO ESPECÍFICA */
@media (min-width: 700px) and (max-width: 800px) {
  /* Modal - Ajuste do layout */
  #modal .modal-content {
    flex-direction: column;
    height: 95vh;
  }

  #modal .modal-content > div:first-child {
    width: 100% !important;
    height: 50% !important;
  }

  #modal .modal-content > div:last-child {
    width: 100% !important;
    height: 50% !important;
  }

  /* Input de Software no Modal de Edição - Layout Responsivo */
  #modal-software-container .flex.flex-col.sm\:flex-row {
    flex-direction: column;
    gap: 8px;
  }

  #modal-software-container input[type="text"] {
    width: 100%;
    min-width: 0;
  }

  #modal-software-container button {
    width: 100%;
  }

  /* Admin Sidebar - Ajuste para telas médias */
  #admin-content aside {
    width: 200px;
  }

  #admin-content main {
    flex: 1;
  }

  /* Grid de projetos no admin */
  #projects-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ADMIN PANEL - Responsividade geral */
@media (max-width: 768px) {
  #admin-content {
    flex-direction: column;
  }

  #admin-content aside {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  #admin-content main {
    width: 100%;
  }
}

/* Software badges no modal - Ajuste para telas menores */
@media (max-width: 800px) {
  #modal-software-list {
    flex-wrap: wrap;
    gap: 6px;
  }

  #modal-software-list > div {
    font-size: 10px;
    padding: 4px 8px;
  }
}

