/* CSS Variables & Theme */
:root {
    --primary: #1e3a8a; /* Deep Blue */
    --primary-light: #3b82f6;
    --accent: #d97706; /* Gold/Amber */
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --border-glass: rgba(255, 255, 255, 0.1);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Header */
.app-header {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 10px 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: nowrap;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    white-space: nowrap;
    flex-shrink: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid var(--accent);
    box-shadow: 0 0 15px rgba(217, 119, 6, 0.3);
}

.app-title {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(to left, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Desktop Navigation */
.desktop-nav {
    display: none;
}

.desktop-nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.desktop-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 9px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}

.desktop-nav-link i {
    font-size: 0.95rem;
    color: #94a3b8;
    transition: color 0.2s ease;
}

.desktop-nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.desktop-nav-link:hover i {
    color: var(--secondary-color);
}

.desktop-nav-link.active {
    color: #fff;
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.35);
    font-weight: 600;
}

.desktop-nav-link.active i {
    color: var(--secondary-color);
}

.desktop-nav-link.disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.desktop-nav-link .soon-badge {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    font-size: 0.68rem;
    padding: 1px 6px;
    border-radius: 6px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    margin-right: 4px;
}

.header-login-btn {
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
    padding: 7px 15px;
    border-radius: 9px;
    font-size: 0.88rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.header-login-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .app-header {
        padding: 8px 12px;
    }
    .header-brand {
        gap: 8px;
    }
    .header-brand .logo {
        width: 36px;
        height: 36px;
    }
    .header-brand .app-title {
        font-size: 1.15rem;
    }
    .header-login-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
        gap: 5px;
    }
    .login-btn-text {
        display: none; /* Show user icon only on mobile to prevent wrapping */
    }
    .menu-toggle {
        font-size: 1.35rem;
        padding: 4px;
    }
}

@media (min-width: 992px) {
    .desktop-nav {
        display: flex;
        flex: 1;
        justify-content: center;
        margin: 0 15px;
    }
    .menu-toggle {
        display: none !important;
    }
}

@media (min-width: 992px) and (max-width: 1200px) {
    .desktop-nav-link {
        padding: 6px 8px;
        font-size: 0.82rem;
        gap: 5px;
    }
    .desktop-nav-link .soon-badge {
        display: none;
    }
}

/* Main Content */
.main-content {
    padding: 20px 15px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Banner Slider Component */
.banner-slider {
    display: flex;
    height: 380px;
    border-radius: 20px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-glass);
    backdrop-filter: blur(10px);
    margin-bottom: 30px;
}

/* Main Image Area */
.banner-main {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, transform 0.6s ease;
    transform: scale(1.05);
}

.slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    z-index: 10;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Glassmorphism Overlay */
.slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 20px 20px;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.6) 50%, transparent 100%);
    color: white;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s ease 0.2s;
}

.slide.active .slide-overlay {
    transform: translateY(0);
    opacity: 1;
}

.slide-overlay h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.slide-overlay p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #b45309 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.4);
}

.btn-primary:active {
    transform: scale(0.95);
}

/* Vertical Navigation (Right Sidebar) */
.banner-nav {
    width: 80px; /* Compact for mobile */
    background: rgba(15, 23, 42, 0.6);
    border-left: 1px solid var(--border-glass);
    border-right: none;
    display: flex;
    flex-direction: column;
    z-index: 20;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 5px;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: relative;
    color: var(--text-muted);
}

.nav-item:last-child {
    border-bottom: none;
}

.nav-item i {
    font-size: 1.4rem;
    transition: var(--transition);
}

.nav-item span {
    font-size: 0.65rem;
    text-align: center;
    font-weight: 500;
    line-height: 1.2;
}

.nav-item:hover {
    background: rgba(255,255,255,0.05);
}

/* Active State for Nav Item */
.nav-item.active {
    background: rgba(59, 130, 246, 0.15);
    color: #fff;
}

.nav-item.active i {
    color: var(--primary-light);
    transform: scale(1.1);
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-light);
    border-radius: 4px 0 0 4px;
    box-shadow: 0 0 10px var(--primary-light);
}

/* Services Tabs Layout */
.services-tabs-section {
    margin-bottom: 30px;
}

.services-tabs-container {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-glass);
    overflow: hidden;
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-glass);
    background: rgba(15, 23, 42, 0.4);
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 15px 10px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.tab-btn i {
    font-size: 1.5rem;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.tab-btn.active {
    color: var(--primary-light);
    background: rgba(59, 130, 246, 0.1);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-light);
    box-shadow: 0 -2px 10px rgba(59, 130, 246, 0.5);
}

.tabs-content {
    padding: 25px;
    min-height: 200px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-pane h3 {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 15px;
}

.tab-pane p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 25px;
}

