/* ===== GALERIA - ESTILOS ESPECÍFICOS APRIMORADOS ===== */

/* ===== THEME TOGGLE BUTTON PARA GALERIA ===== */
/* ===== LOADING SCREEN ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    background-image:
        radial-gradient(circle at 20% 80%, rgba(44, 95, 65, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(44, 95, 65, 0.03) 0%, transparent 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-content {
    text-align: center;
    max-width: 400px;
    padding: 0 20px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--glass-border);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

.loading-content h2 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 24px;
}

.loading-content p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* ===== LOGIN SCREEN ===== */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-bg);
    background-image:
        radial-gradient(circle at 20% 80%, rgba(44, 95, 65, 0.08) 0%, transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(44, 95, 65, 0.05) 0%, transparent 60%);
    padding: 80px 20px 20px;
}

.login-container {
    background: var(--glass-bg);
    padding: 50px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    max-width: 500px;
    width: 100%;
    text-align: center;
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

.login-header {
    margin-bottom: 40px;
}

.login-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 20px;
    filter: brightness(1.2);
}

.login-header h1 {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 10px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* ===== TOKEN FORM ===== */
.token-form {
    margin-bottom: 30px;
}

.token-form .form-group {
    text-align: left;
    margin-bottom: 25px;
}

.token-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.token-form input {
    width: 100%;
    padding: 18px;
    border: 2px solid var(--glass-border);
    border-radius: var(--border-radius);
    font-size: 16px;
    font-family: monospace;
    letter-spacing: 1px;
    transition: var(--transition);
    text-align: center;
    background: var(--glass-bg);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.token-form input::placeholder {
    color: var(--text-light);
}

.token-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 95, 65, 0.2);
    background: var(--dark-tertiary);
}

.token-form small {
    display: block;
    margin-top: 8px;
    color: var(--text-light);
    font-size: 14px;
}

.token-form button {
    width: 100%;
    padding: 18px;
    font-size: 16px;
}

/* ===== LOGIN HELP ===== */
.login-help {
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.login-help p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 14px;
}

.help-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.help-link:hover {
    color: var(--primary-dark);
}

[data-theme="dark"] .help-link {
    color: var(--accent-emerald);
}

[data-theme="dark"] .help-link:hover {
    color: var(--white);
}

/* ===== CLIENT INFO ===== */
.client-info {
    margin-top: 70px;
    padding: 50px 0 10px;
    background: var(--dark-secondary);
    background-image:
        radial-gradient(circle at 20% 80%, rgba(44, 95, 65, 0.05) 0%, transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(44, 95, 65, 0.03) 0%, transparent 60%);
}

.client-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.client-welcome h1 {
    font-size: clamp(1.6rem, 3vw, 2rem);
    color: var(--text-primary);
    margin-bottom: 4px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.client-welcome p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

.client-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 8px 12px;
    background: var(--glass-bg);
    border-radius: var(--border-radius);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    min-width: 110px;
}

.stat-item .stat-number {
    display: block;
    font-family: var(--font-primary);
    font-size: 26px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-item .stat-label {
    font-size: 0.65rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ===== GALLERY CONTROLS ===== */
.gallery-controls {
    background: var(--dark-bg);
    border-bottom: 1px solid var(--glass-border);
    padding: 8px 0;
    position: static;
    top: auto;
    z-index: auto;
    backdrop-filter: blur(20px);
}

.controls-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.view-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.view-btn {
    padding: 10px 20px;
    min-width: 110px;
    border: 2px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-secondary);
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-light);
}

.view-btn.active,
.view-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--glow);
}

.gallery-actions {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.gallery-actions .btn {
    padding: 10px 18px;
    font-size: 0.9rem;
}

.download-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 220px;
}

.download-status {
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 12px;
    min-height: 24px;
}

.download-status .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--glass-border);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.download-status.active {
    display: inline-flex;
}

.download-status.status-success {
    color: var(--accent-emerald, #64d18a);
}

.download-status.status-error {
    color: var(--danger-color, #ff7676);
}

.download-status.status-success .spinner,
.download-status.status-error .spinner {
    display: none;
}

#bulkDownloadStatus {
    width: 100%;
    margin-top: 0;
}

#bulkDownloadStatus.active {
    display: flex;
}

