/**
 * Landing Page Styles
 * 
 * Defines styles specific to the landing page layout and components.
 * Implements a responsive grid system and interactive elements.
 * 
 * Table of Contents:
 * 1. Grid Layout
 * 2. Navigation Tiles
 * 3. Modal Components
 * 4. Entry Styles
 * 5. Authentication Controls
 * 6. Responsive Breakpoints
 * 7. State Modifiers
 */

@import 'shared.css';

/* Ensure proper page layout with footer at bottom */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.site-footer {
    margin-top: auto;
    padding: 1rem;
    background-color: #1a1a1a;
    text-align: center;
    width: 100%;
    height: var(--footer-height);
    padding: 1rem 0;
}

/* Entry Component
 * Main content blocks with hover effects
 * Uses consistent spacing and transitions
 */
.landing-entry {
    background-color: #2a2a2a;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 8px;
    border-left: 5px solid #ff8c00;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Modal Styling */
.modal {
    display: none; /* Only this display property should exist */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #2a2a2a;
    padding: 30px;
    border-radius: 8px;
    width: 400px;
    text-align: center;
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.8);
}

.modal-content label {
    display: block;
    margin: 10px 0;
    text-align: left;
    font-size: 1.1em;
    color: #ff8c00;
}

.modal-content input {
    width: calc(100% - 20px);
    padding: 12px 10px;
    margin: 8px 0 20px;
    border-radius: 4px;
    border: 2px solid #444;
    background: #333;
    color: #fff;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.modal-content input:focus {
    border-color: #ff8c00;
    outline: none;
}

.modal-content button {
    background: #ff8c00;
    border: none;
    padding: 12px;
    color: white;
    cursor: pointer;
    width: 100%;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
}
.modal-content button:hover {
    background: #cc5500;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    cursor: pointer;
}

.auth-button {
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}
.auth-button.login {
    background-color: #ff8c00;
    color: white;
}
.auth-button.logout {
    background-color: #444;
    color: white;
}
.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Grid Layout
 * Updated to ensure proper wrapping and responsive behavior
 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.75rem;
    width: 100%;
    max-width: 1200px;
    margin: 1rem auto;
}

.container {
    padding-top: 30px; /* Reduced from previous value */
}

.container.landing-container {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--header-height) - var(--footer-height));
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.public-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.public-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Enhanced Navigation Tiles */
.nav-tile {
    background: var(--tile-gradient-public);
    min-height: var(--tile-min-height);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.75rem;
    text-decoration: none;
    color: var(--color-text);
    transition: var(--tile-transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    backdrop-filter: blur(5px);
    isolation: isolate; /* Ensures z-index stacking works properly */
    --x: 50;
    --duration: 2s;
    --delay: 0s;
}

.nav-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: none;
    pointer-events: none;
}

/* Custom colors for different tile types */
.nav-tile.home::before {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(76, 175, 80, 0.2),
        transparent
    );
}

.nav-tile.changelog::before {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(33, 150, 243, 0.2),
        transparent
    );
}

.nav-tile.store::before {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 193, 7, 0.2),
        transparent
    );
}

.nav-tile.gallery::before {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(233, 30, 99, 0.2),
        transparent
    );
}

.nav-tile.discord::before {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(114, 137, 218, 0.2),
        transparent
    );
}

/* Contact tile color theme */
.nav-tile.contact::before {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(147, 112, 219, 0.2),
        transparent
    );
}

/* Admin tile hover colors */
.nav-tile.changelog-admin::before {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(76, 175, 80, 0.2),
        transparent
    );
}

.nav-tile.images-admin::before {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(233, 30, 99, 0.2),
        transparent
    );
}

.nav-tile.panel-admin::before {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(33, 150, 243, 0.2),
        transparent
    );
}

/* Hover animation */
.nav-tile:hover::before {
    animation: slideRight 1s ease-in-out;
}

@keyframes slideRight {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Disabled state - remove effects */
.nav-tile.disabled::before {
    display: none;
}

.nav-tile::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    transform: scaleY(0);
    transition: transform 0.3s ease;
    background: none; /* Remove existing background */
    transform: none; /* Remove existing transform */
}

.nav-tile.home::after {
    background: #4CAF50;
}

.nav-tile.changelog::after {
    background: #2196F3;
}

.nav-tile.store::after {
    background: #FFC107;
}

.nav-tile.gallery::after {
    background: #E91E63;
}

.nav-tile.discord::after {
    background: #7289DA;
}

/* Contact tile color theme */
.nav-tile.contact::after {
    background: #9370DB;
}

.nav-tile.changelog-admin::after {
    background: #4CAF50;
}

.nav-tile.images-admin::after {
    background: #E91E63;
}