.tab-actions {
    display: flex;
    gap: 15px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid var(--border-glass);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Adjustments for very small screens */
@media (max-width: 480px) {
    .tab-btn span {
        font-size: 0.75rem;
    }
    .tab-btn i {
        font-size: 1.2rem;
    }
    .tab-actions {
        flex-direction: column;
    }
}

/* Responsive adjustments for slightly larger screens */
@media (min-width: 480px) {
    .banner-nav {
        width: 120px;
    }
    .nav-item span {
        font-size: 0.8rem;
    }
    .slide-overlay h2 {
        font-size: 1.5rem;
    }
    .slide-overlay p {
        font-size: 1rem;
    }
}

/* Footer Section */
.app-footer {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-glass);
    margin-top: 40px;
    padding-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
}

.footer-info h3 {
    font-size: 1.5rem;
    color: var(--primary-light);
    margin-bottom: 15px;
}

.footer-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 15px;
}

.contact-details {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #e2e8f0;
    font-size: 0.9rem;
}

.contact-item i {
    color: var(--primary-light);
    margin-top: 4px;
    font-size: 1rem;
}

.contact-item span {
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 1.2rem;
    transition: var(--transition);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
}

.footer-links h4, .footer-trust h4 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-light);
    padding-right: 5px;
}

.trust-badges {
    display: flex;
    gap: 15px;
}

.enamad-placeholder {
    background: rgba(255, 255, 255, 1);
    color: #333;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: var(--transition);
}

.enamad-placeholder i {
    font-size: 2.5rem;
    color: #2563eb;
    margin-bottom: 8px;
}

.enamad-placeholder .enamad-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e3a8a;
}

.enamad-placeholder .enamad-sub {
    font-size: 0.55rem;
    text-align: center;
    color: #64748b;
    margin-top: 4px;
}

.enamad-placeholder:hover {
    transform: scale(1.05);
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Search Pages Styles */
.page-header {
    text-align: center;
    padding: 40px 20px 20px;
}

.page-header h2 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 10px;
}

.page-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.search-section {
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    color: #e2e8f0;
    font-weight: 500;
}

.form-control {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-glass);
    color: #fff;
    padding: 12px 15px;
    border-radius: 8px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.form-control::placeholder {
    color: #64748b;
}

.form-actions {
    display: flex;
}

.form-actions .btn-primary {
    width: 100%;
    padding: 12px 15px;
}

/* Results Section & Data Table */
.results-section {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.results-card h3 {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-glass);
}

.table-responsive {
    overflow-x: auto;
}

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

