/*
 * Custom CSS to replace Tailwind and other external resources for offline use.
 */

/* --- Fonts --- */
/* You must download and place 'PressStart2P-Regular.ttf' in a 'fonts' folder */
@font-face {
    font-family: 'Press Start 2P';
    src: url('./fonts/PressStart2P-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* --- Base Styles --- */
body {
    background-color: #1a1a1a;
    font-family: sans-serif; /* Fallback font, you may want to download Inter as well */
    color: #d1d5db; /* Light gray text */
    /* Corrected the background image filename */
    background-image: url('./images/bg.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    /* Added position relative for the pseudo-element glow to work (kept for structure) */
    position: relative; 
    overflow-x: hidden; /* Prevent horizontal scrollbar from the full-width elements */
    
    /* --- APPLY THE GLOW PULSE DIRECTLY TO THE BACKGROUND IMAGE --- */
    /* Important: We use background-attachment: fixed; to apply the filter only to the background image */
    -webkit-filter: drop-shadow(0 0 10px rgba(192, 132, 252, 0.5));
    filter: drop-shadow(0 0 10px rgba(192, 132, 252, 0.5));
    
    /* Apply the pulsing animation */
    animation: pulse-purple-filter 3s ease-in-out infinite alternate;
}

/* --- Keyframe Animation for Targeted Purple Pulse --- */
/* This animation changes the brightness and hue slightly to create a pulsing glow effect on the image's purple parts. */
@keyframes pulse-purple-filter {
    0% {
        filter: 
            drop-shadow(0 0 5px rgba(192, 132, 252, 0.4))
            brightness(100%)
            hue-rotate(0deg);
    }
    100% {
        filter: 
            drop-shadow(0 0 15px rgba(192, 132, 252, 0.8)) /* More intense shadow glow */
            brightness(110%) /* Slight brightness increase */
            hue-rotate(5deg); /* Subtle color shift for a dynamic look */
    }
}
/* End of Background Glow Effect */

.font-minecraft {
    font-family: 'Press Start 2P', cursive;
}
.antialiased {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.min-h-screen {
    min-height: 100vh;
}
.hidden {
    display: none;
}
.page-section.hidden {
    display: none;
}

/* --- Navigation Bar --- */
.nav {
    background-color: rgba(17, 24, 39, 0.7);
    color: #fff;
    padding: 1rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    backdrop-filter: blur(8px);
    /* Removed border-radius and margin to make it a full-width bar */
    border-radius: 0;
    margin: 0; 
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}
.logo {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    line-height: 2rem;
    color: #34d399;
    transition: transform 0.2s ease-in-out;
}
.logo:hover {
    transform: scale(1.05);
}
.desktop-menu {
    display: none;
    gap: 1.5rem;
    align-items: center;
    padding-left: 1rem;
    padding-right: 1rem;
}
.desktop-menu .menu-item {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #ff4900;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    position: relative;
    overflow: hidden;
    transition: color 0.3s ease;
}
.desktop-menu .menu-item:hover, .dropdown-item:hover {
    color: #34d399;
    text-shadow: 0 0 8px #34d399;
}
.desktop-menu .menu-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #34d399;
    transform: scaleX(0);
    transition: transform 0.3s ease-in-out;
}
.desktop-menu .menu-item:hover::after {
    transform: scaleX(1);
}
.dropdown {
    position: relative;
}
.dropdown-menu {
    position: absolute;
    top: 100%;
    margin-top: 0.5rem;
    width: 12rem;
    background-color: #1f2937;
    border: 1px solid #374151;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    z-index: 50;
    overflow: hidden;
}
.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.875rem;
    color: #d1d5db;
    background-color: #1f2937;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}
.dropdown-item:hover {
    background-color: #374151;
    color: #34d399;
}
.mobile-menu-button {
    display: block;
    color: #fff;
    transition: transform 0.2s ease-in-out;
    background-color: transparent;
    border: none;
    cursor: pointer;
}
.mobile-menu-button:hover {
    transform: scale(1.1);
}
.mobile-menu-button:focus, .menu-item.login-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.5);
    border-radius: 0.25rem;
}
.mobile-menu-icon {
    width: 1.5rem;
    height: 1.5rem;
}
.mobile-menu {
    margin-top: 1rem;
    background-color: #1f2937;
    border-radius: 0.5rem;
    border: 1px solid #374151;
    overflow: hidden;
}
.mobile-menu-item {
    display: block;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
    border-bottom: 1px solid #374151;
}
.mobile-menu-item:last-child {
    border-bottom: none;
}
.mobile-menu-item:hover {
    background-color: #374151;
    color: #34d399;
}
@media (min-width: 768px) {
    .mobile-menu-button, .mobile-menu {
        display: none;
    }
    .desktop-menu {
        display: flex;
    }
}

/* --- Main Content --- */
.main-content-container {
    min-height: 100vh;
}
.page-section {
    min-height: 100vh;
}

/* --- Home Page --- */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
}
.hero-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.25rem;
    line-height: 2.5rem;
    color: #8fff00;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1)) drop-shadow(0 1px 1px rgba(0,0,0,0.06));
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.hero-subtitle {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #34d399;
    margin-top: 1rem;
}
.hero-buttons {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
@media (min-width: 640px) {
    .hero-title { font-size: 3rem; line-height: 1; }
    .hero-subtitle { font-size: 1rem; line-height: 1.5rem; }
    .hero-buttons { flex-direction: row; gap: 1rem; }
}
@media (min-width: 768px) {
    .hero-title { font-size: 4.5rem; }
    .hero-subtitle { font-size: 1.25rem; }
}
.btn-minecraft {
    background-color: #34d399;
    color: #fff;
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 0;
    border: 3px solid #10b981;
    box-shadow: inset 0px 4px #22c55e, inset 0px -4px #10b981;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: transform 0.1s ease-in-out, box-shadow 0.1s ease-in-out;
}
.btn-minecraft:hover {
    transform: translateY(2px) scale(1.02);
    box-shadow: inset 0px 2px #22c55e, inset 0px -2px #10b981;
}
.btn-minecraft:active {
    transform: translateY(4px) scale(0.98);
    box-shadow: inset 0px 0px #22c55e, inset 0px -0px #10b981;
}
.btn-secondary {
    background-color: #1f2937;
    color: #d1d5db;
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 0;
    border: 3px solid #374151;
    box-shadow: inset 0px 4px #374151, inset 0px -4px #111827;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: transform 0.1s ease-in-out, box-shadow 0.1s ease-in-out;
}
.btn-secondary:hover {
    background-color: #374151;
    transform: translateY(2px) scale(1.02);
    box-shadow: inset 0px 2px #374151, inset 0px -2px #111827;
}
.btn-secondary:active {
    background-color: #1f2937;
    transform: translateY(4px) scale(0.98);
    box-shadow: inset 0px 0px #374151, inset 0px -0px #111827;
}

/* --- Features Section --- */
.features-section, .news-page, .shop-page, .cta-section, .footer {
    padding: 4rem 1rem; /* Base padding for all four sides */
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    position: relative; /* Ensure content is above the glow overlay */
    z-index: 1;
}

/* * CRITICAL FIX: Aggressively increase top padding for news and shop pages 
 * to clear the fixed navigation bar. Using 12rem (192px) with !important
 * forces this rule to take precedence and provide maximum clearance.
 */
.news-page, .shop-page {
    padding-top: 12rem !important; 
}

.features-section .text-center {
    text-align: center;
}
.features-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.875rem;
    line-height: 2.25rem;
    color: #fff;
    margin-bottom: 2rem;
}
.features-subtitle {
    color: #9ca3af;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3rem;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 2rem;
}
@media (min-width: 768px) {
    .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .features-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.feature-card {
    background-color: #1f2937;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    border-width: 1px;
    border-style: solid;
    border-color: #374151;
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.feature-card:hover {
    transform: scale(1.05);
}
.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-align: center;
}
.feature-card-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.25rem;
    line-height: 1.75rem;
    color: #34d399;
    margin-bottom: 0.5rem;
    text-align: center;
}
.feature-card-text {
    color: #9ca3af;
    font-size: 0.875rem;
    line-height: 1.25rem;
    text-align: center;
}

