/* --- গ্লোবাল ডার্ক মোড স্টাইল (ভিডিও এডিটর থিম) --- */
body { 
    font-family: 'GSans', 'Inter', sans-serif; 
    background-color: #1a1a1a; 
    color: #d1d5db; 
}

/* Header autohide transition */
#mainHeader {
    transition: opacity 1s ease-in-out, max-height 1s ease-in-out, margin 1s ease-in-out, padding 1s ease-in-out;
    overflow: hidden;
    max-height: 100px;
}

#mainHeader.hidden-header {
    opacity: 0 !important;
    pointer-events: none;
    max-height: 0;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* কন্টেইনার প্যানেল স্টাইল */
.panel { 
    background-color: #242424; 
    border-radius: 0.75rem; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.5); 
    overflow: hidden; 
    margin-bottom: 1rem; 
    border: 1px solid #374151; 
}

.panel-header { 
    padding: 1rem; 
    cursor: pointer; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background-color: #2c2c2c; 
    border-bottom: 1px solid #374151; 
}

.panel-content { 
    padding: 1rem; 
    max-height: 2000px; 
    transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out; 
}

.panel-content.collapsed { 
    max-height: 0; 
    padding-top: 0; 
    padding-bottom: 0; 
    visibility: hidden; 
}

/* ইনপুট ফিল্ডের স্টাইল (ডার্ক মোড) */
input:not([type="range"]):not([type="file"]), 
select, 
textarea {
    background-color: #374151 !important;
    border-color: #4b5563 !important;
    color: #d1d5db !important;
}

@font-face {
    font-family: 'Uthmani';
    src: url('https://cdn.jsdelivr.net/gh/iameffat/font@master/uthmani.ttf');
}
@font-face {
    font-family: 'SolaimanLipi2';
    src: url('https://cdn.jsdelivr.net/gh/iameffat/font@master/solaimanlipi2.ttf');
}

@font-face {
    font-family: 'GSans'; 
    src: url('https://fonts.gstatic.com/s/googlesans/v58/4UaRrENHsxJlGDuGo1OIlJfC6l_24rlCK1Yo_Iq2rACIlsw.woff2') format('woff2'); 
    font-weight: 400; 
    font-style: normal;
}

/* --- Responsive Video Editor Stage Styles --- */
#previewContainer { 
    width: 100%;
    height: 500px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    background-color: #000000;
    position: relative; 
    border-radius: 0.75rem; 
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.7);
    background-image: radial-gradient(#374151 1px, transparent 1px);
    background-size: 20px 20px;
}

@media (max-width: 640px) {
    #previewContainer { height: 350px; }
}

#videoPreviewCanvas { 
    max-width: 95%; 
    max-height: 95%; 
    width: auto; 
    height: auto; 
    object-fit: contain; 
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.7), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    transform-origin: center center;
    transition: transform 0.2s ease-out;
    border: 1px solid #4f46e5; 
}

.spinner { border: 4px solid rgba(255, 255, 255, 0.3); border-top: 4px solid #4f46e5; border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

input[type=range] { -webkit-appearance: none; width: 100%; background: transparent; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 16px; width: 16px; border-radius: 50%; background: #4f46e5; cursor: pointer; margin-top: -6px; box-shadow: 0 1px 3px rgba(0,0,0,0.5); }
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 4px; cursor: pointer; background: #4b5563; border-radius: 2px; }

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.5);
}

@media (max-width: 1024px) { 
    .lg\:sticky {
        position: static !important;
    }
}

.arabic-text-area {
    font-family: 'Uthmani', 'Scheherazade New', 'Noto Sans Arabic', 'Lateef', serif;
    direction: rtl;
    text-align: right;
    line-height: 1.8;
    min-height: 80px;
}
.bangla-text-area {
    font-family: 'SolaimanLipi2', 'Noto Sans Bengali', 'Inter', sans-serif;
    direction: ltr;
    text-align: left;
    line-height: 1.5;
    min-height: 80px;
}

.ayah-editor-scroll-container {
    max-height: 550px; 
    overflow-y: auto; 
    padding-right: 10px; 
}

/* PEXELS DOWNLOAD GRID STYLE */
#pexelsDownloadGrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #4b5563;
    padding: 8px;
    border-radius: 8px;
    background-color: #374151;
}
.pexels-dl-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background: #1f2937;
    border: 1px solid #4b5563;
}
.pexels-dl-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}
.pexels-dl-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: #10b981;
    color: white;
    padding: 6px;
    font-size: 12px;
    font-weight: bold;
    text-decoration: none;
}
.pexels-dl-btn:hover {
    background: #059669;
}