.modal-actions .download-status.active {
    display: flex;
}

.album-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0 8px;
}

.album-filter-btn {
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-primary);
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(12px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.album-filter-btn .count {
    background: var(--dark-secondary);
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
}

.album-filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.album-filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow-light);
}

.album-filter-btn.active .count {
    background: rgba(0, 0, 0, 0.2);
    color: var(--white);
}

.album-group-wrapper {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.album-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.album-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.album-group-header h3 {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    color: var(--text-primary);
    font-weight: 600;
}

.album-count {
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 6px 14px;
    border-radius: 999px;
    backdrop-filter: blur(12px);
}

.album-grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.album-list-view {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.album-card {
    position: relative;
    background: var(--dark-tertiary);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.album-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.album-cover {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: var(--dark-secondary);
}

.album-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 18px 20px;
    background: linear-gradient(180deg, rgba(14, 25, 20, 0) 0%, rgba(8, 12, 10, 0.85) 90%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 110px;
}

.album-count-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(7, 12, 10, 0.7);
    color: var(--white);
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(8px);
}

.album-card.list-view {
    flex-direction: row;
    align-items: stretch;
    padding: 15px;
    gap: 20px;
}

.album-card.list-view .album-cover {
    width: 220px;
    min-width: 220px;
    height: 160px;
    border-radius: var(--border-radius);
}

.album-card.list-view .album-count-badge {
    top: 10px;
    left: 10px;
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.album-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--white);
}

.album-meta h4 {
    font-size: 1.1rem;
    color: inherit;
    font-family: var(--font-primary);
    margin: 0;
}

.album-meta p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    margin: 0;
}

.album-card.list-view .album-overlay {
    position: static;
    background: none;
    padding: 0;
    min-height: auto;
}

.album-card.list-view .album-meta {
    color: var(--text-primary);
    gap: 6px;
}

.album-card.list-view .album-meta p {
    color: var(--text-secondary);
}

.album-detail-view {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.album-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.album-detail-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.album-detail-info h3 {
    font-family: var(--font-primary);
    font-size: 2rem;
    color: var(--text-primary);
}

.album-detail-info .album-count {
    margin-top: 8px;
}

.search-bar {
    position: relative;
    max-width: 360px;
    width: 100%;
    margin-top: 15px;
}

.search-bar input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 2px solid var(--glass-border);
    border-radius: 25px;
    font-size: 18px;
    transition: var(--transition);
    background: var(--glass-bg);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.search-bar input::placeholder {
    color: var(--text-light);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 95, 65, 0.2);
    background: var(--dark-tertiary);
}

.search-bar i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

/* ===== PHOTO GALLERY ===== */
.photo-gallery {
    padding: 6px 0;
    background: var(--dark-secondary);
    min-height: 60vh;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 15px;
}

.gallery-grid.list-view {
    grid-template-columns: 1fr;
}

/* ===== PHOTO ITEM ===== */
.photo-item {
    position: relative;
    background: var(--glass-bg);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.photo-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.photo-item.selected {
    border: 3px solid var(--primary-color);
    box-shadow: var(--glow);
}

.photo-item.list-view {
    display: flex;
    align-items: center;
    padding: 15px;
    gap: 20px;
}

.photo-container {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.photo-item.list-view .photo-container {
    width: 120px;
    height: 80px;
    flex-shrink: 0;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    filter: brightness(0.9) saturate(1.1);
}

.photo-item:hover img {
    transform: scale(1.05);
    filter: brightness(1) saturate(1.2);
}

/* ===== PHOTO OVERLAY ===== */
.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 17, 23, 0.55);
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    backdrop-filter: blur(6px);
    text-align: center;
    padding: 20px;
    pointer-events: none;
}

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

.photo-overlay-content {
    width: 100%;
}

.photo-overlay-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    letter-spacing: 0.02em;
}

.photo-item.list-view .photo-overlay {
    display: none;
}