.data-table th, .data-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table th {
    background: rgba(15, 23, 42, 0.5);
    color: var(--primary-light);
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

.data-table td {
    color: #e2e8f0;
    font-size: 0.9rem;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Responsive Tables */
@media (max-width: 768px) {
    .table-responsive {
        border: 1px solid var(--border-glass);
        border-radius: 8px;
        -webkit-overflow-scrolling: touch;
    }
    
    .data-table th, .data-table td {
        padding: 10px;
        font-size: 0.85rem;
    }
    
    .btn-small {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
}

/* Expandable Rows for Mobile */
.details-row {
    display: none;
}
.details-row.show {
    display: table-row;
}

@media (max-width: 768px) {
    .data-table th:nth-child(n+3),
    .data-table td:nth-child(n+3) {
        display: none;
    }
    
    .main-row {
        cursor: pointer;
        transition: background 0.2s ease;
    }
    .main-row:hover {
        background: rgba(59, 130, 246, 0.12) !important;
    }
    
    .details-row td {
        padding: 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    }
    
    .mobile-details {
        background: rgba(15, 23, 42, 0.6);
        padding: 15px;
        margin: 5px 15px 15px 15px;
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1) inset;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .detail-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
        padding-bottom: 8px;
    }
    
    .detail-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    
    .detail-label {
        font-size: 0.85rem;
        color: #94a3b8;
    }
    
    .detail-value {
        font-size: 0.9rem;
        color: #f8fafc;
        font-weight: 500;
    }
    
    .detail-value.highlight {
        color: #38bdf8;
        font-weight: 700;
    }
}
@media (min-width: 769px) {
    /* Never show details row on desktop */
    .details-row {
        display: none !important;
    }
}

/* Sidebar Menu */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

.sidebar-menu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100%;
    background: rgba(11, 15, 25, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 5px 0 25px rgba(0,0,0,0.8);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.sidebar-menu.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    padding: 25px 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-logo {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    margin-left: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.sidebar-header h2 {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    flex-grow: 1;
    letter-spacing: 0.5px;
}

.close-sidebar {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-sidebar:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(90deg) scale(1.1);
}

.sidebar-nav {
    flex-grow: 1;
    overflow-y: auto;
    padding: 25px 15px;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-nav ul li a {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.sidebar-nav ul li a i {
    width: 30px;
    margin-left: 12px;
    font-size: 1.25rem;
    text-align: center;
    color: #64748b;
    transition: color 0.3s ease;
}

.sidebar-nav ul li a:hover,
.sidebar-nav ul li a.active {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateX(-5px);
}

.sidebar-nav ul li a:hover i,
.sidebar-nav ul li a.active i {
    color: var(--secondary-color);
}

/* Puzzle Captcha Styles */
.puzzle-captcha-container {
    width: 100%;
    margin: 0 auto;
    direction: ltr; /* keep slider LTR for X coordinates */
    position: relative;
}
.puzzle-bg-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: #2a3441;
    margin-bottom: 15px;
}
.puzzle-bg {
    width: 100%;
    height: 100%;
    background-size: 100% 100%;
}
.puzzle-hole {
    position: absolute;
    /* width and height set by JS dynamically */
    background: rgba(0,0,0,0.95);
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.9));
    z-index: 5;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M 15 15 L 35 15 A 15 15 0 1 1 65 15 L 85 15 L 85 35 A 15 15 0 1 0 85 65 L 85 85 L 65 85 A 15 15 0 1 1 35 85 L 15 85 L 15 65 A 15 15 0 1 0 15 35 Z' /%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M 15 15 L 35 15 A 15 15 0 1 1 65 15 L 85 15 L 85 35 A 15 15 0 1 0 85 65 L 85 85 L 65 85 A 15 15 0 1 1 35 85 L 15 85 L 15 65 A 15 15 0 1 0 15 35 Z' /%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}
.puzzle-piece {
    position: absolute;
    top: 0;
    left: 0;
    /* width, height, background-size set by JS dynamically */
    z-index: 10;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M 15 15 L 35 15 A 15 15 0 1 1 65 15 L 85 15 L 85 35 A 15 15 0 1 0 85 65 L 85 85 L 65 85 A 15 15 0 1 1 35 85 L 15 85 L 15 65 A 15 15 0 1 0 15 35 Z' /%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M 15 15 L 35 15 A 15 15 0 1 1 65 15 L 85 15 L 85 35 A 15 15 0 1 0 85 65 L 85 85 L 65 85 A 15 15 0 1 1 35 85 L 15 85 L 15 65 A 15 15 0 1 0 15 35 Z' /%3E%3C/svg%3E");
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    filter: drop-shadow(0 0 3px rgba(255,255,255,0.8));
}
.puzzle-refresh {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
}
.puzzle-slider-track {
    position: relative;
    width: 100%;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.2);
    overflow: hidden;
}
.puzzle-slider-text {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 5;
    user-select: none;
}
.puzzle-slider-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: grab;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 10;
}
.puzzle-slider-thumb:active {
    cursor: grabbing;
}
.puzzle-slider-bg {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(43, 190, 203, 0.3);
    border-radius: 20px 0 0 20px;
    width: 0;
}

/* ============================================================
   ADMIN PANEL STYLES
   ============================================================ */
.admin-login {
    max-width: 440px;
    margin: 60px auto;
    padding: 35px 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    box-shadow: var(--shadow-glass);
    backdrop-filter: blur(14px);
    text-align: center;
}

.admin-login h2 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 8px;
    font-weight: 700;
}

.admin-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
}

.admin-header-box {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 18px;
    padding: 24px 30px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.admin-tab {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    padding: 12px 22px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.admin-tab:hover {
    background: rgba(59, 130, 246, 0.15);
    color: #fff;
    border-color: rgba(59, 130, 246, 0.4);
}

.admin-tab.active {
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: #fff;
    border-color: #3b82f6;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
}

.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 18px;
    padding: 26px;
    box-shadow: var(--shadow-glass);
    backdrop-filter: blur(12px);
    margin-bottom: 25px;
}

.upload-dropzone {
    border: 2px dashed rgba(59, 130, 246, 0.4);
    border-radius: 14px;
    padding: 35px 20px;
    text-align: center;
    background: rgba(15, 23, 42, 0.4);
    cursor: pointer;
    transition: var(--transition);
    margin: 20px 0;
}

.upload-dropzone:hover, .upload-dropzone.dragover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.upload-dropzone i {
    font-size: 42px;
    color: #3b82f6;
    margin-bottom: 12px;
    display: inline-block;
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.admin-search-bar {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.admin-search-bar input {
    flex: 1;
    min-width: 220px;
}
/* Custom Scrollbar for Modal and Tables */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5); 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.3); 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.6); 
}
