@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'VT323', monospace;
    color: #FFF;
    background-color: #171615;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-bg {
    background-image: url('../img/background.webp');
    background-repeat: repeat;
    background-size: cover;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    opacity: 0.4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-header {
    background-color: #262423;
    padding: 15px 0;
    border-bottom: 4px solid #555;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-link {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2rem; 
    color: #FFF;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-img {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    image-rendering: pixelated;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 25px;
}

.nav-menu a {
    color: #DDD;
    text-decoration: none;
    font-size: 1.2rem;
    padding: 5px 10px;
    border-bottom: 2px solid transparent;
    transition: color 0.3s, border-color 0.3s;
}

.nav-menu a:hover {
    color: #4ade80;
    border-bottom-color: #4ade80;
}

.main-content {
    flex-grow: 1;
    padding: 40px 0;
}

.hero-section {
    text-align: center;
    padding: 40px 0;
    margin-top: 140px;
}

.minecraft-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.5rem;
    color: #FFF;
    text-shadow: 4px 4px 0px #000;
    margin-bottom: 20px;
}

.minecraft-subtitle {
    font-size: 1.3rem;
    color: #CCC;
    margin-bottom: 30px;
}

.search-container {
    max-width: 600px;
    margin: 20px auto 0;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 15px 20px;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    background-color: #333;
    border: 3px solid #000;
    border-radius: 0;
    color: #FFF;
    box-shadow: inset 2px 2px 0px #000, inset -2px -2px 0px #555;
}

.search-input:focus {
    outline: none;
    border-color: #000;
}

.search-button {
    position: absolute;
    right: 5px;
    top: 2px;
    bottom: 3px;
    padding: 0 25px;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    background-color: #4CAF50;
    color: #FFF;
    border: 3px solid #000;
    cursor: pointer;
    box-shadow: 3px 3px 0px #000;
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
}

.search-button:hover {
    background-color: #66BB6A;
}

.search-button:active {
    transform: translate(2px, 2px);
    box-shadow: 0px 0px 0px #000;
}

.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #333;
    border: 2px solid #000;
    border-top: none;
    max-height: 250px;
    overflow-y: auto;
    z-index: 10;
    display: none;
}

.suggestion {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #444;
    display: flex;
    align-items: center;
    gap: 10px;
}

.suggestion:hover {
    background: #444;
}

.suggestion img {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
}

.stats-section {
    padding: 20px 0;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background-color: rgba(0, 0, 0, 0.3);
    border: 3px solid #000;
    padding: 25px;
    text-align: center;
    box-shadow: inset 3px 3px 0px rgba(255,255,255,0.1), inset -3px -3px 0px rgba(0,0,0,0.2);
}

.stat-number {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.8rem;
    color: #4ade80;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    color: #BBB;
}

.featured-section {
    padding: 40px 0;
}

.section-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 2rem;
    color: #FFF;
    text-shadow: 3px 3px 0px #000;
    text-align: center;
    margin-bottom: 30px;
}

.featured-skins-container {
    position: relative;
}

.featured-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.featured-grid::-webkit-scrollbar {
    display: none; /* for Chrome, Safari, and Opera */
}

.featured-item {
    background-color: rgba(0, 0, 0, 0.2);
    border: 3px solid #000;
    text-align: center;
    padding: 15px;
    box-shadow: inset 2px 2px 0px rgba(255,255,255,0.1), inset -2px -2px 0px rgba(0,0,0,0.2);
    flex-shrink: 0;
    width: 180px;
}

.featured-item img {
    width: 80%;
    image-rendering: pixelated;
}

.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(44, 44, 44, 0.8);
    color: #fff;
    border: 2px solid #888;
    border-radius: 30px;
    width: 40px;
    height: 40px;
    font-size: 28px;
    font-family: 'VT323', monospace;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
    transition: background-color 0.2s, border-color 0.2s;
}

.scroll-arrow:hover {
    background-color: rgba(66, 66, 66, 0.9);
    border-color: #fff;
}

.left-arrow {
    left: -15px;
}

.right-arrow {
    right: -15px;
}

.site-footer-bottom {
    background-color: #222;
    padding: 20px 0;
    margin-top: auto; 
    border-top: 4px solid #444;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-content p {
    color: #888;
    font-size: 1rem;
}

.footer-links a {
    color: #AAA;
    text-decoration: none;
    margin-left: 15px;
    font-size: 1rem;
}

.footer-links a:hover {
    color: #4ade80;
}

@media (max-width: 768px) {
    .minecraft-title {
        font-size: 2rem;
    }

    .main-nav {
        flex-direction: column;
        gap: 15px;
    }

    .search-button {
        position: static;
        width: 100%;
        margin-top: 10px;
        padding: 15px;
    }

    .search-button:active {
        transform: translate(2px, 2px);
        box-shadow: 0px 0px 0px #000;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .main-nav, nav {
        flex-direction: column;
        gap: 10px;
    }
    .container {
        padding: 0 8px;
    }
    .hero-section {
        margin-top: 60px;
        padding: 20px 0;
    }
    .minecraft-title {
        font-size: 1.3rem;
    }
    .minecraft-subtitle {
        font-size: 1rem;
    }
    .search-input, .search-button {
        font-size: 1rem;
        padding: 10px 12px;
    }
    .search-button {
        width: 100%;
        margin-top: 8px;
        position: static;
        padding: 10px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .stat-card {
        padding: 12px;
    }
    .section-title {
        font-size: 1.2rem;
    }
    .featured-item {
        width: 120px;
        padding: 8px;
    }
    .footer-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 400px) {
    .minecraft-title {
        font-size: 1rem;
    }
    .section-title {
        font-size: 1rem;
    }
    .featured-item {
        width: 90px;
        padding: 4px;
    }
}

.stat-loading {
    min-height: 2.2rem;
}

.stat-loading:after {
    content: '.';
    display: inline-block;
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0% { content: '.'; }
    25% { content: '..'; }
    50% { content: '...'; }
    75% { content: '....'; }
    100% { content: '....'; }
}