/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    width: 100%;
}

body {
    font-family: 'Roboto', sans-serif;
    background: url('../images/arkanite bg.png') center center no-repeat;
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    color: white;
    position: relative;
}

/* Add starfield background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, #fff, transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 160px 30px, #ddd, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: sparkle 20s linear infinite;
    opacity: 0.6;
    z-index: 1;
}

@keyframes sparkle {
    from { transform: translateX(0); }
    to { transform: translateX(-200px); }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Particle/Firefly Container */
.fire-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* Main Wrapper */
.wrapper {
    position: relative;
    z-index: 10;
    text-align: center;
    padding-top: 3vh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-bottom: 2rem;
    width: 100%;
}

/* Logo Styles */
.logo-container {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 20;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Welcome Text */
.welcome-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 
        0px 2px 4px rgba(0,0,0,0.9),
        0px 4px 8px rgba(0,0,0,0.6),
        0 0 10px rgba(255, 255, 255, 0.1);
    letter-spacing: 0.3em;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    opacity: 1;
    animation: fadeInDown 0.8s ease-out 0.4s both;
}

.logo-container:hover {
    transform: scale(1.02);
}

/* Tooltip for logo area */
.logo-container::after {
    content: 'Click to copy server IP!';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 1rem;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 99999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.logo-container::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0.6rem;
    border: 5px solid transparent;
    border-bottom-color: rgba(0, 0, 0, 0.95);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 99999;
}

.logo-container:hover::after,
.logo-container:hover::before {
    opacity: 1;
}

.logo-image {
    width: auto;
    height: 320px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.5));
    transition: all 0.3s ease;
}

.logo-image:hover {
    filter: drop-shadow(0 8px 25px rgba(255, 255, 255, 0.3));
    transform: scale(1.05);
}

.logo {
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
    width: 100%;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-main {
    font-size: 4rem;
    font-weight: 900;
    color: white;
    text-shadow: 
        0px 2px 4px rgba(0,0,0,0.9),
        0px 4px 8px rgba(0,0,0,0.7),
        0px 8px 16px rgba(0,0,0,0.4),
        0px 12px 24px rgba(0,0,0,0.2),
        0 0 20px rgba(255, 255, 255, 0.3),
        0 0 40px rgba(255, 255, 255, 0.1);
    animation: pulse-glow 3s ease-in-out infinite, shimmer 4s ease-in-out infinite;
    line-height: 1;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.2));
    position: relative;
}

.logo-sub {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-shadow: 
        0px 2px 4px rgba(0,0,0,0.9),
        0px 4px 8px rgba(0,0,0,0.6),
        0px 8px 16px rgba(0,0,0,0.3),
        0px 12px 24px rgba(0,0,0,0.1),
        0 0 15px rgba(255, 255, 255, 0.3),
        0 0 30px rgba(255, 255, 255, 0.1);
    margin-top: -0.5rem;
    letter-spacing: 0.2em;
    animation: shimmer 4s ease-in-out infinite reverse;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
    position: relative;
}

.highlight {
    color: #FDCB46;
    text-shadow: 
        0px 2px 4px rgba(0,0,0,0.9),
        0px 4px 8px rgba(0,0,0,0.6),
        0px 8px 16px rgba(0,0,0,0.3),
        0px 12px 24px rgba(0,0,0,0.1),
        0 0 15px rgba(253, 203, 70, 0.4),
        0 0 30px rgba(253, 203, 70, 0.2);
}

.player-count {
    font-size: 1.2rem;
    font-weight: 500;
    color: #4CAF50;
    text-shadow: 
        0px 1px 0px #000,
        0px 2px 0px #000,
        0px 3px 5px rgba(0,0,0,0.8),
        0 0 10px rgba(76, 175, 80, 0.5);
    margin-top: 1.5rem;
    letter-spacing: 0.1em;
}

/* Navigation Buttons */
.buttons {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    margin-top: 0rem;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.nav-btn {
    display: inline-block;
    transition: transform 0.3s ease;
    text-decoration: none;
    position: relative;
}

.nav-btn:hover {
    transform: translateY(-5px);
}

.nav-btn-img {
    width: auto;
    height: 120px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.3));
}

.nav-btn:hover .nav-btn-img {
    filter: drop-shadow(0 8px 25px rgba(255, 255, 255, 0.3)) brightness(1.1);
    transform: scale(1.05);
}


/* Particle Styles */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.8;
}

