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

body {
    min-height: 100vh;
    min-height: 100dvh;
    background: #0a0a0f;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    font-family: 'Segoe UI', 'Courier New', monospace;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px;
    position: relative;
    touch-action: pan-y;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

#interactive-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.ball {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 3;
    will-change: transform, left, top;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

.content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    max-width: 900px;
    width: 100%;
    padding: 30px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: 40px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    pointer-events: none;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    pointer-events: none;
}

.animate-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.4s cubic-bezier(0.15, 0.85, 0.35, 1),
                transform 1.4s cubic-bezier(0.15, 0.85, 0.35, 1);
    will-change: transform, opacity;
    backface-visibility: hidden;
    pointer-events: none;
}

.animate-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.studio {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 30px;
    display: inline-block;
    pointer-events: none;
}

.studio .char {
    display: inline-block;
    opacity: 0;
    transform: scale(0.6) rotate(-8deg);
    transition: opacity 0.5s cubic-bezier(0.15, 0.85, 0.35, 1),
                transform 0.5s cubic-bezier(0.15, 0.85, 0.35, 1);
}

.studio .char.visible {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.intro-text {
    font-family: 'Segoe UI', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 40px;
    pointer-events: none;
}

.game-logo-img {
    max-width: 40%;
    height: auto;
    margin-bottom: 20px;
    display: block;
    pointer-events: none;
    background: transparent !important;
    background-color: transparent !important;
}

.game-logo-img-fallback {
    display: none;
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 6px;
    font-family: 'Segoe UI', sans-serif;
    color: #fff;
    pointer-events: none;
}

.subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 8px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6px;
    pointer-events: none;
}

.tagline {
    font-size: 1rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: 3px;
    margin-bottom: 40px;
    font-style: italic;
    pointer-events: none;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 30px;
    margin-bottom: 20px;
    pointer-events: none;
    width: 100%;
    max-width: 640px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 0.7rem;
    letter-spacing: 1.2px;
    font-weight: 500;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: 'Segoe UI', sans-serif;
    text-decoration: none;
    text-align: center;
    flex: 1;
    min-width: 120px;
    position: relative;
    user-select: none;
    pointer-events: auto;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 8px;
    padding: 1px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: opacity 0.3s ease;
    background: transparent;
}

.btn-dapp::before {
    background: linear-gradient(135deg, #9945FF, #14F195) !important;
    opacity: 1;
}

.btn-browser::before {
    background: #ffffff !important;
    opacity: 1;
}

.btn-apk::before {
    background: #ffffff !important;
    opacity: 1;
}

.btn-browser:hover::before,
.btn-apk:hover::before {
    opacity: 0;
}

.btn-browser:hover,
.btn-apk:hover {
    color: #000 !important;
    background: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(255,255,255,0.1);
}

.btn:active {
    transform: translateY(0px) scale(0.97);
}

.btn-dapp {
    cursor: default;
}
.btn-dapp:hover {
    transform: none !important;
    color: rgba(255, 255, 255, 0.8) !important;
    background: rgba(255, 255, 255, 0.03) !important;
    box-shadow: none !important;
}
.btn-dapp:hover::before {
    opacity: 1 !important;
}

.icon-new-window {
    display: inline;
    margin-left: 4px;
}

.icon-new-window svg {
    display: inline;
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
    margin-top: -2px;
}

.roadmap-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 36px;
    margin-bottom: 12px;
    pointer-events: none;
}

.roadmap-link {
    display: inline-block;
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: color 0.3s ease;
    position: relative;
    pointer-events: auto;
    text-decoration: none;
    font-family: 'Segoe UI', sans-serif;
    padding: 4px 8px;
    border-radius: 4px;
    background: transparent;
    border: none;
    -webkit-tap-highlight-color: transparent;
}

.roadmap-link:hover {
    color: rgba(255, 255, 255, 0.7);
}

.roadmap-link .tooltip {
    position: absolute;
    bottom: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.6rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateX(-50%) translateY(6px);
    border: none;
}

.roadmap-link:hover .tooltip,
.roadmap-link.active .tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.links {
    margin-top: auto;
    padding-top: 30px;
    padding-bottom: 10px;
    display: flex;
    gap: 32px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    pointer-events: auto;
    align-items: center;
}

.links a {
    color: rgba(255, 255, 255, 0.2);
    text-decoration: none;
    font-size: 0.7rem;
    letter-spacing: 2px;
    font-weight: 300;
    transition: color 0.3s ease;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    font-family: 'Segoe UI', sans-serif;
    cursor: pointer;
}

.links a:hover {
    color: rgba(255, 255, 255, 0.7);
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.links .copyright {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.7rem;
    letter-spacing: 2px;
    font-weight: 300;
    margin-left: 4px;
    font-family: 'Segoe UI', sans-serif;
    border-bottom: none;
    padding-bottom: 2px;
    display: inline-block;
    line-height: 1;
}

/* MODAL */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    max-width: 640px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.15, 0.85, 0.35, 1), opacity 0.4s ease;
    opacity: 0;
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 12px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Segoe UI', sans-serif;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.2);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0 4px;
    line-height: 1;
}

.modal-close:hover {
    color: rgba(255, 255, 255, 0.6);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    line-height: 1.7;
    font-family: 'Segoe UI', sans-serif;
}

.modal-body h3 {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 20px;
    margin-bottom: 8px;
}

.modal-body h3:first-of-type {
    margin-top: 0;
}

.modal-body p {
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.modal-body strong {
    color: rgba(255, 255, 255, 0.5);
}

/* Custom scrollbar for modal */
.modal-body::-webkit-scrollbar {
    width: 4px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 2px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.modal-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) rgba(255, 255, 255, 0.02);
}

@media (max-width: 640px) {
    .game-logo-img {
        max-width: 60%;
    }
    .studio {
        font-size: 0.7rem;
        letter-spacing: 2px;
    }
    .intro-text {
        font-size: 0.8rem;
        letter-spacing: 2px;
        margin-bottom: 30px;
    }
    .subtitle {
        font-size: 0.8rem;
        letter-spacing: 5px;
    }
    .tagline {
        font-size: 0.85rem;
    }
    .links {
        gap: 20px;
    }
    .links a {
        font-size: 0.65rem;
    }
    .links .copyright {
        font-size: 0.65rem;
    }
    .btn {
        padding: 12px 16px;
        font-size: 0.6rem;
        min-width: 100px;
        flex: 1 1 auto;
        border-radius: 6px;
        letter-spacing: 1px;
    }
    .btn::before {
        border-radius: 6px;
    }
    .btn-group {
        gap: 12px;
    }
    .icon-new-window svg {
        width: 10px;
        height: 10px;
    }
    .ball {
        width: 22px !important;
        height: 22px !important;
    }
    .roadmap-wrapper {
        margin-top: 28px;
        margin-bottom: 8px;
    }
    .roadmap-link {
        font-size: 0.6rem;
    }
    .roadmap-link .tooltip {
        font-size: 0.5rem;
        padding: 4px 10px;
        bottom: calc(100% + 12px);
    }
    .modal {
        max-height: 90vh;
    }
    .modal-header {
        padding: 16px 20px 10px 20px;
    }
    .modal-body {
        padding: 16px 20px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .btn-group {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .btn {
        min-width: unset;
        padding: 14px 20px;
        font-size: 0.7rem;
    }
    .links {
        gap: 14px;
    }
    .links a {
        font-size: 0.6rem;
    }
    .links .copyright {
        font-size: 0.6rem;
    }
    .roadmap-wrapper {
        margin-top: 24px;
    }
}
