/**
 * CODDB Camos Page - MW23 Weapon Camos Gallery
 * Advanced gallery design with tactical styling
 */

/* ===== PAGE FOUNDATION ===== */
.coddb-camos-page {
    background: linear-gradient(135deg, #0a0f1c 0%, #1a1f2e 50%, #0d1421 100%);
    min-height: 100vh;
    color: var(--text-primary, #e4e6ea);
}

/* ===== HERO SECTION ===== */
.coddb-page-hero {
    position: relative;
    height: 60vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 80px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 105, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 162, 255, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #0f1419 0%, #1a252f 100%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(255, 105, 0, 0.03) 50%, transparent 70%),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 100px,
            rgba(255, 255, 255, 0.01) 101px,
            rgba(255, 255, 255, 0.01) 102px
        );
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255, 105, 0, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(0, 162, 255, 0.3), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.2), transparent);
    background-repeat: repeat;
    background-size: 150px 150px, 200px 200px, 100px 100px;
    animation: particleFloat 20s linear infinite;
}

@keyframes particleFloat {
    0% { transform: translateY(0px) translateX(0px); }
    33% { transform: translateY(-20px) translateX(10px); }
    66% { transform: translateY(-10px) translateX(-5px); }
    100% { transform: translateY(0px) translateX(0px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 0 20px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 105, 0, 0.1);
    border: 1px solid rgba(255, 105, 0, 0.3);
    border-radius: 50px;
    padding: 8px 20px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.badge-icon {
    font-size: 16px;
}

.badge-text {
    font-size: 14px;
    font-weight: 600;
    color: #ff6900;
    letter-spacing: 1px;
}

.hero-title {
    margin: 0 0 30px 0;
}

.title-main {
    display: block;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    background: linear-gradient(135deg, #ffffff 0%, #ff6900 50%, #00a2ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.title-sub {
    display: block;
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 2px;
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 40px 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    color: #ff6900;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== MAIN CONTAINER ===== */
.coddb-camos-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

/* ===== CONTROLS SECTION ===== */
.coddb-camos-controls {
    margin-bottom: 40px;
}

.controls-wrapper {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 20px;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

/* Search Section */
.search-section {
    position: relative;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    max-width: 400px;
    padding: 12px 50px 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #ff6900;
    box-shadow: 0 0 0 3px rgba(255, 105, 0, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-icon {
    position: absolute;
    right: 15px;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.search-clear {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-clear:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ff6900;
}

/* Filter Section */
.filter-section {
    position: relative;
}

.filter-dropdown {
    position: relative;
}

.filter-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

.filter-trigger:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #ff6900;
}

.filter-arrow {
    transition: transform 0.3s ease;
    margin-left: auto;
}

.filter-dropdown.active .filter-arrow {
    transform: rotate(180deg);
}

.filter-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(20, 25, 35, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 100;
    margin-top: 5px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.filter-dropdown.active .filter-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-option:last-child {
    border-bottom: none;
}

.filter-option:hover {
    background: rgba(255, 105, 0, 0.1);
}

.filter-option.active {
    background: rgba(255, 105, 0, 0.2);
    color: #ff6900;
}

.option-count {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* View Section */
.view-section {
    display: flex;
    gap: 15px;
    align-items: center;
}

.view-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.view-option {
    background: none;
    border: none;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.view-option.active {
    background: #ff6900;
    color: #ffffff;
}

.sort-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    color: #ffffff;
    cursor: pointer;
    min-width: 160px;
}

.sort-select option {
    background: #1a252f;
    color: #ffffff;
}

/* ===== LOADING INDICATOR ===== */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 60px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #ff6900;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
}

/* ===== CAMOS GRID ===== */
.coddb-camos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.coddb-camos-grid.list-view {
    grid-template-columns: 1fr;
    gap: 15px;
}

/* ===== CAMO CARD ===== */
.camo-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    backdrop-filter: blur(10px);
}

.camo-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: #ff6900;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 105, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.camo-card.expanded {
    grid-column: 1 / -1;
    transform: none;
}

.camo-preview {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, #1a252f 0%, #0f1419 100%);
    overflow: hidden;
}

.camo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    background: linear-gradient(135deg, #1a252f 0%, #0f1419 100%);
}

.camo-image:not([src]),
.camo-image[src=""],
.camo-image.error {
    background: linear-gradient(135deg, #1a252f 0%, #0f1419 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    text-align: center;
}

.camo-image:not([src])::before,
.camo-image[src=""]::before,
.camo-image.error::before {
    content: "🎨\ANo Image\AAvailable";
    white-space: pre-line;
    line-height: 1.4;
}

.camo-card:hover .camo-image {
    transform: scale(1.05);
}

.camo-category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 105, 0, 0.9);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
}

.camo-info {
    padding: 20px;
}

.camo-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.camo-localize-name {
    font-size: 1rem;
    color: #ff6900;
    margin: 0 0 15px 0;
    font-weight: 500;
}

.camo-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.camo-hash {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 6px;
}

.camo-texture-count {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.texture-icon {
    color: #00a2ff;
}

.camo-expand-hint {
    text-align: center;
    padding: 15px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.camo-card:hover .camo-expand-hint {
    color: #ff6900;
}

/* ===== EXPANDED CAMO DETAILS ===== */
.camo-details {
    display: none;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.camo-card.expanded .camo-details {
    display: block;
    animation: expandIn 0.5s ease;
}

@keyframes expandIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.details-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.collapse-btn {
    background: rgba(255, 105, 0, 0.1);
    border: 1px solid rgba(255, 105, 0, 0.3);
    border-radius: 8px;
    color: #ff6900;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.collapse-btn:hover {
    background: rgba(255, 105, 0, 0.2);
}

.textures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.texture-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.texture-item:hover {
    transform: translateY(-2px);
    border-color: #00a2ff;
}

.texture-placeholder {
    height: 150px;
    background: linear-gradient(135deg, #1a252f 0%, #0f1419 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.texture-info {
    padding: 12px;
}

.texture-hash {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #00a2ff;
    word-break: break-all;
}

/* ===== LOAD MORE SECTION ===== */
.load-more-section {
    text-align: center;
    padding: 40px 0;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #ff6900 0%, #ff8533 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 105, 0, 0.3);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: none;
}

.load-more-btn.loading .btn-text,
.load-more-btn.loading .btn-icon {
    display: none;
}

.load-more-btn.loading .btn-loading {
    display: block;
}

.btn-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===== NO RESULTS ===== */
.no-results {
    text-align: center;
    padding: 80px 20px;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 15px 0;
}

.no-results-text {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 30px 0;
}

.reset-filters-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-filters-btn:hover {
    background: rgba(255, 105, 0, 0.1);
    border-color: #ff6900;
    color: #ff6900;
}

/* ===== MODAL ===== */
.camo-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.camo-modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: rgba(20, 25, 35, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ff6900;
}

.modal-body {
    padding: 30px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .controls-wrapper {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .search-section,
    .filter-section,
    .view-section {
        width: 100%;
    }
    
    .view-section {
        justify-content: space-between;
    }
    
    .coddb-camos-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .hero-stats {
        gap: 20px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .coddb-camos-container {
        padding: 30px 15px 60px;
    }
    
    .coddb-camos-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .camo-preview {
        height: 180px;
    }
    
    .modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .modal-header,
    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: 0 15px;
    }
    
    .title-main {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-stats {
        gap: 15px;
    }
    
    .coddb-camos-grid {
        grid-template-columns: 1fr;
    }
    
    .camo-preview {
        height: 160px;
    }
    
    .camo-info {
        padding: 15px;
    }
}
