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

body {
    font-family: 'Open Sans', sans-serif;
    background: linear-gradient(135deg, #1a1a2e, #2D5016, #4A7C23, #9CAF56);
    min-height: 100vh;
    color: #F5F5DC;
    line-height: 1.6;
}

/* Header Styles with Noir Theme */
.header {
    text-align: center;
    padding: 30px 20px;
    background: rgba(26, 26, 46, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    position: relative;
    border-bottom: 3px solid #DC143C;
    border-image: repeating-linear-gradient(45deg, #FFB347 0, #FFB347 10px, #1a1a2e 10px, #1a1a2e 20px) 3;
}

.title {
    font-family: 'Fredoka One', cursive;
    font-size: 3.5em;
    color: #FFB347;
    text-shadow: 3px 3px 6px rgba(220, 20, 60, 0.8), 0 0 20px rgba(220, 20, 60, 0.4);
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.3em;
    color: #F5F5DC;
    font-weight: 300;
    margin-bottom: 25px;
}

/* Enhanced Navigation Tabs with Crime Theme */
.navigation-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    background: rgba(245, 245, 220, 0.9);
    border: 2px solid transparent;
    border-radius: 25px;
    color: #2D5016;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tab-btn.crime-tab {
    background: rgba(26, 26, 46, 0.9);
    color: #F5F5DC;
    border: 2px solid #DC143C;
    box-shadow: 0 0 15px rgba(220, 20, 60, 0.3);
}

.tab-icon {
    width: 24px;
    height: 24px;
    image-rendering: pixelated;
}

.tab-btn:hover {
    background: #FFB347;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 179, 71, 0.4);
    border-color: #F5F5DC;
}

.tab-btn.crime-tab:hover {
    background: #DC143C;
    color: #F5F5DC;
    box-shadow: 0 8px 25px rgba(220, 20, 60, 0.6);
}

.tab-btn.active {
    background: #FFB347;
    border-color: #F5F5DC;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 179, 71, 0.5);
}

.tab-btn.crime-tab.active {
    background: #DC143C;
    color: #F5F5DC;
    border-color: #FFB347;
    box-shadow: 0 8px 25px rgba(220, 20, 60, 0.7);
}

/* Main Collection Container */
.collection-container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Collection Sections */
.collection-section {
    display: none;
    background: rgba(245, 245, 220, 0.95);
    border-radius: 15px;
    margin-bottom: 30px;
    padding: 30px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.collection-section.crime-section {
    background: rgba(26, 26, 46, 0.95);
    border: 2px solid #DC143C;
    color: #F5F5DC;
}

.collection-section.active {
    display: block;
    animation: fadeInUp 0.6s ease-out;
}

.section-title {
    font-family: 'Fredoka One', cursive;
    font-size: 2.2em;
    color: #2D5016;
    text-align: center;
    margin-bottom: 25px;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.section-title.noir-title {
    color: #FFB347;
    text-shadow: 3px 3px 6px rgba(220, 20, 60, 0.8);
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-bar.noir-filter select {
    background: rgba(26, 26, 46, 0.9);
    color: #F5F5DC;
    border: 2px solid #DC143C;
}

.filter-bar select {
    padding: 10px 15px;
    border: 2px solid #9CAF56;
    border-radius: 8px;
    background: white;
    color: #2D5016;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-bar select:hover,
.filter-bar select:focus {
    border-color: #FFB347;
    box-shadow: 0 0 10px rgba(255, 179, 71, 0.3);
    outline: none;
}

.filter-bar.noir-filter select:hover,
.filter-bar.noir-filter select:focus {
    border-color: #FFB347;
    box-shadow: 0 0 15px rgba(220, 20, 60, 0.5);
}

/* Item Grids */
.item-grid {
    display: grid;
    gap: 20px;
    justify-items: center;
}

.pokemon-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    max-width: 1200px;
    margin: 0 auto;
}

.minecraft-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    max-width: 1000px;
    margin: 0 auto;
}

.garden-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    max-width: 1100px;
    margin: 0 auto;
}

.crime-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    max-width: 1200px;
    margin: 0 auto;
}

/* Collection Items */
.collection-item {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.pokemon-item {
    background: linear-gradient(45deg, #fff, #f8f8ff);
    border: 3px solid #FFB347;
    min-height: 280px;
}

.minecraft-item {
    background: linear-gradient(45deg, #fff, #f0f0f0);
    border: 3px solid #8B4513;
    min-height: 160px;
}

.garden-item {
    background: linear-gradient(45deg, #fff, #f0fff0);
    border: 3px solid #32CD32;
    min-height: 180px;
}

.crimeboss-item {
    background: linear-gradient(45deg, #1a1a2e, #2B2B2B, #1a1a2e);
    border: 3px solid #DC143C;
    color: #F5F5DC;
    min-height: 240px;
    position: relative;
    overflow: hidden;
}

.crimeboss-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.03) 2px,
            rgba(255, 255, 255, 0.03) 6px
        );
    pointer-events: none;
}

.collection-item:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.pokemon-item:hover {
    box-shadow: 0 15px 35px rgba(255, 179, 71, 0.4);
    background: linear-gradient(45deg, #fff, #fff8dc);
}

.minecraft-item:hover {
    box-shadow: 0 15px 35px rgba(139, 69, 19, 0.4);
}

.garden-item:hover {
    box-shadow: 0 15px 35px rgba(50, 205, 50, 0.4);
}

.crimeboss-item:hover {
    box-shadow: 0 15px 35px rgba(220, 20, 60, 0.6);
    border-color: #FFB347;
}

.item-image {
    width: 100%;
    max-width: 120px;
    height: auto;
    object-fit: contain;
    margin: 0 auto 15px;
    border-radius: 8px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    transition: all 0.3s ease;
}

.pokemon-item .item-image {
    max-width: 140px;
    max-height: 200px;
}

.minecraft-item .item-image {
    max-width: 80px;
    max-height: 80px;
}

.garden-item .item-image {
    max-width: 100px;
    max-height: 100px;
}

.crimeboss-item .item-image {
    max-width: 120px;
    max-height: 160px;
    border: 2px solid #DC143C;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.3);
}

.item-image.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    opacity: 0.7;
}

.item-label {
    font-weight: 600;
    color: #2D5016;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: auto;
    margin-bottom: 5px;
}

.crimeboss-item .item-label {
    color: #FFB347;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.item-indicator {
    background: rgba(45, 80, 22, 0.8);
    color: #FFB347;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pokemon-item .item-indicator {
    background: rgba(255, 179, 71, 0.8);
    color: #2D5016;
}

.minecraft-item .item-indicator {
    background: rgba(139, 69, 19, 0.8);
    color: #F5F5DC;
}

.garden-item .item-indicator {
    background: rgba(50, 205, 50, 0.8);
    color: #2D5016;
}

.crimeboss-item .item-indicator {
    background: rgba(220, 20, 60, 0.8);
    color: #F5F5DC;
}

/* Crime Boss Status Indicators */
.status-indicator {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.6em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-at-large {
    background: rgba(220, 20, 60, 0.9);
    color: #F5F5DC;
}

.status-captured {
    background: rgba(34, 139, 34, 0.9);
    color: #F5F5DC;
}

.status-escaped {
    background: rgba(255, 140, 0, 0.9);
    color: #F5F5DC;
}

.threat-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.6em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.threat-green {
    background: rgba(34, 139, 34, 0.9);
    color: #F5F5DC;
}

.threat-yellow {
    background: rgba(255, 215, 0, 0.9);
    color: #1a1a2e;
}

.threat-orange {
    background: rgba(255, 140, 0, 0.9);
    color: #F5F5DC;
}

.threat-red {
    background: rgba(220, 20, 60, 0.9);
    color: #F5F5DC;
}

/* Modal Styles with Crime Theme */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background: linear-gradient(135deg, #F5F5DC, #FFFAF0);
    margin: 2% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
    transform: translateY(-50px);
    transition: transform 0.3s ease;
    position: relative;
    border: 3px solid #9CAF56;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    color: #2D5016;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    background: rgba(255, 179, 71, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close:hover {
    background: #FFB347;
    transform: scale(1.1);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    padding: 30px;
    color: #2D5016;
}

.modal-image-section {
    text-align: center;
}

.large-item-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    image-rendering: pixelated;
    margin-bottom: 20px;
}

.item-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.favorite-btn,
.collection-btn,
.capture-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border: 2px solid #9CAF56;
    background: white;
    color: #2D5016;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.capture-btn {
    border-color: #DC143C;
    background: rgba(220, 20, 60, 0.1);
}

.favorite-btn:hover,
.collection-btn:hover {
    background: #FFB347;
    transform: translateY(-2px);
}

.capture-btn:hover {
    background: #DC143C;
    color: #F5F5DC;
    transform: translateY(-2px);
}

.favorite-btn.active {
    background: #FF6B6B;
    color: white;
    border-color: #FF6B6B;
}

.collection-btn.active {
    background: #4ECDC4;
    color: white;
    border-color: #4ECDC4;
}

.capture-btn.active {
    background: #228B22;
    color: white;
    border-color: #228B22;
}

.modal-info h3 {
    font-family: 'Fredoka One', cursive;
    font-size: 2.2em;
    color: #2D5016;
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.modal-info h4 {
    font-weight: 600;
    color: #2D5016;
    margin: 20px 0 10px 0;
    font-size: 1.2em;
    border-bottom: 2px solid #9CAF56;
    padding-bottom: 5px;
}

.modal-info p {
    color: #2D5016;
    line-height: 1.6;
    margin-bottom: 15px;
}

.item-stats {
    background: rgba(156, 175, 86, 0.15);
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    border-left: 4px solid #9CAF56;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 600;
}

.stat-item span:first-child {
    color: #2D5016;
}

.stat-item span:last-child {
    color: #9CAF56;
}

.stat-item.danger-stat span:last-child {
    color: #DC143C;
    font-weight: bold;
    text-transform: uppercase;
}

.case-file-warning {
    background: rgba(220, 20, 60, 0.1);
    border: 2px solid #DC143C;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    color: #DC143C;
    font-weight: 600;
}

/* Progress Panel with Crime Progress */
.progress-panel {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: rgba(245, 245, 220, 0.95);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
    border: 2px solid #9CAF56;
    min-width: 250px;
    z-index: 100;
}

.progress-panel h4 {
    color: #2D5016;
    margin-bottom: 15px;
    text-align: center;
    font-family: 'Fredoka One', cursive;
}

.progress-item {
    margin-bottom: 15px;
}

.progress-item.crime-progress {
    border-top: 2px solid #DC143C;
    padding-top: 15px;
}

.progress-item span {
    display: block;
    color: #2D5016;
    font-weight: 600;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.progress-item.crime-progress span {
    color: #DC143C;
}

.progress-bar {
    background: rgba(156, 175, 86, 0.2);
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    background: linear-gradient(90deg, #9CAF56, #FFB347);
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}

.crime-progress .progress-fill {
    background: linear-gradient(90deg, #DC143C, #FF6B6B);
}

/* Search Panel */
.search-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
}

#universal-search {
    padding: 12px 15px;
    border: 2px solid #9CAF56;
    border-radius: 25px;
    background: rgba(245, 245, 220, 0.95);
    color: #2D5016;
    font-weight: 600;
    min-width: 300px;
    transition: all 0.3s ease;
}

#universal-search:focus {
    outline: none;
    border-color: #FFB347;
    box-shadow: 0 0 15px rgba(255, 179, 71, 0.3);
}

.search-suggestions {
    display: none;
    background: white;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    margin-top: 5px;
    overflow: hidden;
}

.suggestion {
    padding: 10px 15px;
    color: #2D5016;
    cursor: pointer;
    transition: background 0.2s ease;
}

.suggestion:hover {
    background: #FFB347;
}

/* Animations */
@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .title {
        font-size: 2.5em;
    }
    
    .subtitle {
        font-size: 1.1em;
    }

    .navigation-tabs {
        gap: 10px;
    }

    .tab-btn {
        padding: 10px 15px;
        font-size: 0.8em;
        flex-direction: column;
        gap: 5px;
    }

    .tab-icon {
        width: 20px;
        height: 20px;
    }

    .item-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 15px;
    }

    .crime-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .collection-item {
        padding: 15px;
        min-height: 180px;
    }

    .pokemon-item {
        min-height: 240px;
    }

    .crimeboss-item {
        min-height: 220px;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
    }

    .modal-body {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .progress-panel {
        position: static;
        transform: none;
        margin: 20px;
        right: auto;
    }

    .search-panel {
        position: static;
        margin: 20px;
        right: auto;
    }

    #universal-search {
        min-width: 100%;
    }

    .filter-bar {
        gap: 10px;
    }

    .filter-bar select {
        min-width: 140px;
    }
}

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

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

    .crime-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .collection-container {
        padding: 0 15px;
    }

    .section-title {
        font-size: 1.8em;
    }

    .collection-section {
        padding: 20px;
    }
}

/* Print styles */
@media print {
    .header, .navigation-tabs, .modal, .progress-panel, .search-panel {
        display: none !important;
    }
    
    .collection-container {
        max-width: none;
        margin: 0;
        padding: 0;
    }
    
    .collection-section {
        break-inside: avoid;
        margin-bottom: 20px;
        box-shadow: none;
    }
}