* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #000000;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

/* Particles container */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
}

/* Background Blur Overlay */
#background-blur {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    backdrop-filter: blur(3px);
    /* Subtle blur for particles */
    -webkit-backdrop-filter: blur(3px);
    z-index: 0;
    pointer-events: none;
}

/* Preloader Styles */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.preloader-logo {
    /* Reuse existing logo styles but ensure visibility */
    display: block;
    margin-bottom: 0;
}

.preloader-logo span {
    /* Using the existing wave animation defined below */
    display: inline-block;
    animation: wave 1.5s ease-in-out infinite;
}

/* Stagger animation for preloader specifically if needed, 
   but the general .logo span rules below will apply automatically 
   since we used the same class structure */

.loading-bar-container {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loading-bar {
    width: 0%;
    height: 100%;
    background: #ffffff;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transition: width 0.1s linear;
}

#loading-tip {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 1rem;
    font-style: italic;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
    min-height: 1.2em;
    /* Prevent layout shift */
    animation: pulseTip 2s infinite ease-in-out;
}

@keyframes pulseTip {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
        text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
    }
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    width: 90%;
    padding: 3rem 2rem;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    display: inline-block;
}

.logo span {
    display: inline-block;
    animation: wave 2s ease-in-out infinite;
}

.logo span:nth-child(1) {
    animation-delay: 0s;
}

.logo span:nth-child(2) {
    animation-delay: 0.1s;
}

.logo span:nth-child(3) {
    animation-delay: 0.2s;
}

.logo span:nth-child(4) {
    animation-delay: 0.3s;
}

.logo span:nth-child(5) {
    animation-delay: 0.4s;
}

.logo span:nth-child(6) {
    animation-delay: 0.5s;
}

.logo span:nth-child(7) {
    animation-delay: 0.6s;
}

.logo span:nth-child(8) {
    animation-delay: 0.7s;
}

.logo span:nth-child(9) {
    animation-delay: 0.8s;
}

@keyframes wave {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.tagline {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Card Styles */
.card {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 1rem;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.8s ease-out backwards;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.card:nth-child(1) {
    animation-delay: 0.1s;
}

.card:nth-child(2) {
    animation-delay: 0.2s;
}

.card:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.7);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

.card-icon {
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    color: #ffffff;
}

.card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
    border-color: rgba(255, 255, 255, 0.5);
}

.card-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #ffffff;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

.card-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Button Styles */
.card-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    /* Wrap on small screens if needed */
}

.card-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    color: #ffffff;
    background: transparent;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.card-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: -1;
    background: rgba(255, 255, 255, 0.1);
}

.card-button:hover::before {
    width: 300px;
    height: 300px;
}

.card-button:hover {
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.button-arrow {
    transition: transform 0.3s ease;
}

.card-button:hover .button-arrow {
    transform: translateX(4px);
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    animation: fadeIn 1s ease-out 0.5s backwards;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .card {
        padding: 2rem;
    }

    .container {
        padding: 2rem 1rem;
    }
}

/* Modal Popup */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 1rem;
    padding: 3rem 4rem;
    text-align: center;
    animation: slideIn 0.3s ease;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.modal-content p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.server-label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.6);
}

.server-ip-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
}

.server-ip {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    color: #ffffff;
    background: transparent;
    padding: 0;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.copy-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.05);
}

.copy-btn.copied {
    background: rgba(0, 255, 0, 0.2);
    border-color: rgba(0, 255, 0, 0.6);
}

.server-version {
    font-size: 0.95rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.5);
}

.close-modal-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #ffffff;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

.close-modal-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 1.5rem auto 0;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}