/* ===== PHOTO INFO ===== */
.photo-info {
    padding: 15px;
}

.photo-item.grid-view .photo-info {
    display: none;
}

.photo-item.list-view .photo-info {
    padding: 0;
    flex: 1;
}

.photo-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
    font-size: 14px;
}

.photo-item.grid-view .photo-name {
    color: var(--white);
    margin: 0;
    font-size: 1rem;
}

.photo-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-light);
}

.photo-item.grid-view .photo-meta {
    display: none;
}

.photo-size {
    background: var(--dark-tertiary);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

/* ===== SELECTION CHECKBOX ===== */
.photo-checkbox {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
}

.checkbox-container {
    position: relative;
    cursor: pointer;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    height: 25px;
    width: 25px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.checkbox-container input:checked ~ .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: var(--glow);
}

.checkmark:after {
    content: "";
    display: none;
    width: 6px;
    height: 12px;
    border: solid var(--text-primary);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

/* ===== WATERMARK ===== */
.watermark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 50px,
        rgba(44, 95, 65, 0.08) 50px,
        rgba(44, 95, 65, 0.08) 100px
    );
    pointer-events: none;
    z-index: 5;
}

.watermark::before {
    content: 'GABRIEL LIMA RETRATOS';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-family: var(--font-primary);
    font-size: 24px;
    font-weight: 600;
    color: rgba(44, 95, 65, 0.15);
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* ===== PHOTO MODAL ===== */
.photo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    backdrop-filter: blur(10px);
}

.photo-modal.active {
    display: flex;
}

.modal-content {
    background: var(--dark-card);
    border-radius: var(--border-radius-lg);
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    position: relative;
    display: inline-flex;
    flex-direction: column;
    animation: modalFadeIn 0.3s ease;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 20px;
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 18px;
    line-height: 1.2;
}

.modal-title-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.photo-date-chip {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.2;
}

.modal-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.modal-actions .btn {
    padding-top: 3px;
    padding-bottom: 3px;
}

.modal-actions .download-status {
    flex-basis: 100%;
    margin-top: 4px;
}

.modal-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 40px 0;
    box-sizing: border-box;
    gap: 16px;
    min-height: 0;
}

.modal-loading-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.1s ease, transform 0.1s ease;
    overflow: hidden;
}

.modal-loading-bar.active {
    opacity: 1;
    transform: translateY(0);
}

.modal-loading-progress {
    display: block;
    width: 0%;
    height: 100%;
    background: var(--primary-color);
    transition: width 2s ease;
}

.modal-body img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: var(--dark-bg);
    flex: 1 1 auto;
    min-height: 0;
}

.modal-info {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 8px 40px 12px;
    border-top: 1px solid var(--glass-border);
    width: 100%;
    box-sizing: border-box;
    background: transparent;
    text-align: center;
    margin-top: auto;
    align-self: stretch;
}

.modal-info p {
    margin: 5px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.modal-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: var(--dark-card);
    border-top: 1px solid var(--glass-border);
    gap: 20px;
    flex-wrap: wrap;
}

.nav-btn {
    background: var(--gradient-primary);
    color: var(--text-primary);
    border: none;
    padding: 10px 22px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    min-width: 150px;
    justify-content: center;
}

.nav-btn:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: var(--glow);
}

.nav-btn:disabled {
    background: var(--dark-tertiary);
    color: var(--text-light);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#photoCounter {
    color: var(--text-secondary);
    font-weight: 600;
    text-align: center;
    flex: 1;
}

/* ===== ERROR SCREEN ===== */
.error-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-bg);
    padding: 80px 20px 20px;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(44, 95, 65, 0.05) 0%, transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(44, 95, 65, 0.03) 0%, transparent 60%);
}

.error-container {
    background: var(--glass-bg);
    padding: 50px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    max-width: 500px;
    width: 100%;
    text-align: center;
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

.error-container i {
    font-size: 64px;
    color: #ff6b6b;
    margin-bottom: 20px;
}

.error-container h2 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 24px;
}

.error-container p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 16px;
}

