* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    color: #00ff45;
}

body {
    font-family: "Oswald", sans-serif;
    background: url(/images/bg.png) no-repeat;
    background-size: cover;
    background-position: right;
    background-repeat: no-repeat;
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 1.9vh;
    position: relative;
}

/* Particle Canvas Background */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.logo {
    display: flex;
    align-items: center;
}

/* Animated Gradient Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgb(0 0 0 / 25%);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 0.2rem 0;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    transform: translateY(-100%);
    animation: slideDown 0.5s ease forwards;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.1);
}

@keyframes slideDown {
    to {
        transform: translateY(0);
    }
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #ffd700, #ff8c00, #ff0066);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
    position: relative;
}

.logo h1::before {
    content: '🏙️ PREMI TOWN';
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, #ff0066, #ffd700, #ff8c00);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.5;
    filter: blur(10px);
    z-index: -1;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    padding: 5px 0;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ffd700, #ff0066);
    transition: width 0.3s;
}

.nav-links a:hover::before {
    width: 100%;
}

.nav-links a:hover {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Hero Section với Parallax và Animation */
.hero {
    height: 100vh;
    background: url('/images/slide.png') no-repeat;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}


@keyframes shine {
    to {
        left: 100%;
    }
}

.hero-content {
    text-align: center;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.glitch {
    font-size: 5rem;
    font-weight: 900;
    position: relative;
    text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75), -0.05em -0.025em 0 rgba(0, 255, 0, 0.75);
    animation: glitch 1s infinite;
    cursor: pointer;
}

.glitch:hover {
    animation: glitch 0.3s infinite;
}

@keyframes glitch {
    0% {
        text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75), -0.05em -0.025em 0 rgba(0, 255, 0, 0.75);
        transform: translate(0, 0);
    }

    25% {
        text-shadow: -0.05em 0 0 rgba(0, 255, 0, 0.75), 0.05em 0.025em 0 rgba(255, 0, 0, 0.75);
        transform: translate(-2px, 1px);
    }

    50% {
        text-shadow: 0.05em 0.025em 0 rgba(0, 0, 255, 0.75), -0.05em -0.025em 0 rgba(255, 215, 0, 0.75);
        transform: translate(2px, -1px);
    }

    75% {
        text-shadow: -0.05em 0 0 rgba(255, 215, 0, 0.75), 0.05em 0.025em 0 rgba(255, 0, 0, 0.75);
        transform: translate(-1px, 0);
    }

    100% {
        text-shadow: 0.05em 0 0 rgba(255, 0, 0, 0.75), -0.05em -0.025em 0 rgba(0, 255, 0, 0.75);
        transform: translate(0, 0);
    }
}

.subtitle {
    font-size: 1.2rem;
    margin: 1rem 0;
    color: #ffd700;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Server Info Cards với hiệu ứng 3D */
.server-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.info-card {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    border-radius: 10px;
    border-left: 3px solid #ffd700;
    transition: all 0.3s;
    animation: float 3s ease-in-out infinite;
    cursor: pointer;
}

.info-card:nth-child(1) {
    animation-delay: 0s;
}

.info-card:nth-child(2) {
    animation-delay: 0.2s;
}

.info-card:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.info-card:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
    border-left-width: 5px;
}

.label {
    display: block;
    font-size: 0.8rem;
    color: #ffd700;
}

.value {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Buttons với hiệu ứng */
.btn-copy,
.btn-discord,
.btn-small {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    border: none;
    padding: 1rem 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    width: fit-content;
    display: block;
    text-transform: uppercase;
}

.discord-widget {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.btn-copy::before,
.btn-discord::before,
.btn-small::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-copy:hover::before,
.btn-discord:hover::before,
.btn-small:hover::before {
    width: 300px;
    height: 300px;
}

.btn-copy:hover,
.btn-discord:hover,
.btn-small:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

/* Features Section với Scroll Animation */
.features {
    padding: 0 0 5rem 0;

}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #ffd700;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s;
}

.section-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #ffd700, #ff0066);
    animation: widthExpand 2s infinite;
}

@keyframes widthExpand {

    0%,
    100% {
        width: 50px;
    }

    50% {
        width: 100px;
    }
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s;
    border: 1px solid rgba(255, 215, 0, 0.2);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s;
    position: relative;
    overflow: hidden;
}

.feature-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    transition: left 0.6s;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: #ffd700;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.2);
}

.icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: iconRotate 0.5s ease;
}

.feature-card:hover .icon {
    animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* Connect Section */
.connect {
    padding: 5rem 0;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a2e 100%);
    position: relative;
}

.connect::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffd700, #ff0066, transparent);
}

.connect-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.step {
    text-align: center;
    background: rgb(0 0 0 / 64%);
    padding: 2rem;
    border-radius: 15px;
    transition: all 0.3s;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s;
    backdrop-filter: blur(10px);
}

.btn-small {
    margin: auto;
}

.discord-widget {
    background: rgb(0 0 0 / 64%);
    padding: 0.5rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.step.visible {
    opacity: 1;
    transform: scale(1);
}

.step:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 215, 0, 0.1);
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
    animation: pulse 2s infinite;
}

/* Rules Section */
.rules {
    padding: 2rem 0;
}

#home {
    position: relative;
}

#home:before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    opacity: .8;
    background: linear-gradient(90deg, rgba(146, 173, 215, 0) 0, rgba(146, 173, 215, .3) 35%, rgb(146, 173, 215) 50%, rgba(146, 173, 215, .3) 65%, rgba(146, 173, 215, 0));
}

.feature-card img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    object-position: center;
}

/* lớp làm mờ */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    filter: blur(2px);
    /* tránh hở viền */
    z-index: 0;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.rule-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 10px;
    border-left: 3px solid #ffd700;
    transition: all 0.3s;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.6s;
}

.rule-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.rule-item:hover {
    transform: translateX(10px);
    background: rgba(255, 215, 0, 0.1);
    border-left-width: 5px;
}

/* Footer */
footer {
    background: #000;
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(255, 215, 0, 0.3);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.05), transparent);
    animation: shine 5s infinite;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ffd700, #ff0066);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff0066, #ffd700);
}

/* Loading Animation */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s;
}

.loader.hide {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 215, 0, 0.3);
    border-top-color: #ffd700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .connect-steps {
        grid-template-columns: repeat(1, 1fr);
        transform: scale(0.8);
        margin-top: 4rem
    }

    .glitch {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

    .server-info {
        flex-direction: column;
    }

    .section-title {
        font-size: 1.8rem;
    }
}