/* Red & Deep Grey Theme */
:root {
    --red: #dc2626;
    --red-dark: #991b1b;
    --grey-darkest: #0f1419;
    --grey-darker: #111827;
    --grey-dark: #1f2937;
    --grey: #374151;
    --grey-light: #4b5563;
    --grey-lighter: #6b7280;
    --grey-lightest: #9ca3af;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--grey-darkest);
    color: var(--white);
    line-height: 1.6;
}

/* Navigation */
.main-nav {
    background: var(--grey-dark);
    border-bottom: 2px solid var(--red);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--red);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: var(--grey-lightest);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--red);
}

.admin-link {
    color: var(--red) !important;
}

/* Hero Banner */
.hero {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    padding: 60px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.95;
}

.search-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.search-form input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
}

/* Buttons */
.btn {
    padding: 15px 30px;
    background: var(--red);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn:hover {
    background: var(--red-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--grey-darker);
}

.btn-secondary:hover {
    background: var(--grey);
}

/* Layout */
.layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    max-width: 1600px;
    margin: 40px auto;
    padding: 0 20px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* Cards */
.card {
    background: var(--grey-dark);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    border: 2px solid transparent;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--red);
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.3);
}

.card-thumb {
    width: 100%;
    height: 380px;
    background: var(--grey-darker);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--red);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--white);
}

.card-subtitle {
    font-size: 14px;
    color: var(--grey-lightest);
    margin-bottom: 15px;
}

.card-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--grey-lighter);
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.ad-box,
.stat-box {
    background: var(--grey-dark);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--grey);
}

.ad-box {
    position: sticky;
    top: 90px;
}

.ad-content {
    min-height: 250px;
    background: var(--grey-darker);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-content img {
    width: 100%;
    height: auto;
    display: block;
}

.stat-box {
    padding: 25px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    margin-bottom: 15px;
    background: var(--grey-darker);
    border-radius: 6px;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-number {
    font-size: 42px;
    font-weight: 700;
    color: var(--red);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--grey-lightest);
    font-size: 14px;
}

/* Viewer Layout */
.viewer {
    display: grid;
    grid-template-columns: 280px 1fr 350px;
    gap: 20px;
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px;
    height: calc(100vh - 100px);
}

.viewer-sidebar {
    background: var(--grey-dark);
    border-radius: 8px;
    padding: 20px;
    overflow-y: auto;
    border: 1px solid var(--grey);
}

.viewer-sidebar h3 {
    color: var(--white);
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--red);
}

.page-tab {
    background: var(--grey-darker);
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-tab:hover {
    background: var(--grey);
    border-color: var(--red);
}

.page-tab.active {
    background: var(--red);
}

.page-tab-thumb {
    width: 60px;
    height: 80px;
    background: var(--grey-darkest);
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
}

.page-tab-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-tab-info {
    flex: 1;
}

.page-tab-number {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
}

.page-tab-meta {
    font-size: 11px;
    color: var(--grey-lightest);
}

.viewer-main {
    background: var(--grey-dark);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--grey);
    overflow: hidden;
}

.viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--grey);
    margin-bottom: 20px;
}

.viewer-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
}

.viewer-subtitle {
    color: var(--grey-lightest);
    font-size: 14px;
    margin-top: 5px;
}

.viewer-controls {
    display: flex;
    gap: 10px;
}

.viewer-controls .btn {
    padding: 8px 16px;
    font-size: 14px;
}

.image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--grey-darker);
    border-radius: 6px;
    overflow: auto;
}

.page-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    cursor: zoom-in;
    transition: transform 0.2s;
}

.page-image.zoomed {
    cursor: zoom-out;
    transform: scale(1.5);
}

/* ============================================
   Enhanced Footer with Links
   ============================================ */

.main-footer {
    background: var(--grey-dark);
    padding: 0px!important;
    margin-top: 87px;
    border-top: 3px solid var(--red);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Footer Top Section */
.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--grey);
}

.footer-column {
    color: var(--grey-lightest);
}

/* Footer About/Logo Column */
.footer-about {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-logo {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.footer-brand {
    font-size: 28px;
    font-weight: 700;
    color: var(--red);
}

.footer-tagline {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.8;
    max-width: 350px;
}

/* Social Media Links */
.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--grey);
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-social a:hover {
    background: var(--red);
    transform: translateY(-3px);
}

/* Footer Links */
.footer-heading {
    color: var(--white);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links li a {
    color: var(--grey-lightest);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.footer-links li a:hover {
    color: var(--red);
    padding-left: 5px;
}

.link-icon {
    font-size: 16px;
    width: 20px;
}

/* Footer Bottom - Copyright */
.footer-bottom {
    padding: 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-copyright {
    color: var(--grey-lightest);
    font-size: 14px;
}

.footer-credits {
    color: var(--grey-lighter);
    font-size: 13px;
    opacity: 0.7;
}

/* Responsive Footer */
@media (max-width: 968px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .footer-about {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .main-footer {
        padding: 40px 0 0 0;
        margin-top: 60px;
    }
    
    .footer-top {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-about {
        text-align: center;
        align-items: center;
    }
    
    .footer-logo {
        height: 40px;
    }
    
    .footer-brand {
        font-size: 24px;
    }
    
    .footer-tagline {
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* Responsive */
@media (max-width: 1400px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .viewer {
        grid-template-columns: 250px 1fr;
    }

    .viewer .sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-container {
        height: auto;
        padding: 15px 20px;
        background:#FFF!important;
    }

    .nav-links {
        display: none; /* Hidden on mobile, hamburger menu will be used */
    }

    .hero h1 {
        font-size: 32px;
    }

    .search-form {
        flex-direction: column;
    }

    .viewer {
        grid-template-columns: 1fr;
        height: auto;
    }

    .viewer-sidebar {
        height: auto;
        max-height: 300px;
    }

    /* Mobile grid layouts */
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .card {
        border-radius: 8px;
    }

    .card-thumb {
        height: 250px;
    }

    .card-body {
        padding: 15px;
    }

    .card-title {
        font-size: 16px;
    }

    .card-subtitle {
        font-size: 13px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--grey-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--grey);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--grey-light);
}