/* --- News Page --- */
.news-title, .shop-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.875rem;
    line-height: 2.25rem;
    color: #fff;
    margin-bottom: 2rem;
    text-align: center;
}
.news-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 2rem;
}
@media (min-width: 768px) {
    .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .news-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.news-article {
    background-color: #1f2937;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    border-width: 1px;
    border-style: solid;
    border-color: #374151;
}
.news-image {
    width: 100%;
    height: auto;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}
.news-article-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.25rem;
    line-height: 1.75rem;
    color: #34d399;
    margin-bottom: 0.5rem;
}
.news-article-text {
    color: #9ca3af;
    font-size: 0.875rem;
    line-height: 1.25rem;
}
.news-read-more {
    margin-top: 1rem;
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 700;
    color: #34d399;
}
.news-read-more:hover {
    color: #10b981;
}

/* --- Shop Page --- */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 2rem;
}
@media (min-width: 640px) {
    .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
    .shop-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.shop-item {
    background-color: #1f2937;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    border-width: 1px;
    border-style: solid;
    border-color: #374151;
    text-align: center;
}
.shop-image {
    width: 8rem;
    height: 8rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
    border-radius: 0.375rem;
}
.shop-item-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.25rem;
    line-height: 1.75rem;
    color: #34d399;
    margin-bottom: 0.5rem;
}
.shop-item-text {
    color: #9ca3af;
    font-size: 0.875rem;
    line-height: 1.25rem;
    margin-bottom: 1rem;
}
.shop-item-price {
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1.75rem;
    color: #fff;
    margin-bottom: 1rem;
}
.shop-item .btn-minecraft {
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
}

/* --- Call to Action --- */
.cta-section {
    background-color: #111827;
    padding-top: 4rem;
    padding-bottom: 4rem;
}
.cta-container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
.cta-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.875rem;
    line-height: 2.25rem;
    color: #fff;
    margin-bottom: 1rem;
}
.cta-text {
    color: #9ca3af;
    margin-bottom: 2rem;
}
.cta-buttons {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}
@media (min-width: 640px) {
    .cta-buttons {
        flex-direction: row;
    }
}

/* --- Footer --- */
.footer {
    background-color: #030712;
    color: #6b7280;
    /* FINAL CHANGE: Remove all vertical padding */
    padding-top: 0;
    padding-bottom: 0;
    text-align: center;
}
.footer-text {
    /* FINAL CHANGE: Reduced font size and line height */
    font-size: 0.75rem; /* Reduced from 0.875rem */
    line-height: 1rem;  /* Reduced from 1.25rem */
}
.footer-icons {
    /* FINAL CHANGE: Removed margin and reduced font size */
    margin-top: 0; /* Reduced from 0.01rem */
    font-size: 0.9rem; /* Reduced from 1.125rem */
    line-height: 1.25rem; /* Reduced from 1.75rem */
}
.footer-icon {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    transition-property: color;
    transition-duration: 150ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.footer-icon:hover {
    color: #fff;
}

/* --- Message Box --- */
.message-box {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 2rem;
    border-radius: 8px;
    background-color: #10b981;
    color: white;
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.message-box.show {
    display: block;
    opacity: 1;
}
}