/* Custom Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0%, 100% { 
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.2));
    }
    50% { 
        filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.4));
    }
}

@keyframes shimmer {
    0% {
        text-shadow: 
            0px 2px 4px rgba(0,0,0,0.9),
            0px 4px 8px rgba(0,0,0,0.7),
            0px 8px 16px rgba(0,0,0,0.4),
            0px 12px 24px rgba(0,0,0,0.2),
            0 0 20px rgba(255, 255, 255, 0.3),
            0 0 40px rgba(255, 255, 255, 0.1);
    }
    25% {
        text-shadow: 
            0px 2px 4px rgba(0,0,0,0.9),
            0px 4px 8px rgba(0,0,0,0.7),
            0px 8px 16px rgba(0,0,0,0.4),
            0px 12px 24px rgba(0,0,0,0.2),
            -20px 0 30px rgba(255, 255, 255, 0.4),
            0 0 20px rgba(255, 255, 255, 0.3),
            0 0 40px rgba(255, 255, 255, 0.1);
    }
    50% {
        text-shadow: 
            0px 2px 4px rgba(0,0,0,0.9),
            0px 4px 8px rgba(0,0,0,0.7),
            0px 8px 16px rgba(0,0,0,0.4),
            0px 12px 24px rgba(0,0,0,0.2),
            0 0 30px rgba(255, 255, 255, 0.5),
            0 0 20px rgba(255, 255, 255, 0.3),
            0 0 40px rgba(255, 255, 255, 0.1);
    }
    75% {
        text-shadow: 
            0px 2px 4px rgba(0,0,0,0.9),
            0px 4px 8px rgba(0,0,0,0.7),
            0px 8px 16px rgba(0,0,0,0.4),
            0px 12px 24px rgba(0,0,0,0.2),
            20px 0 30px rgba(255, 255, 255, 0.4),
            0 0 20px rgba(255, 255, 255, 0.3),
            0 0 40px rgba(255, 255, 255, 0.1);
    }
    100% {
        text-shadow: 
            0px 2px 4px rgba(0,0,0,0.9),
            0px 4px 8px rgba(0,0,0,0.7),
            0px 8px 16px rgba(0,0,0,0.4),
            0px 12px 24px rgba(0,0,0,0.2),
            0 0 20px rgba(255, 255, 255, 0.3),
            0 0 40px rgba(255, 255, 255, 0.1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .wrapper {
        padding: 2rem 1rem;
        padding-top: 2vh;
    }
    
    .buttons {
        gap: 1rem;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .welcome-text {
        font-size: 1rem;
        letter-spacing: 0.2em;
        margin-top: 0.4rem;
        margin-bottom: 0.4rem;
    }
    
    .logo-image {
        height: 260px;
    }
    
    .logo-main {
        font-size: 3rem;
    }
    
    .logo-sub {
        font-size: 1.5rem;
    }
    
    .player-count {
        font-size: 1rem;
    }
    
    .nav-btn-img {
        height: 90px;
    }
    
    /* Adjust tooltip for mobile */
    .logo-container::after {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        margin-top: 0.8rem;
    }
    
    .logo-container::before {
        margin-top: 0.4rem;
    }
}

@media (max-width: 480px) {
    .buttons {
        gap: 0.5rem;
    }
    
    .welcome-text {
        font-size: 0.8rem;
        letter-spacing: 0.1em;
        margin-top: 0.3rem;
        margin-bottom: 0.3rem;
    }
    
    .logo-image {
        height: 200px;
    }
    
    .logo-main {
        font-size: 2.5rem;
    }
    
    .logo-sub {
        font-size: 1.2rem;
    }
    
    .player-count {
        font-size: 0.9rem;
    }
    
    .nav-btn-img {
        height: 75px;
    }
    
    /* Further adjust tooltip for small mobile */
    .logo-container::after {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
        margin-top: 0.6rem;
    }
    
    .logo-container::before {
        margin-top: 0.3rem;
    }
}

/* Discord Modal Styles */
.discord-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.discord-modal-content {
    position: relative;
    background: rgba(30, 30, 46, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin: 5% auto;
    padding: 0;
    border: 2px solid #FDCB46;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 50px rgba(253, 203, 70, 0.4);
    overflow: hidden;
}

.discord-modal-header {
    background: rgba(253, 203, 70, 0.1);
    padding: 2rem;
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(253, 203, 70, 0.3);
}

.discord-modal-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.discord-modal-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: #FDCB46;
}

.discord-modal-body {
    padding: 2rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.1);
}

.discord-modal-body p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
    font-weight: 500;
}

.discord-features {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1.5rem auto;
    flex-wrap: nowrap;
    gap: 2.5rem;
    max-width: 100%;
}

.discord-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    flex: 0 0 auto;
    min-width: auto;
    padding: 0.25rem;
    transition: transform 0.3s ease;
    white-space: nowrap;
}

.discord-feature:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.25rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.discord-feature span:last-child {
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
}

.discord-modal-footer {
    padding: 1.5rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(253, 203, 70, 0.2);
}

.discord-btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.discord-btn-primary {
    background: linear-gradient(135deg, #FDCB46 0%, #f4b643 100%);
    color: #1e1e2e;
    box-shadow: 0 4px 15px rgba(253, 203, 70, 0.4);
    font-weight: 700;
}

.discord-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(253, 203, 70, 0.6);
    background: linear-gradient(135deg, #f4b643 0%, #e5a73a 100%);
}

.discord-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.discord-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Removed fadeIn animation to keep consistent translucency */

/* Modal animation */
.discord-modal.show .discord-modal-content {
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
    }
    to {
        transform: translateY(0);
    }
}

/* Discord Modal Responsive */
@media (max-width: 768px) {
    .discord-modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .discord-modal-header h2 {
        font-size: 1.5rem;
    }
    
    .discord-modal-body p {
        font-size: 1rem;
    }
    
    .discord-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}