/* Instagram Gallery Styles - Glassmorphism Theme */
.gallery-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

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

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

.gallery-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.gallery-thumb-container {
    position: relative;
    width: 100%;
    padding-top: 100%;
}

.gallery-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-play-icon {
    opacity: 1;
}

.gallery-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.gallery-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.gallery-meta {
    margin-top: auto;
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

/* Video Player Page */
.video-view-container {
    max-width: 900px;
    margin: 40px auto;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.video-player-wrapper {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    margin-bottom: 25px;
}

.video-player {
    width: 100%;
    max-height: 600px;
    display: block;
}

.video-view-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.video-view-meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.video-view-caption {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-primary);
    white-space: pre-wrap;
    padding: 20px;
    background: rgba(0, 0, 0, 0.1);

}

/* Gallery Extensions */
.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 20px;
    text-align: left;
    /* reset from center if needed, or keep it depending on flow. It's flex now. */
}

.gallery-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.gallery-header p {
    color: var(--text-secondary);
}

.gallery-limit-label {
    font-size: 14px;
    margin-left: 10px;
    color: var(--text-secondary);
}

.gallery-limit-select {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.gallery-card {
    text-decoration: none;
}

.gallery-thumb.no-image {
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px dashed var(--glass-border);
}

.gallery-empty-state h3 {
    margin-bottom: 15px;
}

.gallery-empty-state p {
    color: var(--text-secondary);
}

.gallery-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.gallery-page-link {
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.gallery-page-link.active {
    background: #3498db;
    border-color: #3498db;
}

/* Admin Instagram Panel Styles */
.admin-ig-container {
    margin: 40px auto;
    padding: 20px;
}

.admin-ig-layout {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.admin-ig-main {
    flex: 3;
    min-width: 300px;
}

.admin-ig-card {
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

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

.admin-ig-title {
    font-weight: 700;
    margin: 0;
}

.admin-ig-tabs {
    display: flex;
    gap: 10px;
}

.admin-ig-tab-btn {
    padding: 8px 15px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    transition: all 0.3s;
}

.admin-ig-tab-btn.active {
    background: #3498db;
    border-color: #3498db;
}

.admin-ig-alert {
    padding: 15px;
    margin-bottom: 20px;
}

.admin-ig-alert.success {
    background: rgba(46, 204, 113, 0.1);
    border-right: 4px solid #2ecc71;
    color: #2ecc71;
}

.admin-ig-alert.error {
    background: rgba(231, 76, 60, 0.1);
    border-right: 4px solid #e74c3c;
    color: #e74c3c;
}

.admin-ig-section {
    background: rgba(255, 255, 255, 0.03);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-ig-info-box {
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(52, 152, 219, 0.1);
    border-right: 4px solid #3498db;
}

.admin-ig-info-box h4 {
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #3498db;
}

.admin-ig-info-box p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

.admin-ig-info-link {
    display: inline-block;
    margin-top: 10px;
    text-decoration: none;
    font-family: monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    border-radius: 4px;
    direction: ltr;
}

.admin-ig-subtitle {
    font-weight: 600;
    margin: 30px 0 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.admin-ig-desc {
    opacity: 0.7;
    font-size: 14px;
    margin-bottom: 25px;
}

.admin-ig-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.admin-ig-form-grid.boxed {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
}

.admin-ig-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.admin-ig-input {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: inherit;
}

.admin-ig-input.ltr {
    direction: ltr;
}

.admin-ig-input[readonly] {
    background: rgba(0, 0, 0, 0.2);
    color: #ccc;
    border-color: rgba(255, 255, 255, 0.1);
}

.admin-ig-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
}

.admin-ig-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.admin-ig-checkbox {
    width: 18px;
    height: 18px;
}

.admin-ig-submit-btn {
    background: #00f5687a;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    max-width: 200px;
}

.admin-ig-submit-error {
    color: #e74c3c;
    margin: 0;
}

.admin-ig-sync-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.admin-ig-sync-btn {
    background: #3498db;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
}

.admin-ig-progress-container {
    width: 300px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    position: relative;
}

.admin-ig-progress-bar {
    height: 25px;
    width: 0%;
    background: #2ecc71;
    transition: width 0.3s ease;
}

.admin-ig-progress-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.admin-ig-table-wrapper {
    overflow-x: auto;
}

.admin-ig-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

.admin-ig-table thead tr {
    background: rgba(255, 255, 255, 0.05);
}

.admin-ig-table th {
    padding: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.admin-ig-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-ig-table td {
    padding: 15px;
}

.admin-ig-thumb {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

.admin-ig-thumb-empty {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-ig-seo-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 350px;
}

.admin-ig-seo-input {
    padding: 8px;
    border-radius: 12px;
    border: 1px solid rgb(66 102 245 / 20%);
    background: rgb(255 255 255 / 44%);
    color: inherit;
}

.admin-ig-seo-textarea {
    padding: 8px;
    border-radius: 12px;
    border: 1px solid rgb(66 102 245 / 20%);
    background: rgb(255 255 255 / 44%);
    color: inherit;
    resize: vertical;
}

.admin-ig-seo-btn {
    padding: 8px;
    font-size: 13px;
    font-weight: bold;
    background: #2ecc71;
    border: none;
    cursor: pointer;
}

.admin-ig-action-container {
    display: flex;
    gap: 8px;
    flex-direction: column;
}

.admin-ig-view-btn {
    background: #2ecc71;
    text-align: center;
    font-size: 12px;
    padding: 6px;
    text-decoration: none;
}

.admin-ig-delete-btn {
    background: #e74c3c;
    width: 100%;
    font-size: 12px;
    padding: 6px;
    border: none;
    cursor: pointer;
}

.admin-ig-empty-td {
    padding: 40px;
    text-align: center;
    opacity: 0.6;
}
.gallery-page-link:hover{
    background-color:#58c1f54a
}
.gallery-page-link:focus{
    scale:1.2;
}