.nav-tile.panel-admin::after {
    background: #2196F3;
}

.nav-tile.disabled::after {
    background: #444;
}

.nav-tile:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: currentColor;
}

.nav-tile:hover::before {
    opacity: 1;
}

.nav-tile:hover::after {
    transform: scaleY(1);
}

/* Unique Tile Variants */
.nav-tile.home {
    background: linear-gradient(145deg, #2a2a2a, #333);
    border-left-color: #4CAF50;
}

.nav-tile.changelog {
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-left-color: #2196F3;
}

.nav-tile.store {
    background: linear-gradient(145deg, #2a2a2a, #3a2a1a);
    border-left-color: #FFC107;
}

.nav-tile.gallery {
    background: linear-gradient(145deg, #2a2a2a, #2a1a2a);
    border-left-color: #E91E63;
}

.nav-tile.discord {
    background: linear-gradient(145deg, #2a2a2a, #1a2a3a);
    border-left-color: #7289DA;
}

/* Contact tile color theme */
.nav-tile.contact {
    background: linear-gradient(145deg, #2a2a2a, #2a1a3a);
    border-left-color: #9370DB;
}

.nav-tile.skins {
    background: linear-gradient(145deg, #2a2a2a, #2a3a2a);
    border-left-color: #4CAF50;
}

.nav-tile.skins:hover {
    background: linear-gradient(145deg, #3a3a3a, #3a4a3a);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(76, 175, 80, 0.3);
}

.nav-tile.skins::after {
    background: #4CAF50;
}

.nav-tile.skins::before {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(76, 175, 80, 0.2),
        transparent
    );
}

.nav-tile.contact:hover {
    background: linear-gradient(145deg, #3a3a3a, #3a2a4a);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(147, 112, 219, 0.3);
}

/* Tile Icons */
.tile-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tile-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.nav-tile:hover .tile-icon {
    transform: scale(1.1);
}

/* Custom hover effects for each type */
.nav-tile.home:hover {
    border-color: #4CAF50;
    box-shadow: 0 8px 16px rgba(76, 175, 80, 0.3);
}

.nav-tile.changelog:hover {
    border-color: #2196F3;
    box-shadow: 0 8px 16px rgba(33, 150, 243, 0.3);
}

.nav-tile.store:hover {
    border-color: #FFC107;
    box-shadow: 0 8px 16px rgba(255, 193, 7, 0.3);
}

.nav-tile.gallery:hover {
    border-color: #E91E63;
    box-shadow: 0 8px 16px rgba(233, 30, 99, 0.3);
}

.nav-tile.discord:hover {
    border-color: #7289DA;
    box-shadow: 0 8px 16px rgba(114, 137, 218, 0.3);
}

/* Admin tile specific styles */
.nav-tile.changelog-admin {
    background: linear-gradient(145deg, #2a2a2a, #1a3a1a);
    border-left-color: #4CAF50;
}

.nav-tile.images-admin {
    background: linear-gradient(145deg, #2a2a2a, #3a1a1a);
    border-left-color: #E91E63;
}

.nav-tile.panel-admin {
    background: linear-gradient(145deg, #2a2a2a, #1a2a4a);
    border-left-color: #2196F3;
}

.nav-tile.changelog-admin:hover {
    border-color: #4CAF50;
    box-shadow: 0 8px 16px rgba(76, 175, 80, 0.3);
}

.nav-tile.images-admin:hover {
    border-color: #E91E63;
    box-shadow: 0 8px 16px rgba(233, 30, 99, 0.3);
}

.nav-tile.panel-admin:hover {
    border-color: #2196F3;
    box-shadow: 0 8px 16px rgba(33, 150, 243, 0.3);
}

.tile-content {
    position: relative;
    z-index: 1;
}

.tile-content h3 {
    color: var(--color-primary);
    font-size: 1.4rem;
    margin: 0 0 0.75rem 0;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.tile-content p {
    color: var(--color-text-secondary);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.9;
}

/* Admin Tile Variants */
.nav-tile.admin {
    background: var(--tile-gradient-admin);
    border-color: rgba(255, 140, 0, 0.2);
}

.nav-tile.admin::after {
    background: linear-gradient(to bottom, #ff8c00, #cc7000);
}

.nav-tile.admin:hover {
    border-color: var(--color-primary);
}

/* Disabled State Enhancement */
.nav-tile.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.5);
    pointer-events: none;
}

.nav-tile.disabled::after {
    display: none;
}

/* Tile Hover Animation */
@keyframes tileSparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
}

.nav-tile .sparkle-effect {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.nav-tile:hover .sparkle-effect::before,
.nav-tile:hover .sparkle-effect::after {
    content: '';
    position: absolute;
    background: radial-gradient(circle at center, 
                currentColor 0%,
                transparent 60%);
    border-radius: 50%;
    opacity: 0;
    animation: tileSparkle 1.5s ease-in-out infinite;
}

/* Custom colors for different tile types */
.nav-tile.home .sparkle-effect::before,
.nav-tile.home .sparkle-effect::after { color: rgba(76, 175, 80, 0.3); }

.nav-tile.changelog .sparkle-effect::before,
.nav-tile.changelog .sparkle-effect::after { color: rgba(33, 150, 243, 0.3); }

.nav-tile.store .sparkle-effect::before,
.nav-tile.store .sparkle-effect::after { color: rgba(255, 193, 7, 0.3); }

.nav-tile.gallery .sparkle-effect::before,
.nav-tile.gallery .sparkle-effect::after { color: rgba(233, 30, 99, 0.3); }

.nav-tile.discord .sparkle-effect::before,
.nav-tile.discord .sparkle-effect::after { color: rgba(114, 137, 218, 0.3); }

/* Add contact sparkle effect */
.nav-tile.contact .sparkle-effect::before,
.nav-tile.contact .sparkle-effect::after { 
    color: rgba(147, 112, 219, 0.3); 
}

/* Position the particles */
.nav-tile .sparkle-effect::before {
    width: 100px;
    height: 100px;
    left: 20%;
    top: 20%;
    animation-delay: 0s;
}

.nav-tile .sparkle-effect::after {
    width: 80px;
    height: 80px;
    right: 20%;
    bottom: 20%;
    animation-delay: 0.3s;
}

/* Reactive hover effect */
.nav-tile:hover::before {
    opacity: 1;
    transform: scale(1.2);
}

/* Disable animations if user prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    .nav-tile::before,
    .nav-tile::after,
    .nav-tile .sparkle-effect::before,
    .nav-tile .sparkle-effect::after {
        animation: none;
        transition: none;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }

    .nav-tile {
        min-height: 150px;
        padding: 1.25rem;
    }

    .tile-content h3 {
        font-size: 1.2rem;
    }

    .tile-content p {
        font-size: 0.9rem;
    }

    .container.landing-container {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .nav-tile {
        min-height: 130px;
        padding: 1rem;
    }

    .tile-content h3 {
        font-size: 1.1rem;
    }
}

/* Disabled State */
.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: #444;
}

/* Section Spacing */
.public-section, .private-section {
    margin-bottom: 2rem; /* Reduced from 3rem */
}

.nav-tile.discord-format {istener('DOMContentLoaded', function() {
    background: linear-gradient(145deg, #2a2a2a, #1a2a4a); {
    border-left-color: #7289DA;lectorAll('.nav-tile').forEach(tile => {
})) {
nst randomX = Math.random() * 80 + 10; // Random position between 10% and 90%
.nav-tile.discord-format:hover {               const randomDuration = (Math.random() * 1 + 2) + 's'; // Random duration between 2-3s
    background: linear-gradient(145deg, #1a2a4a, #2a3a5a);                const randomDelay = (Math.random() * 5) + 's'; // Random delay between 0-5s
    border-color: #99AAB5;
    box-shadow: 0 8px 25px rgba(114, 137, 218, 0.2);tile.style.setProperty('--x', randomX);
    transform: translateY(-5px);tyle.setProperty('--duration', randomDuration);
}e.style.setProperty('--delay', randomDelay);
           }
.nav-tile.discord-format .tile-icon {        });
    color: #7289DA;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}   initLightning();
    setInterval(initLightning, 7000); // Reinitialize every 7 seconds
.centered-content {
    display: flex;
    justify-content: center;    align-items: center;    min-height: calc(100vh - var(--header-height));    padding: 2rem;}.centered-section {    width: 100%;    max-width: 1200px;    margin: 0 auto;}.text-center {    text-align: center;}.centered-grid {    margin: 2rem auto;    max-width: 1000px;}@media (max-width: 768px) {    .centered-content {        padding: 1rem;    }}<script>document.addEventListener('DOMContentLoaded', function() {    function initLightning() {
        document.querySelectorAll('.nav-tile').forEach(tile => {
            if (!tile.classList.contains('disabled')) {
                const randomX = Math.random() * 80 + 10; // Random position between 10% and 90%
                const randomDuration = (Math.random() * 1 + 2) + 's'; // Random duration between 2-3s
                const randomDelay = (Math.random() * 5) + 's'; // Random delay between 0-5s
                
                tile.style.setProperty('--x', randomX);
                tile.style.setProperty('--duration', randomDuration);
                tile.style.setProperty('--delay', randomDelay);
            }
        });
    }

    initLightning();
    setInterval(initLightning, 7000); // Reinitialize every 7 seconds
});
</script>
