@import url("https://fonts.googleapis.com/css2?family=Fredoka+One:wght@400&family=Nunito:wght@400;600;700;800&display=swap");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Nunito", sans-serif;
    background: linear-gradient(135deg, #87ceeb 0%, #98fb98 50%, #f0e68c 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated background elements */
.bg-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.cloud {
    position: absolute;
    background: white;
    border-radius: 50px;
    opacity: 0.8;
    animation: float 20s infinite linear;
}

.cloud:before,
.cloud:after {
    content: "";
    position: absolute;
    background: white;
    border-radius: 50px;
}

.cloud1 {
    width: 80px;
    height: 40px;
    top: 20%;
    left: -100px;
    animation-duration: 25s;
}

.cloud1:before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 10px;
}

.cloud1:after {
    width: 60px;
    height: 40px;
    top: -15px;
    right: 10px;
}

.cloud2 {
    width: 60px;
    height: 30px;
    top: 40%;
    left: -80px;
    animation-duration: 30s;
    animation-delay: -10s;
}

.cloud2:before {
    width: 40px;
    height: 40px;
    top: -20px;
    left: 8px;
}

.cloud2:after {
    width: 50px;
    height: 30px;
    top: -10px;
    right: 8px;
}

@keyframes float {
    0% {
        transform: translateX(-100px);
    }
    100% {
        transform: translateX(calc(100vw + 100px));
    }
}

/* Floating particles */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ffd700;
    border-radius: 50%;
    animation: sparkle 3s infinite;
}

@keyframes sparkle {
    0%,
    100% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-20px) scale(1);
    }
}

/* Main container */
.container {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 0 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    animation: slideDown 1s ease-out;
}

