:root {
    --bg: #0f0f10;
    --card: #141416;
    --accent: #f3f3f3;
    --primary: rgba(78, 84, 200, 1);
    --primary-hover: rgba(78, 84, 200, 1);
    --error: #ef4444;
    --success: #10b981;
    --transition: all 0.2s ease
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--accent);
    font-family: Inter,system-ui,-apple-system,sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-top: 4rem
}

/* Remove visualmente a barra, mas mantém a rolagem funcional */
::-webkit-scrollbar {
  display: none;
}

html, body {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge antigo */
  overflow-y: auto;
}


main {
    min-height: calc(100vh - 4rem);
    padding-top: 2rem
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

/* ========== HEADER & NAVIGATION ========== */
.site-header {
    background: rgba(15, 15, 16, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0
}

.site-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.logo {
    text-decoration: none;
    display: block;
}

.logo-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
}

.logo-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 0.7rem;
    font-weight: 400;
    color: rgba(243, 243, 243, 0.6);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.logo:hover .logo-name {
    color: var(--primary);
}

.logo:hover .logo-subtitle {
    color: var(--primary);
    opacity: 0.8;
}

.user-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  vertical-align: middle;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.user-icon:hover {
  opacity: 0.9;
}

.nav-links {
    display: flex;
    gap: 1.5rem
}

.nav-links a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    opacity: 0.8;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem
}

.nav-links a:hover {
    opacity: 1;
    color: var(--primary)
}

.swal2-popup {
    font-size: 1.1rem !important;
    font-family: Inter,system-ui,-apple-system,sans-serif !important;
    color: #e0e0e0 !important;
    background: var(--card) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.swal2-title {
    color: #ffffff !important;
    font-weight: 600 !important;
}

.swal2-html-container {
    color: #e0e0e0 !important;
}

.swal2-input,
.swal2-textarea {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
}

.swal2-input::placeholder,
.swal2-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

.swal2-input:focus,
.swal2-textarea:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1) !important;
}

/* Labels do modal */
.swal2-html-container label {
    color: #ffffff !important;
}

/* Texto pequeno (hint) */
.swal2-html-container small {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Botões customizados */
.swal2-confirm.modern-confirm-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    color: white !important;
    border: none !important;
    padding: 12px 28px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3) !important;
}

.swal2-confirm.modern-confirm-btn:hover {
    background: #7c3aed !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4) !important;
}

.swal2-confirm.modern-confirm-btn:active {
    transform: translateY(0) !important;
}

.swal2-cancel.modern-cancel-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #e0e0e0 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    padding: 12px 28px !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
}

.swal2-cancel.modern-cancel-btn:hover {
    background: #ed3a3a !important;
    transform: translateY(-2px) !important;
}

.swal2-cancel.modern-cancel-btn:active {
    transform: translateY(0) !important;
}

/* Container dos botões */
.swal2-actions {
    gap: 12px !important;
    margin-top: 24px !important;
}

/* Botão Voltar ao Topo */
#scrollToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.08) !important;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1000;
}

#scrollToTop.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#scrollToTop:hover {
    background: #7c3aed;
    transform: translateY(-5px);
    box-shadow: 0 1px 20px rgba(139, 92, 246, 0.4);
}

#scrollToTop:active {
    transform: translateY(-2px);
}

/* Responsivo */
@media (max-width: 768px) {
    #scrollToTop {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 18px;
    }
}

/* ========== AUTH AREA ========== */
.auth-area {
    max-width: 400px;
    margin: 3rem auto;
    background: var(--card);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0;
    transition: opacity 0.3s ease
}

.auth-area h2 {
    margin: 0 0 2rem;
    font-size: 1.5rem;
    text-align: center;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem
}

.auth-area h2 i {
    color: var(--primary);
    font-size: 1.25rem
}

.input-group {
    margin-bottom: 1.5rem
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: rgba(243, 243, 243, 0.7);
    font-weight: 500
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--accent);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.15)
}

.input-group textarea {
    min-height: 100px;
    resize: vertical;
}

.input-group small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: rgba(243, 243, 243, 0.5);
}

/* ========== BUTTONS ========== */
.btn-primary, 
.btn-secondary, 
button:not(.remove-preview):not(.filter-btn) {
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: var(--accent);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-1px);
}

