/* Minecraft Font */
@font-face {
    font-family: 'Minecraft';
    src: url('/font/minecraft-seven-2.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.addons-section {
    background: #1a1a1a;
    padding: 2rem 1rem;
    padding-top: 14rem;
    min-height: calc(100vh - 120px);
    margin-top: 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
    margin-top: 0;
    color: #FFFFA0;
    font-family: 'Minecraft', 'Courier New', monospace;
    text-shadow: 3px 3px 0px rgba(0, 0, 0, 0.8);
    scroll-margin-top: 2rem;
}

.section-subtitle {
    text-align: center;
    color: #B0B0B0;
    font-size: 1rem;
    margin-bottom: 2rem;
    font-family: 'Noto Sans', ui-sans-serif, system-ui, sans-serif;
}

.addons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    max-width: 1600px;
    margin: 0 auto;
}

.addon-card {
    background: #2a2a2a;
    border-radius: 0;
    border-top: 3px solid #555;
    border-left: 3px solid #555;
    border-right: 3px solid #1a1a1a;
    border-bottom: 3px solid #1a1a1a;
    box-shadow: inset 0 0 0 1px #2a2a2a, 0 2px 8px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    will-change: transform;
}

.addon-card:hover {
    border-top: 3px solid #6a6a6a;
    border-left: 3px solid #6a6a6a;
    border-right: 3px solid #2a2a2a;
    border-bottom: 3px solid #2a2a2a;
    box-shadow: inset 0 0 0 1px #4a4a4a, 0 4px 16px rgba(90, 191, 90, 0.3);
    background: #4a4a4a;
    transform: translateY(-2px);
}

.addon-image-wrapper {
    width: 100%;
    height: 140px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid #3a3a3a;
    position: relative;
}

.addon-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    loading: lazy;
}

.addon-icon {
    font-size: 3rem;
    color: #555;
}

.addon-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.addon-header {
    margin-bottom: 0.75rem;
}

