/* ===========================
   GLOBAL STYLES
   =========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-black: #000000;
    --primary-white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --border-light: #e0e0e0;
    --accent-red: #ff0000;
    --hover-bg: #f5f5f5;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--primary-white);
    color: var(--text-dark);
    line-height: 1.6;
}

/* ===========================
   TOP BANNER WITH ANIMATED TEXT
   =========================== */

.top-banner {
    background-color: var(--primary-black);
    color: var(--primary-white);
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.banner-lines {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.banner-lines .line {
    width: 2px;
    height: 30px;
    background-color: var(--primary-white);
}

.animated-text-container {
    position: relative;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.animated-text {
    position: absolute;
    opacity: 0;
    font-size: 14px;
    font-weight: 500;
    transition: opacity 0.5s ease-in-out;
    max-width: 800px;
    padding: 0 20px;
}

.animated-text.active {
    opacity: 1;
}

/* ===========================
   HEADER
   =========================== */

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    background-color: var(--primary-white);
    border-bottom: 1px solid var(--border-light);
    flex-wrap: wrap;
    gap: 20px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--primary-black);
    font-size: 20px;
    font-weight: bold;
    transition: opacity 0.3s;
}

.logo:hover {
    opacity: 0.7;
}

.logo svg {
    background-color: var(--primary-black);
    border-radius: 4px;
    padding: 5px;
}

.tagline {
    flex: 1;
    text-align: center;
    font-size: 14px;
    color: var(--text-light);
    min-width: 200px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-date {
    font-size: 12px;
    color: var(--text-light);
}

.date-filter {
    padding: 6px 12px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-size: 12px;
    background-color: var(--primary-white);
    cursor: pointer;
    transition: border-color 0.3s;
}

.date-filter:hover {
    border-color: var(--text-light);
}

/* ===========================
   MAIN CONTAINER
   =========================== */

.main-container {
    display: flex;
    gap: 20px;
    padding: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

/* ===========================
   SIDEBAR - CATEGORIES
   =========================== */

.sidebar {
    width: 180px;
    flex-shrink: 0;
}

.sidebar-title {
    font-size: 12px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 15px;
    padding: 10px;
    background-color: var(--hover-bg);
    border-radius: 4px;
}

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-link {
    padding: 8px 12px;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 13px;
    border-radius: 4px;
    transition: all 0.3s;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.category-link:hover {
    background-color: var(--hover-bg);
    border-left-color: var(--accent-red);
}

.category-link.active {
    background-color: var(--accent-red);
    color: var(--primary-white);
    border-left-color: var(--accent-red);
}

/* ===========================
   CONTENT AREA
   =========================== */

.content {
    flex: 1;
    min-width: 0;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-container {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-red);
}

.category-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 2px solid var(--accent-red);
}

/* ===========================
   VECTORS GRID
   =========================== */

.vectors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.vector-card {
    background-color: var(--primary-white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.vector-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-red);
}

.vector-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--hover-bg);
}

.vector-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.vector-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vector-keywords {
    font-size: 11px;
    color: var(--text-light);
    margin-top: auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vector-keyword-tag {
    display: inline-block;
    background-color: var(--hover-bg);
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 4px;
    margin-bottom: 4px;
    font-size: 10px;
}

/* ===========================
   LOADER
   =========================== */

.loader-spinner {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.spinner {
    border: 4px solid var(--border-light);
    border-top: 4px solid var(--accent-red);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* ===========================
   BOTTOM BANNER
   =========================== */

.bottom-banner {
    background-color: var(--primary-black);
    color: var(--primary-white);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.pagination-btn {
    background-color: transparent;
    color: var(--primary-white);
    border: none;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s;
    padding: 5px 10px;
}

.pagination-btn:hover {
    color: var(--accent-red);
}

.page-number {
    font-size: 16px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.copyright {
    font-size: 12px;
    color: var(--text-light);
}

.footer-nav {
    display: flex;
    gap: 20px;
}

.footer-nav a {
    font-size: 12px;
    color: var(--primary-white);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: var(--accent-red);
}

/* ===========================
   MODAL - DOWNLOAD PAGE
   =========================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background-color: var(--primary-white);
    border-radius: 8px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-dark);
    z-index: 10;
}

.modal-close:hover {
    color: var(--accent-red);
}

.download-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px;
}

.download-image-section {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    object-fit: contain;
}

.download-info-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-dark);
}

.modal-description {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

.modal-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.keyword-badge {
    background-color: var(--hover-bg);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-dark);
}

.vector-details {
    margin: 20px 0;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.details-table tr {
    border-bottom: 1px solid var(--border-light);
}

.details-table tr:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    padding: 10px 0;
    color: var(--text-dark);
    width: 40%;
}

.detail-value {
    padding: 10px 0;
    color: var(--text-light);
}

.download-countdown {
    background-color: var(--primary-black);
    color: var(--primary-white);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.countdown-display {
    font-size: 48px;
    font-weight: bold;
    margin: 15px 0;
    color: var(--accent-red);
}

.download-button {
    background-color: var(--accent-red);
    color: var(--primary-white);
    border: none;
    padding: 12px 30px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 15px;
}

.download-button:hover {
    background-color: #cc0000;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 1024px) {
    .main-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .categories-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }

    .vectors-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        padding: 15px;
    }

    .tagline {
        order: 3;
        width: 100%;
    }

    .search-container {
        min-width: 100%;
    }

    .vectors-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }

    .vector-card {
        border-radius: 4px;
    }

    .vector-image {
        height: 120px;
    }

    .vector-info {
        padding: 8px;
    }

    .vector-title {
        font-size: 11px;
    }

    .vector-keywords {
        font-size: 10px;
    }

    .download-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .modal-image {
        max-height: 300px;
    }

    .bottom-banner {
        flex-direction: column;
    }

    .pagination-container {
        width: 100%;
    }

    .footer-links {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .top-banner {
        padding: 15px;
    }

    .banner-lines {
        gap: 8px;
        margin-bottom: 10px;
    }

    .banner-lines .line {
        height: 20px;
    }

    .animated-text {
        font-size: 12px;
        padding: 0 10px;
    }

    .animated-text-container {
        height: 50px;
    }

    .header {
        padding: 10px;
    }

    .logo {
        font-size: 16px;
    }

    .logo svg {
        width: 30px;
        height: 30px;
    }

    .tagline {
        font-size: 12px;
    }

    .sidebar {
        width: 100%;
    }

    .categories-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .vectors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .vector-image {
        height: 100px;
    }

    .vector-info {
        padding: 6px;
    }

    .vector-title {
        font-size: 10px;
    }

    .category-title {
        font-size: 16px;
    }

    .modal-content {
        border-radius: 4px;
    }

    .download-container {
        padding: 15px;
    }

    .modal-title {
        font-size: 16px;
    }

    .modal-description {
        font-size: 12px;
    }

    .countdown-display {
        font-size: 36px;
    }

    .details-table {
        font-size: 12px;
    }
}

/* ===========================
   ANIMATIONS
   =========================== */

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

.vector-card {
    animation: fadeInUp 0.3s ease-out;
}

/* ===========================
   UTILITIES
   =========================== */

.hidden {
    display: none !important;
}

.no-scroll {
    overflow: hidden;
}
