body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
}

main {
    flex: 1;
}

.photo-card {
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    border-radius: 8px;
    /* Slightly sharper but still modern */
}

.photo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.photo-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform 0.3s;
    cursor: pointer;
}

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

.photo-card.selected {
    outline: 4px solid #0d6efd;
    outline-offset: -4px;
}

.photo-checkbox {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 24px;
    height: 24px;
    z-index: 10;
    cursor: pointer;
    display: none;
    /* Só aparece no modo seleção */
}

.selection-mode .photo-checkbox {
    display: block;
}

.selection-toolbar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    background: white;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: none;
}

.selection-toolbar.active {
    display: flex;
    align-items: center;
    gap: 20px;
}

.album-cover {
    width: 100%;
    height: 200px;
    /* Reduced slightly for better proportions */
    object-fit: cover;
}

.album-cover-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-zone {
    border: 2px dashed #6c757d;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    background-color: #f8f9fa;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: #0d6efd;
    background-color: #e8f0fe;
}

.upload-zone input[type="file"] {
    display: none;
}

.photo-viewer-img {
    max-height: 70vh;
    object-fit: contain;
    width: 100%;
}

.navbar-brand {
    font-size: 1.4rem;
}

.stat-card {
    border-left: 4px solid;
    border-radius: 8px;
}

.stat-card.users {
    border-color: #0d6efd;
}

.stat-card.albums {
    border-color: #198754;
}

.stat-card.photos {
    border-color: #fd7e14;
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.login-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.breadcrumb-item+.breadcrumb-item::before {
    content: "›";
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.8)), url('https://images.unsplash.com/photo-1452587925148-ce544e77e70d?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid #e9ecef;
}

.avatar-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #6c757d;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Mosaic Layout */
.mosaic-grid {
    column-count: 4;
    column-gap: 1.5rem;
}

@media (max-width: 992px) {
    .mosaic-grid {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    .mosaic-grid {
        column-count: 2;
    }
}

@media (max-width: 576px) {
    .mosaic-grid {
        column-count: 1;
    }
}

.mosaic-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.mosaic-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.mosaic-item img {
    width: 100%;
    height: auto;
    display: block;
}

.mosaic-item .placeholder-img {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mosaic-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 60%, transparent 100%);
    padding: 20px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.mosaic-item:hover .mosaic-overlay {
    opacity: 1;
}

.mosaic-title {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.mosaic-info {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Novo Layout de Grade de Fotos (Masonry-like ou Square Grid) */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

@media (max-width: 576px) {
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }
}

/* Modal de Visualização Ampliada */
#photoModal .modal-dialog {
    max-width: 95vw;
    margin: 1.75rem auto;
}

#photoModal .modal-content {
    background: transparent !important;
    border: none;
}

#photoModalImg {
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    cursor: zoom-out;
}

#photoModal .modal-footer {
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(10px);
    border-radius: 0 0 8px 8px;
    margin-top: 10px;
}