.delete-btn {
    background: rgba(239, 68, 68, 0.1) !important;
    color: var(--error) !important
}

.delete-btn:hover {
    background: var(--error) !important;
    color: white !important
}

/* Botão de filtro */
#filterBtn {
    color: var(--accent);
    background: var(--card);
    border: none; /* Tirar borda fraca */
    border-radius: 8px;
    padding: 10px 16px;
    margin-right: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    transition: all 0.3s ease;
}

#filterBtn i {
    font-size: 16px; /* Ícone proporcional */
}

#filterBtn:hover {
    background: var(--primary);
    box-shadow: 0 1px 20px rgba(139, 92, 246, 0.4);
    transform: translateY(-1px); /* Leve efeito de “flutuar” */
}

/* Botões de navegação do lightbox */
.sl-prev, .sl-next {
    background: rgba(0,0,0,0.6) !important;
    color: white !important;
    border-radius: 50% !important;
    width: 45px !important;
    height: 45px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.3s ease;
    position: absolute !important;
}

/* Ícones SVG centralizados corretamente */
.sl-prev svg, .sl-next svg {
    width: 60% !important;   /* Ocupa 60% do botão, ajuste se precisar */
    height: 60% !important;
    display: block;
    margin: 0;
    padding: 0;
    transform: translate(0, 0); /* Garante que fique centralizado */
}


/* ========== FILTERS ========== */
.filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--accent);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(33,150,243,0.1);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.filter-btn:hover::before {
    width: 300px;
    height: 300px;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 1px 20px rgba(139, 92, 246, 0.4);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(33,150,243,0.3);
}

.filter-btn.active::before {
    display: none;
}

/* ========== GRID LAYOUT ========== */
.grid {
    column-count: 4;
    column-gap: 1rem;
}

@media (max-width: 1200px) {
    .grid { column-count: 3; }
}

@media (max-width: 768px) {
    .grid { column-count: 2; }
}

@media (max-width: 480px) {
    .grid { column-count: 1; }
}

/* ========== CARDS ========== */

.card-wrapper {
    display: inline-block;
    width: 100%;
    margin: 0 0 1rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card {
    background: var(--card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin: 0.5rem;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(33,150,243,0.1), rgba(156,39,176,0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-4px);
}

.card:hover::before {
    opacity: 1;
}

.card-image-container {
    width: 100%;
    overflow: hidden;
    background: rgba(255,255,255,0.02);
}

.card-image-container img,
.card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.card:hover .card-image-container img,
.card:hover img {
    transform: scale(1.08);
}

.card-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    min-height: 2.8em;
}

.card .meta {
    display: none;
    padding: 1rem;
}

.card .meta h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.card .meta .categoria {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.75rem;
    background: rgba(30, 144, 255, 0.15);
    border-radius: 999px;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
    margin: 0;
}

.card .meta .categoria::before {
    content: '🏷️';
    font-size: 0.75rem;
}

.card-date {
    font-size: 0.85rem;
    color: rgba(243, 243, 243, 0.6);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: auto;
}

.card-date::before {
    content: '📅';
}

.card-actions {
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255,255,255,0.02);
}

.card-actions button {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.875rem;
}

/* ========== TAGS ========== */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: auto;
}

.tag {
    background: rgba(30, 144, 255, 0.15);
    color: var(--primary);
    padding: 0.25rem 0.65rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
}

.tag:hover {
    background: rgba(30, 144, 255, 0.25);
}

.tag i {
    margin-left: 0.3rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.tag i:hover {
    opacity: 1;
}

/* ========== ADMIN AREA ========== */
.admin-panel {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-section,
.images-section {
    background: var(--card);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.upload-section h2,
.images-section h2 {
    margin: 0 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    color: var(--accent);
}

/* ========== UPLOAD AREA ========== */
.upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.02);
    position: relative;
}

.upload-area input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary);
    background: rgba(30, 144, 255, 0.08);
}

.upload-area i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
    opacity: 0.8;
}

.upload-area p {
    margin: 0.5rem 0 0;
    color: rgba(243, 243, 243, 0.7);
    font-size: 0.95rem;
}

/* ========== PREVIEW ========== */
.upload-preview {
    margin-top: 2rem;
}