.addon-title {
    color: #FFFFA0;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Minecraft', 'Courier New', monospace;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.8);
    margin-bottom: 0.4rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.addon-version {
    display: inline-block;
    background: #3a3a3a;
    color: #7FFF7F;
    padding: 0.2rem 0.6rem;
    border-radius: 0;
    font-size: 0.75rem;
    font-family: 'Minecraft', monospace;
    border: 2px solid #555;
}

.addon-description {
    color: #B0B0B0;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    flex: 1;
    font-family: 'Noto Sans', ui-sans-serif, system-ui, sans-serif;
    font-size: 0.875rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.addon-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    color: #888;
    font-size: 0.8rem;
    font-family: 'Noto Sans', ui-sans-serif, system-ui, sans-serif;
}

.addon-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.addon-meta-item i {
    color: #5ABF5A;
}

.addon-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-minecraft {
    flex: 1;
    padding: 0.6rem 0.75rem;
    background: linear-gradient(180deg, #7ED77E 0%, #55AA55 100%);
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 0;
    border: none;
    position: relative;
    font-weight: 700;
    font-size: 0.75rem;
    font-family: 'Minecraft', 'Courier New', monospace;
    cursor: pointer;
    text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.5);
    transition: all 0.1s ease;
    text-align: center;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transform: translateY(0);
    
    box-shadow: 
        0 0 0 2px #000000,
        inset 2px 2px 0 0 rgba(255, 255, 255, 0.4),
        inset -2px -2px 0 0 rgba(0, 0, 0, 0.4),
        0 3px 0 0 #1A4D1A,
        0 3px 0 2px #000000,
        0 5px 10px rgba(0, 0, 0, 0.5);
}

.btn-minecraft:hover {
    background: linear-gradient(180deg, #9EF79E 0%, #6FCC6F 100%);
    color: #FFFFFF;
    transform: translateY(-1px);
    
    box-shadow: 
        0 0 0 2px #000000,
        inset 2px 2px 0 0 rgba(255, 255, 255, 0.5),
        inset -2px -2px 0 0 rgba(0, 0, 0, 0.3),
        0 4px 0 0 #1A4D1A,
        0 4px 0 2px #000000,
        0 7px 15px rgba(90, 191, 90, 0.4);
}

.btn-minecraft:active {
    background: linear-gradient(180deg, #55AA55 0%, #3D7D3D 100%);
    transform: translateY(1px);
    
    box-shadow: 
        0 0 0 2px #000000,
        inset 2px 2px 0 0 rgba(0, 0, 0, 0.5),
        inset -2px -2px 0 0 rgba(255, 255, 255, 0.2),
        0 2px 0 0 #1A4D1A,
        0 2px 0 2px #000000,
        0 3px 5px rgba(0, 0, 0, 0.6);
}

.btn-minecraft i {
    font-size: 0.85rem;
}

.btn-minecraft.btn-premium {
    background: linear-gradient(180deg, #FFD700 0%, #B8860B 100%);
    color: #2a2a2a;
    text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.3);
    
    box-shadow: 
        0 0 0 2px #000000,
        inset 2px 2px 0 0 rgba(255, 255, 255, 0.4),
        inset -2px -2px 0 0 rgba(0, 0, 0, 0.4),
        0 3px 0 0 #8B6508,
        0 3px 0 2px #000000,
        0 5px 10px rgba(0, 0, 0, 0.5);
}

.btn-minecraft.btn-premium:hover {
    background: linear-gradient(180deg, #FFED4E 0%, #DAA520 100%);
    color: #1a1a1a;
    transform: translateY(-1px);
    
    box-shadow: 
        0 0 0 2px #000000,
        inset 2px 2px 0 0 rgba(255, 255, 255, 0.5),
        inset -2px -2px 0 0 rgba(0, 0, 0, 0.3),
        0 4px 0 0 #8B6508,
        0 4px 0 2px #000000,
        0 7px 15px rgba(255, 215, 0, 0.4);
}

.btn-minecraft.btn-premium:active {
    background: linear-gradient(180deg, #B8860B 0%, #8B6508 100%);
    transform: translateY(1px);
    
    box-shadow: 
        0 0 0 2px #000000,
        inset 2px 2px 0 0 rgba(0, 0, 0, 0.5),
        inset -2px -2px 0 0 rgba(255, 255, 255, 0.2),
        0 2px 0 0 #6B4E08,
        0 2px 0 2px #000000,
        0 3px 5px rgba(0, 0, 0, 0.6);
}

.btn-minecraft.btn-secondary {
    background: linear-gradient(180deg, #666 0%, #444 100%);
    color: #E0E0E0;
    
    box-shadow: 
        0 0 0 2px #000000,
        inset 2px 2px 0 0 rgba(255, 255, 255, 0.3),
        inset -2px -2px 0 0 rgba(0, 0, 0, 0.5),
        0 3px 0 0 #222,
        0 3px 0 2px #000000,
        0 5px 10px rgba(0, 0, 0, 0.5);
}

.btn-minecraft.btn-secondary:hover {
    background: linear-gradient(180deg, #777 0%, #555 100%);
    color: #FFFFFF;
    transform: translateY(-1px);
    
    box-shadow: 
        0 0 0 2px #000000,
        inset 2px 2px 0 0 rgba(255, 255, 255, 0.4),
        inset -2px -2px 0 0 rgba(0, 0, 0, 0.4),
        0 4px 0 0 #222,
        0 4px 0 2px #000000,
        0 7px 15px rgba(100, 100, 100, 0.3);
}

.btn-minecraft.btn-secondary:active {
    background: linear-gradient(180deg, #444 0%, #333 100%);
    transform: translateY(1px);
    
    box-shadow: 
        0 0 0 2px #000000,
        inset 2px 2px 0 0 rgba(0, 0, 0, 0.5),
        inset -2px -2px 0 0 rgba(255, 255, 255, 0.2),
        0 2px 0 0 #111,
        0 2px 0 2px #000000,
        0 3px 5px rgba(0, 0, 0, 0.6);
}

.no-addons {
    text-align: center;
    padding: 5rem 2rem;
    color: #666;
}

.no-addons i {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.no-addons h4 {
    color: #888;
    font-family: 'Minecraft', 'Courier New', monospace;
    margin-bottom: 0.5rem;
}

.no-addons p {
    font-family: 'Noto Sans', ui-sans-serif, system-ui, sans-serif;
}

.premium-banner {
    background: linear-gradient(135deg, #2F8B2F 0%, #1F5A1F 100%);
    padding: 3rem 2rem;
    margin-top: 3rem;
    border-top: 4px solid #90FF90;
    border-bottom: 4px solid #1F5A1F;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.premium-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.premium-text h4 {
    color: #FFFFA0;
    font-family: 'Minecraft', 'Courier New', monospace;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.8);
}

.premium-text p {
    color: #E0FFE0;
    margin: 0;
    font-family: 'Noto Sans', ui-sans-serif, system-ui, sans-serif;
}

.alert {
    background: #3a3a3a;
    border: 2px solid #555;
    border-radius: 0;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.alert-danger {
    border-color: #ff5555;
    color: #ff8888;
}

.alert-info {
    border-color: #5599ff;
    color: #88bbff;
}

@media (max-width: 1200px) {
    .addons-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .addons-section {
        padding: 1.5rem 0.75rem;
        padding-top: 12rem;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
        margin-top: 0;
    }

    .section-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .addons-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }

    .addon-image-wrapper {
        height: 120px;
    }

    .addon-body {
        padding: 0.75rem;
    }

    .addon-title {
        font-size: 1rem;
    }

    .addon-version {
        font-size: 0.7rem;
        padding: 0.15rem 0.5rem;
    }

    .addon-description {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }

    .addon-meta {
        font-size: 0.75rem;
    }

    .btn-minecraft {
        font-size: 0.7rem;
        padding: 0.5rem 0.6rem;
    }

    .premium-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .addons-grid {
        grid-template-columns: 1fr;
    }
}

/* Performance optimizations */
.addon-card * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img[loading="lazy"] {
    content-visibility: auto;
}