.logo {
    font-family: "Fredoka One", cursive;
    font-size: 3.5rem;
    color: #2d5016;
    text-shadow: 3px 3px 0px #ffe480, 6px 6px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

.subtitle {
    font-size: 1.3rem;
    color: #4a5d23;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

@keyframes slideDown {
    0% {
        transform: translateY(-50px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bounce {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Main content grid */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* Server info card */
.server-card {
    background: linear-gradient(145deg, #8fbc8f, #98fb98);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 3px solid #228b22;
    animation: slideInLeft 1s ease-out;
    transition: transform 0.3s ease;
}

.server-card:hover {
    transform: translateY(-5px) scale(1.02);
}

.server-title {
    font-family: "Fredoka One", cursive;
    font-size: 2rem;
    color: #2d5016;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.server-info {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-weight: 600;
    color: #2d5016;
}

.info-item:last-child {
    margin-bottom: 0;
}

/* Features card */
.features-card {
    background: linear-gradient(145deg, #dda0dd, #e6e6fa);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 3px solid #9370db;
    animation: slideInRight 1s ease-out;
    transition: transform 0.3s ease;
}

.features-card:hover {
    transform: translateY(-5px) scale(1.02);
}

.features-title {
    font-family: "Fredoka One", cursive;
    font-size: 2rem;
    color: #4b0082;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-item {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: #4b0082;
    transition: transform 0.2s ease;
}

.feature-item:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 1);
}

.feature-item:last-child {
    margin-bottom: 0;
}

/* Worlds section */
.worlds-section {
    margin-bottom: 40px;
    animation: slideUp 1s ease-out 0.5s both;
}

.section-title {
    font-family: "Fredoka One", cursive;
    font-size: 2.5rem;
    color: #8b4513;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.worlds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.world-card {
    background: linear-gradient(145deg, #f4a460, #deb887);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border: 3px solid #cd853f;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Hutan Ajaib - Forest green theme */
.world-card:nth-child(1) {
    background: linear-gradient(145deg, #228b22, #32cd32) !important;
    border: 3px solid #006400 !important;
}

.world-card:nth-child(1) .world-name {
    color: #f0fff0 !important;
}

.world-card:nth-child(1) .world-description {
    color: #e0ffe0 !important;
}

.world-card:nth-child(1):hover {
    box-shadow: 0 15px 35px rgba(34, 139, 34, 0.4) !important;
}

/* Gua Kristal - Crystal blue theme */
.world-card:nth-child(2) {
    background: linear-gradient(145deg, #594a4a, #1c1c1c) !important;
    border: 3px solid #5d5d5d !important;
}

.world-card:nth-child(2) .world-name {
    color: #f0f8ff !important;
}

.world-card:nth-child(2) .world-description {
    color: #e6f3ff !important;
}

.world-card:nth-child(2):hover {
    box-shadow: 0 15px 35px rgba(65, 105, 225, 0.4) !important;
}

/* Pulau Langit - Sky cyan theme */
.world-card:nth-child(3) {
    background: linear-gradient(145deg, #87ceeb, #00ced1) !important;
    border: 3px solid #4682b4 !important;
}

.world-card:nth-child(3) .world-name {
    color: #f0ffff !important;
}

.world-card:nth-child(3) .world-description {
    color: #e0ffff !important;
}

.world-card:nth-child(3):hover {
    box-shadow: 0 15px 35px rgba(135, 206, 235, 0.4) !important;
}

/* Padang Cerah - Sunny yellow theme */
.world-card:nth-child(4) {
    background: linear-gradient(145deg, #ffd700, #ffa500) !important;
    border: 3px solid #daa520 !important;
}

.world-card:nth-child(4) .world-name {
    color: #fffaf0 !important;
}

.world-card:nth-child(4) .world-description {
    color: #fff8dc !important;
}

.world-card:nth-child(4):hover {
    box-shadow: 0 15px 35px rgba(255, 215, 0, 0.4) !important;
}

/* Ender World - Dark purple theme */
.ender-world {
    background: linear-gradient(145deg, #4b0082, #6a0dad) !important;
    border: 3px solid #2e0054 !important;
}

.ender-world .world-name {
    color: #e6e6fa !important;
}

.ender-world .world-description {
    color: #dda0dd !important;
}

.ender-world:hover {
    box-shadow: 0 15px 35px rgba(75, 0, 130, 0.4) !important;
}

/* Crafting World - Orange/brown theme */
.crafting-world {
    background: linear-gradient(145deg, #ff8c00, #ff7f50) !important;
    border: 3px solid #b8860b !important;
}

.crafting-world .world-name {
    color: #fffaf0 !important;
}

.crafting-world .world-description {
    color: #fff8dc !important;
}

.crafting-world:hover {
    box-shadow: 0 15px 35px rgba(255, 140, 0, 0.4) !important;
}

/* Footer Styles */
.footer {
    background: linear-gradient(135deg, #2d5016, #4a5d23);
    padding: 40px 20px 20px;
    margin-top: 60px;
    position: relative;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.footer-content {
    text-align: center;
    position: relative;
    z-index: 10;
}

.footer-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
    font-family: "Nunito", sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-line:last-child {
    margin-bottom: 0;
}

.footer-text {
    color: #e0ffe0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.love-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #ff8282;
    animation: heartBeat 1.5s ease-in-out infinite;
}

.heart-svg {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 0 5px rgba(255, 105, 180, 0.6));
}

@keyframes heartBeat {
    0%,
    100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(1.2);
    }
    75% {
        transform: scale(1.1);
    }
}

.creator-name {
    color: #ffd700;
    font-family: "Fredoka One", cursive;
    font-size: 1.3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    animation: creatorGlow 3s ease-in-out infinite;
}

@keyframes creatorGlow {
    0%,
    100% {
        color: #ffd700;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    }
    50% {
        color: #ffa500;
        text-shadow: 2px 2px 8px rgba(255, 215, 0, 0.8);
    }
}

.company-name {
    color: #87ceeb;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
    animation: companyShine 4s ease-in-out infinite;
}

@keyframes companyShine {
    0%,
    100% {
        color: #87ceeb;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
    }
    50% {
        color: #b0e0e6;
        text-shadow: 1px 1px 6px rgba(135, 206, 235, 0.8);
    }
}

/* Footer decorations */
.footer-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.footer-sparkle {
    position: absolute;
    top: 20%;
    width: 6px;
    height: 6px;
    background: #ffd700;
    border-radius: 50%;
    animation: footerSparkle 3s infinite;
}

@keyframes footerSparkle {
    0%,
    100% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-20px) scale(1);
    }
}

/* Footer background pattern */
.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 20% 20%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 105, 180, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(135, 206, 235, 0.1) 0%, transparent 50%);
    animation: footerPattern 10s ease-in-out infinite;
}

@keyframes footerPattern {
    0%,
    100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
}

/* Mobile responsive footer */
@media (max-width: 768px) {
    .footer {
        padding: 30px 15px 15px;
        margin-top: 40px;
    }

    .footer-line {
        font-size: 1rem;
        gap: 6px;
        margin-bottom: 12px;
        flex-wrap: wrap;
    }

    .creator-name {
        font-size: 1.2rem;
    }

    .love-icon {
        width: 20px;
        height: 20px;
    }

    .heart-svg {
        width: 18px;
        height: 18px;
    }

    /* Disable complex animations on mobile for performance */
    .creator-name,
    .company-name,
    .footer-sparkle {
        animation: none;
    }

    .love-icon {
        animation: heartBeat 2s ease-in-out infinite;
    }
}

/* Flying Ender Dragon */
.ender-dragon-flying {
    position: fixed;
    width: 200px;
    height: 100px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
}

.dragon-body {
    position: absolute;
    width: 130px;
    height: 40px;
    background: linear-gradient(145deg, #1a1a1a, #2f2f2f);
    border-radius: 20px;
    top: 30px;
    left: 35px;
}

.dragon-head {
    position: absolute;
    width: 50px;
    height: 35px;
    background: linear-gradient(145deg, #1a1a1a, #2f2f2f);
    border-radius: 15px;
    top: 32px;
    left: 140px;
}

.dragon-eye {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #9370db;
    border-radius: 50%;
    top: 12px;
}

.dragon-eye.left {
    left: 12px;
}

.dragon-eye.right {
    left: 30px;
}

.dragon-wing {
    position: absolute;
    width: 60px;
    height: 75px;
    background: linear-gradient(145deg, #0a0a0a, #1a1a1a);
    border-radius: 30px 8px;
    top: 8px;
}

.dragon-wing.left {
    left: 25px;
    transform-origin: bottom center;
    animation: wingFlap 0.8s ease-in-out infinite;
}

.dragon-wing.right {
    left: 85px;
    transform-origin: bottom center;
    animation: wingFlap 0.8s ease-in-out infinite reverse;
}

.dragon-tail {
    position: absolute;
    width: 65px;
    height: 25px;
    background: linear-gradient(145deg, #1a1a1a, #2f2f2f);
    border-radius: 30px;
    top: 37px;
    left: -25px;
    transform: rotate(-10deg);
}

@keyframes wingFlap {
    0%,
    100% {
        transform: rotateZ(-10deg);
    }
    50% {
        transform: rotateZ(-25deg);
    }
}

@keyframes dragonFlyAcross {
    0% {
        transform: translateX(-150px) translateY(0px) scale(0.8);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateX(calc(100vw + 150px)) translateY(-50px) scale(1.2);
        opacity: 0;
    }
}

@keyframes dragonFlyDiagonal {
    0% {
        transform: translateX(-150px) translateY(100vh) scale(0.6);
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    85% {
        opacity: 1;
    }
    100% {
        transform: translateX(calc(100vw + 150px)) translateY(-100px) scale(1);
        opacity: 0;
    }
}

@keyframes dragonFlyUp {
    0% {
        transform: translateX(50vw) translateY(100vh) scale(0.7);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: translateX(30vw) translateY(-150px) scale(1.1);
        opacity: 0;
    }
}

/* Dragon breath effect */
.dragon-breath {
    position: absolute;
    width: 40px;
    height: 15px;
    background: radial-gradient(ellipse, rgba(147, 112, 219, 0.8) 0%, rgba(255, 105, 180, 0.6) 50%, transparent 100%);
    border-radius: 50%;
    top: 42px;
    left: 180px;
    animation: breathPulse 1s ease-in-out infinite;
}

@keyframes breathPulse {
    0%,
    100% {
        transform: scaleX(1);
        opacity: 0.6;
    }
    50% {
        transform: scaleX(1.5);
        opacity: 0.9;
    }
}

/* Mobile optimization for dragon */
@media (max-width: 768px) {
    .ender-dragon-flying {
        width: 80px;
        height: 40px;
    }

    .dragon-body {
        width: 50px;
        height: 16px;
        top: 12px;
        left: 15px;
    }

    .dragon-head {
        width: 20px;
        height: 13px;
        top: 14px;
        left: 55px;
    }

    .dragon-wing {
        width: 25px;
        height: 30px;
        top: 3px;
    }

    .dragon-wing.left {
        left: 10px;
    }

    .dragon-wing.right {
        left: 35px;
    }

    .dragon-tail {
        width: 25px;
        height: 10px;
        top: 15px;
        left: -8px;
    }

    .dragon-breath {
        width: 15px;
        height: 5px;
        top: 17px;
        left: 70px;
    }

    .dragon-eye {
        width: 2px;
        height: 2px;
        top: 4px;
    }

    .dragon-eye.left {
        left: 5px;
    }

    .dragon-eye.right {
        left: 12px;
    }
}

.world-card:hover {
    transform: translateY(-8px) rotate(1deg);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.world-name {
    font-family: "Fredoka One", cursive;
    font-size: 1.5rem;
    color: #8b4513;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.world-description {
    color: #654321;
    font-weight: 600;
    line-height: 1.5;
}

/* Join button */
.join-section {
    text-align: center;
    animation: slideUp 1s ease-out 0.7s both;
}

.join-button {
    background: linear-gradient(145deg, #32cd32, #228b22);
    color: white;
    font-family: "Fredoka One", cursive;
    font-size: 1.8rem;
    padding: 20px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    border: 4px solid #006400;
}

.join-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    background: linear-gradient(145deg, #3cb371, #2e8b57);
}

.join-button:active {
    transform: translateY(-2px) scale(1.02);
}

/* Animations */
@keyframes slideInLeft {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    0% {
        transform: translateY(50px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Hero Icons */
.icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.icon-large {
    width: 32px;
    height: 32px;
}

/* Responsive design */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .logo {
        font-size: 2.5rem;
    }

    .worlds-grid {
        grid-template-columns: 1fr;
    }

    .join-button {
        font-size: 1.5rem;
        padding: 15px 30px;
    }
}

/* Add some sparkle effects */
.sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #ffd700;
    border-radius: 50%;
    animation: twinkle 2s infinite;
}

@keyframes twinkle {
    0%,
    100% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Minecraft-style pixelated elements */
.pixel-border {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Status indicator */
.status-online {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #32cd32;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(50, 205, 50, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(50, 205, 50, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(50, 205, 50, 0);
    }
}

/* Minecraft images */
.minecraft-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.minecraft-img:hover {
    transform: scale(1.05);
}

.world-card .minecraft-img {
    height: 150px;
}

.header-decoration {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

/* Minecraft Character Head Styles */
.minecraft-head {
    width: 150px;
    height: 150px;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Steve Head Animations */
.steve-head {
    animation: steveNod 4s ease-in-out infinite;
}

.steve-head:hover {
    animation: steveWave 0.8s ease-in-out;
    transform: scale(1.1);
}

@keyframes steveNod {
    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(-2deg);
    }
    50% {
        transform: translateY(-8px) rotate(0deg);
    }
    75% {
        transform: translateY(-5px) rotate(2deg);
    }
}

@keyframes steveWave {
    0%,
    100% {
        transform: scale(1.1) rotate(0deg);
    }
    25% {
        transform: scale(1.15) rotate(-5deg);
    }
    75% {
        transform: scale(1.15) rotate(5deg);
    }
}

/* Creeper Head Animations */
.creeper-head {
    animation: creeperBob 3s ease-in-out infinite;
}

.creeper-head:hover {
    animation: creeperShake 0.5s ease-in-out;
    filter: brightness(1.2) drop-shadow(0 0 10px #0f7b0f);
}

@keyframes creeperBob {
    0%,
    100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-12px) scale(1.05);
    }
}

@keyframes creeperShake {
    0%,
    100% {
        transform: translateX(0px) scale(1.1);
    }
    10% {
        transform: translateX(-2px) scale(1.1);
    }
    20% {
        transform: translateX(2px) scale(1.1);
    }
    30% {
        transform: translateX(-2px) scale(1.1);
    }
    40% {
        transform: translateX(2px) scale(1.1);
    }
    50% {
        transform: translateX(-1px) scale(1.1);
    }
    60% {
        transform: translateX(1px) scale(1.1);
    }
    70% {
        transform: translateX(-1px) scale(1.1);
    }
    80% {
        transform: translateX(1px) scale(1.1);
    }
    90% {
        transform: translateX(0px) scale(1.1);
    }
}

/* Skeleton Head Animations */
.skeleton-head {
    animation: skeletonFloat 5s ease-in-out infinite;
}

.skeleton-head:hover {
    animation: skeletonGlow 1s ease-in-out;
    filter: drop-shadow(0 0 15px #ff4444);
}

@keyframes skeletonFloat {
    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-6px) rotate(-1deg);
    }
    66% {
        transform: translateY(-3px) rotate(1deg);
    }
}

@keyframes skeletonGlow {
    0%,
    100% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 15px #ff4444) brightness(1);
    }
    50% {
        transform: scale(1.2);
        filter: drop-shadow(0 0 25px #ff4444) brightness(1.3);
    }
}

/* Character Head Interaction Effects */
.minecraft-head:active {
    transform: scale(0.95);
}

/* Staggered animation delays */
.steve-head {
    animation-delay: 0s;
}

.creeper-head {
    animation-delay: -1s;
}

.skeleton-head {
    animation-delay: -2s;
}

/* Mobile optimizations for heads */
@media (max-width: 768px) {
    .minecraft-head {
        width: 80px;
        height: 80px;
    }

    .steve-head:hover,
    .creeper-head:hover,
    .skeleton-head:hover {
        animation: none;
        transform: scale(1.05);
        transition: all 0.2s ease;
    }
}

.feature-icon {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: linear-gradient(145deg, #8fbc8f, #98fb98);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 3px solid #228b22;
    animation: slideInModal 0.4s ease;
}

.modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.modal-title {
    font-family: "Fredoka One", cursive;
    font-size: 2rem;
    color: #2d5016;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.modal-subtitle {
    font-size: 1.1rem;
    color: #4a5d23;
    font-weight: 600;
}

.server-details {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
}

.server-ip {
    text-align: center;
    margin: 20px 0;
}

.ip-address {
    background: #2d5016;
    color: white;
    font-family: "Courier New", monospace;
    font-size: 1.3rem;
    font-weight: bold;
    padding: 15px 20px;
    border-radius: 10px;
    display: inline-block;
    margin: 10px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #4a5d23;
}

.ip-address:hover {
    background: #4a5d23;
    transform: scale(1.05);
    animation: ipGlow 0.8s ease-in-out;
    box-shadow: 0 0 20px rgba(74, 93, 35, 0.6);
}

.ip-address:active {
    transform: scale(0.98);
    animation: ipCopy 0.3s ease-out;
}

@keyframes ipGlow {
    0%,
    100% {
        box-shadow: 0 0 20px rgba(74, 93, 35, 0.6);
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    }
    50% {
        box-shadow: 0 0 30px rgba(74, 93, 35, 0.9);
        text-shadow: 0 0 15px rgba(255, 255, 255, 1);
    }
}

@keyframes ipCopy {
    0% {
        transform: scale(1.05);
    }
    50% {
        transform: scale(0.95);
        background: #32cd32;
    }
    100% {
        transform: scale(0.98);
    }
}

/* Enhanced loading bar */
.loading-progress {
    position: relative;
    overflow: hidden;
}

.loading-progress::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%);
    animation: loadingShine 1.5s infinite;
}

@keyframes loadingShine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Connection steps animation */
.connection-steps li {
    opacity: 0;
    animation: stepFadeIn 0.5s ease-out forwards;
}

.connection-steps li:nth-child(1) {
    animation-delay: 0.1s;
}
.connection-steps li:nth-child(2) {
    animation-delay: 0.2s;
}
.connection-steps li:nth-child(3) {
    animation-delay: 0.3s;
}
.connection-steps li:nth-child(4) {
    animation-delay: 0.4s;
}
.connection-steps li:nth-child(5) {
    animation-delay: 0.5s;
}
.connection-steps li:nth-child(6) {
    animation-delay: 0.6s;
}

@keyframes stepFadeIn {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.connection-steps li:hover {
    transform: translateX(5px) scale(1.02);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.copy-hint {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.connection-steps {
    list-style: none;
    padding: 0;
}

.connection-steps li {
    background: rgba(255, 255, 255, 0.8);
    margin: 10px 0;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #32cd32;
    font-weight: 600;
    color: #2d5016;
    display: flex;
    align-items: center;
    gap: 10px;
}

.step-number {
    background: #32cd32;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
    flex-shrink: 0;
}

.close-modal {
    color: #666;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #2d5016;
}

.modal-footer {
    text-align: center;
    margin-top: 25px;
}

.close-button {
    background: linear-gradient(145deg, #32cd32, #228b22);
    color: white;
    font-family: "Fredoka One", cursive;
    font-size: 1.2rem;
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 2px solid #006400;
}

.close-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInModal {
    0% {
        transform: translate(-50%, -50%) scale(0.7) rotateY(-15deg);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05) rotateY(5deg);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotateY(0deg);
        opacity: 1;
    }
}

@keyframes slideOutModal {
    0% {
        transform: translate(-50%, -50%) scale(1) rotateY(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8) rotateY(15deg);
        opacity: 0;
    }
}

@keyframes bounceIn {
    0% {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
    70% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.9;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes zoomIn {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes flipIn {
    0% {
        transform: translate(-50%, -50%) perspective(400px) rotateX(-90deg);
        opacity: 0;
    }
    40% {
        transform: translate(-50%, -50%) perspective(400px) rotateX(-10deg);
        opacity: 0.7;
    }
    70% {
        transform: translate(-50%, -50%) perspective(400px) rotateX(10deg);
        opacity: 0.9;
    }
    100% {
        transform: translate(-50%, -50%) perspective(400px) rotateX(0deg);
        opacity: 1;
    }
}

/* Modal entrance effects */
.modal-bounce .modal-content,
.modal-bounce .notification-content {
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.modal-zoom .modal-content,
.modal-zoom .notification-content {
    animation: zoomIn 0.4s ease-out;
}

.modal-flip .modal-content,
.modal-flip .notification-content {
    animation: flipIn 0.6s ease-out;
}

/* Enhanced background fade */
@keyframes backgroundFadeIn {
    0% {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    100% {
        opacity: 1;
        backdrop-filter: blur(5px);
    }
}

.modal,
.notification-modal {
    backdrop-filter: blur(5px);
    animation: backgroundFadeIn 0.3s ease;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        backdrop-filter: blur(5px);
    }
    100% {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
}

/* Generic notification modal */
.notification-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.notification-content {
    background: linear-gradient(145deg, #ffd700, #ffa500);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 25px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    border: 3px solid #ff8c00;
    animation: slideInModal 0.4s ease;
    text-align: center;
}

.notification-title {
    font-family: "Fredoka One", cursive;
    font-size: 1.5rem;
    color: #8b4513;
    margin-bottom: 15px;
}

.notification-message {
    font-size: 1.1rem;
    color: #654321;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 20px;
}

.notification-button {
    background: linear-gradient(145deg, #32cd32, #228b22);
    color: white;
    font-family: "Fredoka One", cursive;
    font-size: 1.1rem;
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.notification-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    animation: buttonPulse 0.6s ease-in-out;
}

.notification-button:active {
    transform: translateY(0) scale(0.98);
    animation: buttonPress 0.1s ease-out;
}

@keyframes buttonPulse {
    0%,
    100% {
        transform: translateY(-2px) scale(1.05);
    }
    50% {
        transform: translateY(-4px) scale(1.08);
    }
}

@keyframes buttonPress {
    0% {
        transform: translateY(-2px) scale(1.05);
    }
    100% {
        transform: translateY(0) scale(0.98);
    }
}

/* Enhanced close button animations */
.close-modal {
    transition: all 0.3s ease;
}

.close-modal:hover {
    transform: rotate(90deg) scale(1.2);
    color: #ff4444;
    text-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

.close-button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    animation: buttonWiggle 0.5s ease-in-out;
}

@keyframes buttonWiggle {
    0%,
    100% {
        transform: translateY(-2px) scale(1.05) rotate(0deg);
    }
    25% {
        transform: translateY(-2px) scale(1.05) rotate(-2deg);
    }
    75% {
        transform: translateY(-2px) scale(1.05) rotate(2deg);
    }
}

/* Mobile Performance Optimizations */
@media (max-width: 768px) {
    /* Hide heavy animations on mobile */
    .floating-block,
    .floating-diamond {
        display: none;
    }

    .glow-effect::after,
    .enchanted::after,
    .pulse-border::before {
        display: none;
    }

    .minecraft-particle {
        display: none;
    }

    .floating-text {
        display: none;
    }

    .sparkle {
        display: none;
    }

    /* Simplify hover effects but keep basic interactivity */
    .world-card:hover::before {
        display: none;
    }

    .break-effect::before {
        display: none;
    }

    /* Keep basic button feedback but remove heavy animations */
    .notification-button:hover {
        animation: none;
        transform: translateY(-1px) scale(1.02);
        transition: all 0.2s ease;
    }

    .close-button:hover {
        animation: none;
        transform: translateY(-1px) scale(1.02);
        transition: all 0.2s ease;
    }

    .ip-address:hover {
        animation: none;
        transform: scale(1.02);
        transition: all 0.2s ease;
    }

    /* Disable backdrop blur on mobile for performance */
    .modal,
    .notification-modal {
        backdrop-filter: none;
        background-color: rgba(0, 0, 0, 0.8);
    }

    /* Simple, fast modal animations for mobile */
    .modal-bounce .modal-content,
    .modal-bounce .notification-content,
    .modal-zoom .modal-content,
    .modal-zoom .notification-content,
    .modal-flip .modal-content,
    .modal-flip .notification-content {
        animation: simpleFadeIn 0.2s ease;
    }

    @keyframes simpleFadeIn {
        0% {
            opacity: 0;
            transform: translate(-50%, -50%) scale(0.95);
        }
        100% {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }
    }

    /* Keep essential animations but make them faster */
    .world-card:hover {
        transform: translateY(-2px) scale(1.01);
        transition: all 0.2s ease;
    }

    .server-card:hover,
    .features-card:hover {
        transform: translateY(-2px) scale(1.01);
        transition: all 0.2s ease;
    }
}

/* Responsive modal - Fixed for mobile */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 15px;
        max-height: 95vh;
        max-width: none;
    }

    .modal-title {
        font-size: 1.3rem;
    }

    .ip-address {
        font-size: 1rem;
        padding: 10px 15px;
    }

    .connection-steps {
        font-size: 0.9rem;
    }

    .connection-steps li {
        padding: 10px;
        margin: 8px 0;
    }

    .step-number {
        width: 20px;
        height: 20px;
        font-size: 0.8rem;
    }

    .notification-content {
        width: 95%;
        padding: 20px;
        max-width: none;
    }

    .notification-title {
        font-size: 1.3rem;
    }

    .notification-message {
        font-size: 1rem;
    }
}

/* Interactive floating elements */
.interactive-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.interactive-elements::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("bg.avif") center center / cover no-repeat;
    opacity: 0.34; /* 34% opacity */
    z-index: -1;
    background-attachment: fixed;
}

.floating-block {
    position: absolute;
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #228b22, #32cd32);
    border: 2px solid #006400;
    border-radius: 4px;
    animation: floatBlock 15s infinite linear;
    opacity: 0.7;
}

.floating-diamond {
    position: absolute;
    width: 30px;
    height: 30px;
    background: linear-gradient(45deg, #00bfff, #87ceeb);
    transform: rotate(45deg);
    border: 2px solid #0080ff;
    animation: floatDiamond 20s infinite linear;
    opacity: 0.8;
}

@keyframes floatBlock {
    0% {
        transform: translateX(-50px) rotate(0deg);
    }
    100% {
        transform: translateX(calc(100vw + 50px)) rotate(360deg);
    }
}

@keyframes floatDiamond {
    0% {
        transform: translateX(-40px) translateY(0px) rotate(45deg);
    }
    50% {
        transform: translateX(50vw) translateY(-20px) rotate(225deg);
    }
    100% {
        transform: translateX(calc(100vw + 40px)) translateY(0px) rotate(405deg);
    }
}

/* Enhanced hover effects */
.world-card {
    position: relative;
    overflow: hidden;
}

.world-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.world-card:hover::before {
    animation: shimmer 0.6s ease;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
        opacity: 0;
    }
}

/* Interactive server status */
.server-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgb(255 54 54 / 90%);
    padding: 8px 12px;
    border-radius: 20px;
    margin-left: 10px;
    animation: statusPulse 3s infinite;
}

@keyframes statusPulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Enhanced particle system */
.minecraft-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ffd700;
    border-radius: 2px;
    animation: minecraftParticle 4s infinite;
    pointer-events: none;
}

@keyframes minecraftParticle {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0.5) rotate(360deg);
    }
}

@keyframes loadingProgress {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Advanced Visual Effects */
.glow-effect {
    position: relative;
    overflow: hidden;
}

.glow-effect::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, transparent 70%);
    animation: rotateGlow 4s linear infinite;
    pointer-events: none;
}

@keyframes rotateGlow {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Floating text animation */
.floating-text {
    position: absolute;
    font-family: "Fredoka One", cursive;
    font-size: 1.2rem;
    color: #cdfffd;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: floatText 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 100;
}

@keyframes floatText {
    0%,
    100% {
        transform: translateY(0px) rotate(-2deg);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-20px) rotate(2deg);
        opacity: 1;
    }
}

/* Pulsing border effect */
.pulse-border {
    position: relative;
    border: 3px solid transparent;
    background: linear-gradient(145deg, #8fbc8f, #98fb98);
    background-clip: padding-box;
}

.pulse-border::before {
    content: "";
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #ffd700, #32cd32, #00bfff, #ffd700);
    background-size: 300% 300%;
    border-radius: inherit;
    z-index: -1;
    animation: pulseBorder 3s ease-in-out infinite;
}

@keyframes pulseBorder {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Minecraft block breaking effect */
.break-effect {
    position: relative;
    overflow: hidden;
}

.break-effect::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><rect width="4" height="4" fill="rgba(255,255,255,0.3)"/><rect x="8" y="8" width="4" height="4" fill="rgba(255,255,255,0.3)"/></svg>');
    background-size: 20px 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.break-effect:hover::before {
    opacity: 1;
    animation: breakBlocks 0.5s ease;
}

@keyframes breakBlocks {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Enchantment glint effect */
.enchanted {
    position: relative;
    overflow: hidden;
}

.enchanted::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.5) 50%, transparent 70%);
    animation: enchantmentGlint 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes enchantmentGlint {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Bouncing icons */
.bounce-icon {
    animation: bounceIcon 2s ease-in-out infinite;
}

@keyframes bounceIcon {
    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-7px);
    }
}

/* Typewriter effect enhancement */
.typewriter {
    overflow: hidden;
    border-right: 3px solid #32cd32;
    white-space: nowrap;
    animation: typewriterBlink 1s infinite;
}

@keyframes typewriterBlink {
    0%,
    50% {
        border-color: #32cd32;
    }
    51%,
    100% {
        border-color: transparent;
    }
}