.upload-preview h3 {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    color: var(--accent);
    opacity: 0.9;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-preview {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(239, 68, 68, 0.85);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
    font-size: 0.875rem;
}

.remove-preview:hover {
    background: var(--error);
    transform: scale(1.1);
}

.metadata-form {
    background: rgba(255,255,255,0.03);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1rem;
    border: 1px solid rgba(255,255,255,0.05);
}

.upload-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.03);
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
    border: 1px solid rgba(255,255,255,0.05);
}

#imageCount {
    color: var(--accent);
    font-size: 0.875rem;
    opacity: 0.8;
}

/* ========== ADMIN CONTROLS ========== */
.admin-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-toggle button {
    padding: 0.6rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-toggle button.active {
    background: var(--primary) !important;
    color: white !important;
}

.search-bar {
    position: relative;
    flex: 1;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-bar i {
    position: absolute;
    left: 0.75rem;
    color: var(--accent);
    opacity: 0.5;
}

.search-bar input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.25rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: var(--accent);
}

/* ========== LIST VIEW ========== */
.list-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.list-item {
    background: var(--card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    display: grid;
    grid-template-columns: 150px 1fr auto;
    gap: 1.5rem;
    align-items: start;
    border: 1px solid rgba(255,255,255,0.05);
}

.list-thumb {
    width: 150px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255,255,255,0.03);
}

.list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.list-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.edit-title,
.edit-description,
.tags-input input {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 0.6rem;
    color: var(--accent);
    font-size: 0.9rem;
    font-family: inherit;
}

.edit-title {
    font-size: 1rem;
    font-weight: 600;
}

.edit-description {
    min-height: 80px;
    resize: vertical;
}

.tags-input {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.list-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.list-actions button {
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
}

/* ========== LIGHTBOX CUSTOMIZAÇÃO ========== */
.sl-caption {
    background: rgba(0,0,0,0.85) !important;
    backdrop-filter: blur(12px);
    padding: 1.5rem !important;
    border-radius: 12px;
    margin: 1rem;
}

.sl-caption h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: white;
}

.sl-caption .tags-caption {
    color: #64B5F6;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.sl-caption .description {
    margin-top: 0.75rem;
    line-height: 1.6;
    opacity: 0.9;
    color: white;
}

.sl-caption .date {
    margin-top: 0.5rem;
    opacity: 0.7;
    font-size: 0.85rem;
    color: white;
}

/* ========== MENSAGENS ========== */
.message {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
    font-weight: 500;
}

.success {
    background: var(--success);
    color: white;
}

.error {
    background: var(--error);
    color: white;
}

/* ========== FOOTER ========== */
.site-footer {
    background: var(--card);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-info h3 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    color: var(--accent);
}

.footer-info p {
    margin: 0;
    color: rgba(243, 243, 243, 0.6);
    font-size: 0.875rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: var(--accent);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 1px 20px rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

/* ========== RESPONSIVIDADE ========== */
@media (max-width: 768px) {
    body {
        padding-top: 3.5rem;
    }

    .container {
        padding: 15px;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .card-image-container {
        height: 180px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.875rem;
    }
    
    .list-item {
        grid-template-columns: 100px 1fr;
        gap: 1rem;
    }
    
    .list-actions {
        grid-column: 1 / -1;
        flex-direction: row;
    }
    
    .list-thumb {
        width: 100px;
        height: 75px;
    }
    
    .admin-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-bar {
        max-width: 100%;
    }

    .auth-area,
    .upload-section,
    .images-section {
        padding: 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    .card-image-container {
        height: 200px;
    }

    .preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

/* Lightbox overlay escuro (força) */
.sl-overlay, .simplelightbox-overlay, .sl-overlay__bg {
  background: rgba(0,0,0,0.95) !important;
}

/* botão editar que aparece no admin (posicione no canto) */
.admin-edit-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 20;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: none; /* só exibe em modo admin */
}

/* wrapper com posição relativa para botão */
.card-wrapper .card {
  position: relative;
}

/* se estiver em admin (atributo data-admin="true" no body), mostra o botão */
body[data-admin="true"] .admin-edit-btn {
  display: block;
}

/* pequenas responsividades */
@media (max-width: 600px) {
  .grid { column-width: 160px; column-gap: 12px; }
}