/* ===== DOWNLOAD PROGRESS ===== */
.download-progress {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    background: var(--glass-bg);
    padding: 30px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    min-width: 400px;
    max-width: 90vw;
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

.progress-container {
    text-align: center;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.progress-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--dark-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    color: var(--text-light);
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

/* ===== NOTIFICATIONS ===== */
.notification-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 10002;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    background: var(--glass-bg);
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    min-width: 300px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.success {
    border-left-color: var(--accent-emerald);
}

.notification.error {
    border-left-color: #ff6b6b;
}

.notification.warning {
    border-left-color: #ffa726;
}

.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notification-icon {
    font-size: 18px;
    margin-top: 2px;
}

.notification-text h4 {
    margin: 0 0 5px 0;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

.notification-text p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    font-size: 16px;
    transition: var(--transition);
}

.notification-close:hover {
    color: var(--text-primary);
}

/* ===== ANIMAÇÕES APRIMORADAS ===== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.loading-skeleton {
    background: linear-gradient(90deg, var(--dark-tertiary) 25%, var(--dark-secondary) 50%, var(--dark-tertiary) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* ===== RESPONSIVIDADE APRIMORADA ===== */
@media (max-width: 768px) {
    .login-container {
        padding: 30px;
        margin: 20px;
    }

    .client-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .client-stats {
        gap: 20px;
        justify-content: center;
    }

    .controls-header {
        flex-direction: column;
        gap: 15px;
    }

    .gallery-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .album-filters {
        justify-content: center;
        gap: 10px;
    }

    .album-grid-view {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .album-filter-btn {
        width: 100%;
        justify-content: center;
    }

    .album-group-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .album-count {
        align-self: flex-start;
    }

    .search-bar {
        max-width: 100%;
        order: -1;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }

    .modal-content {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-header {
        padding: 15px;
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .modal-body {
        padding: 0 16px;
    }
    
    .modal-info {
        padding: 12px 16px;
        gap: 12px;
    }

    .modal-navigation {
        flex-direction: column;
        gap: 15px;
    }

    .nav-btn {
        width: 100%;
        justify-content: center;
    }

    #photoCounter {
        text-align: center;
        order: -1;
        width: 100%;
        flex: auto;
    }

    .download-progress {
        min-width: 320px;
        padding: 20px;
    }

    .notification {
        min-width: 280px;
        margin-right: 10px;
    }
}

@media (max-width: 480px) {
    .login-container,
    .error-container {
        padding: 20px;
    }

    .login-logo {
        width: 60px;
        height: 60px;
    }

    .client-stats {
        gap: 15px;
        flex-wrap: wrap;
    }

    .stat-item {
        padding: 15px;
        min-width: 100px;
    }

    .stat-item .stat-number {
        font-size: 24px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .photo-container {
        height: 200px;
    }

    .overlay-actions {
        gap: 8px;
    }

    .overlay-btn {
        width: 40px;
        height: 40px;
    }

    .album-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .album-filter-btn {
        width: 100%;
    }

    .view-options {
        width: 100%;
    }

    .album-card.list-view {
        flex-direction: column;
    }

    .album-card.list-view .album-cover {
        width: 100%;
        min-width: auto;
        height: 200px;
    }

    .modal-body img {
        max-height: 50vh;
    }

    .download-progress {
        min-width: 280px;
        padding: 15px;
    }

    .view-btn {
        padding: 12px 20px;
        font-size: 14px;
        width: 100%;
        min-width: 0;
    }
}

/* ===== SCROLLBAR PERSONALIZADA ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* ===== SELEÇÃO DE TEXTO ===== */
::selection {
    background: var(--primary-color);
    color: var(--text-primary);
}

::-moz-selection {
    background: var(--primary-color);
    color: var(--text-primary);
}

/* ===== PRINT STYLES ===== */
@media print {
    .header,
    .gallery-controls,
    .photo-overlay,
    .photo-checkbox,
    .modal-navigation {
        display: none !important;
    }
    
    .photo-item {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}
.nav-menu--gallery {
    flex: 1;
    justify-content: flex-end;
}
