:root {
    --bg-dark: #0a0a0a;
    --bg-card: #141414;
    --primary: #D4AF37;
    --gold-gradient: linear-gradient(135deg, #BF953F, #FCF6BA, #B38728, #FBF5B7, #AA771C);
    --gold-gradient-hover: linear-gradient(135deg, #FCF6BA, #BF953F, #FBF5B7, #AA771C, #B38728);
    --text-light: #F8F8F8;
    --text-muted: #aaaaaa;
    --border-color: #2a2a2a;
    --success: #10b981;
    --danger: #ff4444;
}

/* Para navegadores Webkit (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a2e;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #e94560;
  border-radius: 4px;
  border: 2px solid #1a1a2e;
}

::-webkit-scrollbar-thumb:hover {
  background: #ff6b6b;
}

/* Para Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #c8a752 #1a1a2e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

html, body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
}

/* Navbar */
.navbar {
    background: linear-gradient(160deg, rgb(0 0 0), #5a5200);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid;
    border-image: var(--gold-gradient) 1;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(191, 149, 63, 0.15);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.5px;
}

.navbar-brand span, .navbar-brand i {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gold-gradient);
    color: #000;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(191, 149, 63, 0.3);
}

.btn-primary:hover {
    background: var(--gold-gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(191, 149, 63, 0.5);
}

.btn-outline {
    background-color: #0000005c;
    border: 2px solid #BF953F;
    color: #FCF6BA;
}

.btn-outline:hover {
    background: rgba(191, 149, 63, 0.1);
    box-shadow: 0 0 15px rgba(191, 149, 63, 0.2);
}

.btn-danger {
    background-color: transparent;
    border: 2px solid var(--danger);
    color: var(--danger);
}
.btn-danger:hover {
    background-color: var(--danger);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 68, 68, 0.4);
}

/* Layout Main */
.container-main {
    display: flex;
    min-height: calc(100vh - 76px);
}

/* Sidebar Filters */
.sidebar {
    width: 320px;
    background: linear-gradient(307deg, #534c006e, #000000);
    border-right: 1px solid var(--border-color);
    padding: 2rem;
    height: calc(100vh - 76px);
    position: sticky;
    top: 76px;
    overflow-y: auto;
    box-shadow: 5px 0 20px rgba(0,0,0,0.5);
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group label {
    display: block;
    font-size: 0.85rem;
    color: #FCF6BA;
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-group select, .filter-group input {
    width: 100%;
    padding: 0.85rem;
    border-radius: 0.5rem;
    background-color: #050505;
    border: 1px solid #333;
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.filter-group select:focus, .filter-group input:focus {
    outline: none;
    border-color: #BF953F;
    box-shadow: 0 0 10px rgba(191, 149, 63, 0.2);
}

/* Content Area */
.content {
    flex: 1;
    padding: 3rem;
    background: linear-gradient(88deg, #000000cc, #d4af3724);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.header-content h1 {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Grid System */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

/* Card */
.media-card {
    background-color: var(--bg-card);
    border-radius: 1.2rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.media-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(191, 149, 63, 0.15);
    border-color: #BF953F;
}

.card-media-wrapper {
    position: relative;
    width: 100%;
    padding-top: 133%;
    overflow: hidden;
    background-color: #111;
}

.card-media-wrapper img, .card-media-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Quando n�o tem m�dia ou houve erro de carregamento (mostra cinza em vez de preto total) */
.card-media-wrapper .no-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    color: #555;
    font-size: 1.2rem;
    flex-direction: column;
    gap: 1rem;
}

.badge-type {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gold-gradient);
    color: #000;
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pin-novo {
    animation: pulse-pin 2s infinite;
}

@keyframes pulse-pin {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0);
    }
}

.card-body {
    padding: 0.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-role {
    color: #BF953F;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-attributes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.attr-tag {
    background-color: rgba(191, 149, 63, 0.1);
    color: #FCF6BA;
    padding: 0.15rem 0.3rem;
    border-radius: 0.25rem;
    font-size: 0.65rem;
    font-weight: 600;
    border: 1px solid rgba(191, 149, 63, 0.3);
}

.card-actions {
    margin-top: auto;
    display: flex;
    gap: 1rem;
}

/* Forms */
.form-container {
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--bg-card);
    padding: 3rem;
    border-radius: 1.5rem;
    border: 1px solid #333;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    position: relative;
}

.form-container::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: var(--gold-gradient);
    z-index: -1;
    border-radius: 1.6rem;
    opacity: 0.5;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* Media Gallery for Upload/Edit */
.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.media-item {
    position: relative;
    padding-top: 133%; /* 3:4 ratio */
    background: #111;
    border-radius: 1rem;
    overflow: hidden;
    border: 2px solid var(--border-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    transition: all 0.3s;
}
.media-item:hover {
    border-color: #BF953F;
    transform: translateY(-5px);
}
.media-item img, .media-item video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Updated Beautiful Buttons for Gallery */
.media-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0) 100%);
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    padding: 3rem 0.5rem 0.75rem 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.media-item:hover .media-actions {
    opacity: 1;
}

.btn-action-small {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: 50%;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 1.1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-download-media {
    background: var(--gold-gradient);
    color: #000;
    border: none;
}
.btn-download-media:hover {
    background: var(--gold-gradient-hover);
    transform: scale(1.02);
}

.btn-delete-media {
    background: rgba(255,0,0,0.2);
    color: #ff4444;
    border: 1px solid #ff4444;
}
.btn-delete-media:hover {
    background: #ff4444;
    color: #fff;
}

/* Loading & Empty states */
.loader {
    border: 4px solid var(--border-color);
    border-top: 4px solid #BF953F;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 4rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-muted);
}
.empty-state i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.8;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Mobile Responsiveness */
.mobile-filter-toggle {
    display: none;
    background: var(--bg-card);
    border: 2px solid #BF953F;
    color: #BF953F;
    padding: 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    width: 100%;
    margin-bottom: 1rem;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .container-main {
        flex-direction: column;
        padding: 0.75rem 0.5rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .form-container {
        padding: 1.25rem 1rem !important;
        border-radius: 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .grid-2, .grid-3, .grid-4, .grid-5 {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    .mobile-filter-container {
        display: block !important;
        padding: 0.75rem 0.75rem 0;
        width: 100%;
        box-sizing: border-box;
    }

    .mobile-filter-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        background: rgba(212, 175, 55, 0.12);
        border: 1.5px solid var(--primary);
        color: var(--primary);
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
        cursor: pointer;
        width: 100%;
        font-weight: 700;
        text-align: center;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        font-size: 0.9rem;
        box-sizing: border-box;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        padding: 1.25rem;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        display: block; /* A busca fica sempre visível por padrão no mobile */
        box-sizing: border-box;
    }
    
    .sidebar.collapsed {
        display: none !important;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .header-content h1 {
        font-size: 1.35rem;
    }

    .navbar {
        padding: 0.75rem 1rem;
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
        box-sizing: border-box;
    }

    .navbar-brand img {
        height: 48px !important;
        max-width: 100%;
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 0.4rem;
        width: 100%;
    }

    .nav-links .btn {
        padding: 0.45rem 0.75rem;
        font-size: 0.8rem;
    }

    .content {
        padding: 1rem 0.75rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
        gap: 0.75rem;
    }
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}
.lightbox-modal.active {
    display: flex;
}
.lightbox-close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: 0.3s;
}
.lightbox-close:hover { color: var(--primary); }
.lightbox-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    flex: 1;
    position: relative;
}
.lightbox-content {
    max-width: 100%;
    max-height: 75vh;
    display: flex;
    justify-content: center;
    align-items: center;
}
.lightbox-content img, .lightbox-content video {
    max-width: 100%;
    max-height: 75vh;
    border: 2px solid var(--primary);
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
    object-fit: contain;
}
.lightbox-prev, .lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.3s ease;
    border: none;
    user-select: none;
    background: rgba(0,0,0,0.6);
    border: 1px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
}
.lightbox-prev { left: 0; }
.lightbox-next { right: 0; }
.lightbox-prev:hover, .lightbox-next:hover {
    background-color: rgba(212, 175, 55, 0.8);
}
.lightbox-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    overflow-x: auto;
    padding: 10px;
    max-width: 1000px;
    width: 100%;
    justify-content: center;
}
.lightbox-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.4;
    border: 2px solid transparent;
    border-radius: 5px;
    transition: all 0.3s ease;
}
.lightbox-thumbnail:hover { opacity: 0.8; }
.lightbox-thumbnail.active {
    opacity: 1;
    border-color: var(--primary);
    transform: scale(1.05);
}

/* Lightbox Info Panel */
.lightbox-info-panel {
    background: var(--bg-card);
    width: 350px;
    height: 75vh;
    border-radius: 10px;
    margin-left: 20px;
    padding: 1.5rem;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (max-width: 900px) {
    .lightbox-content-wrapper {
        flex-direction: column;
    }
    .lightbox-info-panel {
        width: 100%;
        height: auto;
        max-height: 40vh;
        margin-left: 0;
        margin-top: 1rem;
    }
    .lightbox-prev, .lightbox-next {
        top: 35%;
    }
}

.lightbox-info-panel h2 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.info-item {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
.info-item strong {
    color: var(--text-muted);
}

.links-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.link-item {
    color: #4da6ff;
    text-decoration: none;
    word-break: break-all;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.link-item:hover {
    text-decoration: underline;
    color: #fff;
}

/* ==========================================
   SELECTION MODE & MULTI-DOWNLOAD
   ========================================== */

/* Active states for selection buttons */
.btn-outline.active {
    background: var(--gold-gradient);
    color: #000;
    border-color: transparent;
    box-shadow: 0 0 15px rgba(191, 149, 63, 0.4);
}

/* Card Selection Overlays */
.card-checkbox-container {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 15;
    display: none; /* Hidden by default, shown in selection mode */
}

body.selection-mode .card-checkbox-container {
    display: block;
}

.custom-checkbox {
    width: 28px;
    height: 28px;
    border: 2px solid #BF953F;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.custom-checkbox i {
    color: #000;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

input.card-checkbox {
    display: none;
}

input.card-checkbox:checked + .custom-checkbox {
    background: var(--gold-gradient);
    border-color: transparent;
}

input.card-checkbox:checked + .custom-checkbox i {
    opacity: 1;
}

/* Highlight Selected Cards */
body.selection-mode .media-card {
    cursor: pointer;
}

body.selection-mode .media-card.selected {
    border-color: #FCF6BA;
    box-shadow: 0 0 20px rgba(191, 149, 63, 0.3);
    transform: translateY(-5px);
}

/* Floating Bottom Bar */
.selection-bar {
    position: fixed;
    bottom: -120px; /* Hidden by default */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 20, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-top: 2px solid;
    border-image: var(--gold-gradient) 1;
    padding: 1rem 2rem;
    border-radius: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    z-index: 999;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8), 0 0 25px rgba(191, 149, 63, 0.15);
    width: calc(100% - 40px);
    max-width: 800px;
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.selection-bar.active {
    bottom: 24px;
}

.selection-info {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.selection-info span {
    font-size: 1.4rem;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    display: inline-block;
    min-width: 20px;
    text-align: center;
}

.selection-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.folder-input {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background-color: #050505;
    border: 1px solid #444;
    color: var(--text-light);
    font-size: 0.95rem;
    min-width: 220px;
    transition: all 0.3s ease;
}

.folder-input:focus {
    outline: none;
    border-color: #BF953F;
    box-shadow: 0 0 10px rgba(191, 149, 63, 0.2);
}

.selection-actions .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    height: 42px;
}

.selection-actions .btn-cancel {
    border-color: var(--danger);
    color: var(--danger);
}

.selection-actions .btn-cancel:hover {
    background: rgba(255, 68, 68, 0.1);
    box-shadow: 0 0 15px rgba(255, 68, 68, 0.25);
}

@media (max-width: 768px) {
    .selection-bar {
        flex-direction: column;
        gap: 1rem;
        padding: 1.25rem;
        bottom: -220px;
        width: calc(100% - 20px);
        border-radius: 0.75rem;
    }
    .selection-bar.active {
        bottom: 12px;
    }
    .selection-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    .folder-input {
        width: 100%;
        min-width: unset;
    }
    .selection-actions .btn {
        width: 100%;
    }
}



/* Tooltip Styles */
.has-tooltip { position: relative; }
.has-tooltip::after { 
    content: attr(data-tooltip); 
    position: absolute; 
    top: 100%; 
    left: 50%; 
    transform: translateX(-50%); 
    background-color: rgba(20, 20, 20, 0.98); 
    color: #fff; 
    padding: 12px 16px; 
    border-radius: 8px; 
    font-size: 12px; 
    line-height: 1.5;
    white-space: normal;
    width: 220px; /* Largura fixa para padroniza��o */
    text-align: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    opacity: 0; 
    pointer-events: none; 
    transition: opacity 0.3s ease, transform 0.3s ease; 
    z-index: 9999; 
    margin-top: 8px; 
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.3px;
    border: 1px solid rgba(255,255,255,0.05);
}
.has-tooltip::before { 
    content: ''; 
    position: absolute; 
    top: 100%; 
    left: 50%; 
    transform: translateX(-50%); 
    border-width: 6px; 
    border-style: solid; 
    border-color: transparent transparent rgba(20, 20, 20, 0.98) transparent; 
    opacity: 0; 
    pointer-events: none; 
    transition: opacity 0.3s ease; 
    z-index: 9999; 
    margin-top: -4px;
}
.has-tooltip:hover::after { 
    opacity: 1; 
    transform: translateX(-50%) translateY(2px);
}
.has-tooltip:hover::before { 
    opacity: 1; 
}

/* Welcome Overlay Styles */
.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s;
}

.welcome-content {
    background: linear-gradient(145deg, rgba(25,25,25,0.95), rgba(10,10,10,0.98));
    border: 1px solid rgba(212, 175, 55, 0.25);
    padding: 3.5rem 4rem;
    border-radius: 1.5rem;
    text-align: center;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 40px rgba(212, 175, 55, 0.1);
    animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.welcome-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 4px;
    background: linear-gradient(to right, #fff, #D4AF37, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s infinite linear;
    background-size: 200% auto;
}

.welcome-text {
    font-size: 1.25rem;
    color: #d0d0d0;
    line-height: 1.7;
    margin-bottom: 3rem;
    font-style: italic;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.welcome-btn {
    background: linear-gradient(45deg, #b8860b, #ffd700, #b8860b);
    background-size: 200% auto;
    color: #111;
    border: none;
    padding: 1rem 3.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
    animation: pulseGlow 2s infinite;
}

.welcome-btn:hover {
    background-position: right center;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.5);
    color: #000;
}

@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(40px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes shimmer {
    to { background-position: 200% center; }
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

/* ==========================================================================
   VÍDEO EXPLICATIVO (DESKTOP & MOBILE) & LINHA DO TEMPO PERSONALIZADA
   ========================================================================== */

.video-page-body {
    background: radial-gradient(circle at center top, #ffffff 0%, #000000ba 70%);
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.video-navbar {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6);
    flex-shrink: 0;
}

.video-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: 0.5px;
}

.video-brand i {
    color: #D4AF37;
}

.video-brand-gold {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.video-main-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}

.video-card-container {
    width: 100%;
    background: rgb(0 0 0 / 96%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(212, 175, 55, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    max-height: calc(100vh - 85px);
    justify-content: space-between;
}

/* Enquadramento automático responsivo mantendo 100% dos tamanhos perfeitos */
@media (max-height: 940px) {
    .video-card-container {
        transform: scale(0.88);
        transform-origin: top center;
        margin-top: 95px;
    }
}

@media (max-height: 820px) {
    .video-card-container {
        transform: scale(0.80);
        transform-origin: top center;
        margin-top: -25px;
    }
}

/* Top Actions Bar (Mobile e Pular Vídeo acimas da linha do tempo no canto direito) */
.video-top-controls {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.video-title-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.video-title-badge {
    background: rgba(212, 175, 55, 0.15);
    color: #D4AF37;
    border: 1px solid rgba(212, 175, 55, 0.4);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.video-title-text {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
}

.video-action-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.6rem;
}

.btn-video-nav {
    background: linear-gradient(135deg, rgba(35, 30, 15, 0.8), rgba(20, 20, 20, 0.9));
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: #FCF6BA;
    padding: 0.55rem 1.25rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    text-decoration: none;
}

.btn-video-nav:hover {
    background: var(--gold-gradient);
    color: #000;
    border-color: #FCF6BA;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
}

.btn-skip-video {
    background: rgba(255, 68, 68, 0.12);
    border: 1px solid rgba(255, 68, 68, 0.4);
    color: #ff8888;
    padding: 0.55rem 1.25rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.btn-skip-video:hover {
    background: rgba(255, 68, 68, 0.85);
    color: #fff;
    border-color: #ff4444;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 68, 68, 0.4);
}

/* Screen Wrapper */
.video-screen-wrapper {
    position: relative;
    flex: 1;
    min-height: 0;
    width: 100%;
    background: #000;
    border-radius: 1.2rem;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-element {
    width: 100%;
    height: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}

/* Play Big Overlay Center Button */
.video-center-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(212, 175, 55, 0.9);
    border: 2px solid #FCF6BA;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #000;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.6);
    transition: all 0.3s ease;
    z-index: 10;
}

.video-center-play:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: #fff;
    box-shadow: 0 0 50px rgba(255, 255, 255, 0.8);
}

/* Bottom Custom Video Controls */
.custom-controls-bar {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    background: radial-gradient(circle at center top, #000000 0%, #181818 70%);
    border: 1px solid rgba(212, 175, 55, 0.25);
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    margin-top: 0.5rem;
    flex-shrink: 0;
}

.timeline-outer-container {
    position: relative;
    width: 100%;
    padding: 2.2rem 0 0.8rem 0; /* Espaço superior para os tooltips de preview PNG */
}

/* Linha do Tempo Customizada */
.custom-timeline-track {
    position: relative;
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    cursor: pointer;
    transition: height 0.2s ease;
}

.custom-timeline-track:hover {
    height: 12px;
}

.timeline-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: var(--gold-gradient);
    border-radius: 5px;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* Marcadores de Tempo */
.timeline-marker-item {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: #D4AF37;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    z-index: 5;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.8);
}

.timeline-marker-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: #000;
    border-radius: 50%;
}

.timeline-marker-item:hover {
    transform: translate(-50%, -50%) scale(1.4);
    background: #fff;
    border-color: #D4AF37;
    box-shadow: 0 0 20px rgba(255, 255, 255, 1);
    z-index: 20;
}

/* Label do Marcador sob a linha */
.marker-label-pill {
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: #FCF6BA;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    transition: all 0.2s ease;
}

.timeline-marker-item:hover .marker-label-pill {
    background: #D4AF37;
    color: #000;
    border-color: #fff;
}

/* Tooltip Preview PNG ao passar o mouse na marcação */
.marker-png-preview {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(10px) scale(0.9);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: #0f0f0f;
    border: 2px solid #D4AF37;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.9), 0 0 25px rgba(212, 175, 55, 0.4);
    z-index: 30;
    width: 240px;
    text-align: center;
}

.marker-png-preview img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    border: 1px solid rgba(255,255,255,0.1);
}

.marker-png-preview .preview-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #D4AF37;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Seta do tooltip */
.marker-png-preview::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 8px 0 8px;
    border-style: solid;
    border-color: #D4AF37 transparent transparent transparent;
}

.timeline-marker-item:hover .marker-png-preview {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}

/* Linha dos Controles de Reprodução */
.controls-buttons-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.controls-group-left, .controls-group-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-ctrl-icon {
    background: transparent;
    border: none;
    color: #e0e0e0;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
}

.btn-ctrl-icon:hover {
    color: #D4AF37;
    background: rgba(212, 175, 55, 0.15);
    transform: scale(1.1);
}

.video-time-display {
    font-size: 0.9rem;
    font-weight: 600;
    color: #aaaaaa;
    font-family: monospace;
}

.video-time-display span {
    color: #fff;
}

/* MOLDURA CELULAR (VÍDEO MOBILE ENCAIXADO NO PNG CELULAR) */
.mobile-device-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 0;
    width: 100%;
    flex: 1;
    min-height: 0;
}

.phone-frame-wrapper {
    position: relative;
    width: 290px;
    max-width: 85vw;
    height: 100%;
    max-height: calc(100vh - 210px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-png-img {
    height: 100%;
    width: auto;
    max-height: 100%;
    display: block;
    position: relative;
    z-index: 10;
    pointer-events: none;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.8));
    object-fit: contain;
}

/* Encaixe preciso e exibição 100% COMPLETA do vídeo dentro do mockup de celular (Sem nenhum corte lateral ou vertical) */
.phone-screen-video-container {
    position: absolute;
    top: 11.2%;
    left: 7.2%;
    width: 85.6%;
    height: 77.6%;
    z-index: 5;
    background: #000;
    border-radius: 26px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-screen-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
}


/* ESTILOS DE CORREÇÃO PARA FULLSCREEN */
:fullscreen, :-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    background: #000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.video-screen-wrapper:fullscreen,
.video-screen-wrapper:-webkit-full-screen,
.phone-frame-wrapper:fullscreen,
.phone-frame-wrapper:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    background: #000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0 !important;
}

.video-element:fullscreen,
.video-element:-webkit-full-screen,
.phone-screen-video:fullscreen,
.phone-screen-video:-webkit-full-screen {
    max-height: 100vh !important;
    width: 100vw !important;
    height: 100vh !important;
    object-fit: contain !important;
}

/* LOGO PNG CASTING MANAGER */
.navbar-brand-logo, .video-brand-logo {
    height: 60px;
    max-width: 220px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

.welcome-logo-img {
    max-height: 120px;
    max-width: 280px;
    object-fit: contain;
    margin-bottom: 1.2rem;
}

/* MODAIS ESPECÍFICOS DO VÍDEO */
.video-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.video-modal-card {
    background: linear-gradient(145deg, rgba(25, 25, 25, 0.98), rgba(10, 10, 10, 0.99));
    border: 2px solid #D4AF37;
    padding: 3rem 2.5rem;
    border-radius: 1.5rem;
    text-align: center;
    max-width: 540px;
    width: 92%;
    box-shadow: 0 25px 60px rgba(0,0,0,0.9), 0 0 50px rgba(212, 175, 55, 0.2);
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #aaaaaa;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    z-index: 10;
}

.modal-close-btn:hover {
    background: rgba(255, 68, 68, 0.85);
    color: #ffffff;
    border-color: #ff4444;
    transform: scale(1.1) rotate(90deg);
}

.video-modal-overlay.active .video-modal-card {
    transform: scale(1) translateY(0);
}

.video-modal-icon {
    font-size: 3.5rem;
    color: #D4AF37;
    margin-bottom: 1.2rem;
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.5));
}

.video-modal-title {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.video-modal-prompt {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: none !important;
    text-transform: none;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.video-modal-desc {
    font-size: 1.05rem;
    color: #cccccc;
    line-height: 1.6;
    margin-bottom: 2.2rem;
}

.video-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

@media (min-width: 480px) {
    .video-modal-actions {
        flex-direction: row;
        justify-content: center;
    }
}

.btn-modal-gold {
    background: var(--gold-gradient);
    color: #000;
    font-weight: 700;
    padding: 0.9rem 1.8rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.35);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    flex: 1;
}

.btn-modal-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.6);
    background: var(--gold-gradient-hover);
}

.btn-modal-outline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e0e0e0;
    font-weight: 600;
    padding: 0.9rem 1.8rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    flex: 1;
}

.btn-modal-outline:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: #fff;
    transform: translateY(-2px);
}

/* Ajustes Responsivos para Telas Menores (Dispositivos Móveis) */
@media (max-width: 900px) {
    /* Ocultar legendas de texto sob os marcadores em telas médias e pequenas para não embaralhar */
    .marker-label-pill {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .video-page-body {
        height: auto;
        min-height: 100vh;
        max-height: none;
        overflow-y: auto;
    }
    .video-main-content {
        padding: 0.4rem 0.25rem;
    }
    .video-card-container {
        max-height: none;
        transform: none !important;
        margin-top: 0 !important;
        padding: 0.75rem 0.5rem;
        gap: 0.75rem;
        width: 100%;
    }
    .video-screen-wrapper {
        min-height: 240px;
        height: 56vw;
        max-height: 50vh;
        width: 100%;
    }
    .video-element {
        width: 100%;
        height: 100%;
        min-height: 240px;
        object-fit: contain;
    }
    .mobile-device-container {
        padding: 0.25rem 0;
    }
    .phone-frame-wrapper {
        width: 100%;
        max-width: 380px;
        height: auto;
        max-height: none;
    }
    .phone-png-img {
        width: 100%;
        height: auto;
        max-height: none;
        display: block;
    }
    .video-top-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .video-action-stack {
        align-items: center;
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
    }
    /* Ocultar legendas de texto sob os marcadores no celular para não embaralhar */
    .marker-label-pill {
        display: none !important;
    }
    .marker-png-preview {
        width: 190px;
        bottom: 20px;
    }
    .timeline-outer-container {
        padding: 1.2rem 0 0.5rem 0 !important;
    }
}



