/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

img {
    border: none;
    outline: none;
    display: block;
    max-width: 100%;
    height: auto;
    -webkit-tap-highlight-color: transparent;
}

button {
    border: none;
    outline: none;
    background: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

button:focus {
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

button:active {
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

a {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

a:focus {
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

a:active {
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: white;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    line-height: 1.5;
}

/* Utility Classes */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-y-auto {
    overflow-y: auto;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-5 {
    margin-bottom: 1.25rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.py-9 {
    padding-top: 2.25rem;
    padding-bottom: 2.25rem;
}

.px-5 {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.flex-1 {
    flex: 1 1 0%;
}

.hidden {
    display: none;
}

.z-50 {
    z-index: 50;
}

.z-10 {
    z-index: 10;
}

.opacity-100 {
    opacity: 1;
}

.opacity-0 {
    opacity: 0;
}

.bg-white {
    background-color: white;
}

.bg-black {
    background-color: black;
}

.bg-transparent {
    background-color: transparent;
}

.bg-opacity-70 {
    background-color: rgba(0, 0, 0, 0.7);
}

.bg-opacity-50 {
    background-color: rgba(255, 255, 255, 0.5);
}

.bg-opacity-30 {
    background-color: rgba(255, 255, 255, 0.3);
}

.bg-gradient-to-b {
    background-image: linear-gradient(to bottom, var(--tw-gradient-stops));
}

.from-blue-50 {
    --tw-gradient-from: #eff6ff;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(239, 246, 255, 0));
}

.to-white {
    --tw-gradient-to: white;
}

.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.from-red-500 {
    --tw-gradient-from: #ef4444;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(239, 68, 68, 0));
}

.to-red-600 {
    --tw-gradient-to: #dc2626;
}

.from-yellow-400 {
    --tw-gradient-from: #facc15;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(250, 204, 21, 0));
}

.to-orange-400 {
    --tw-gradient-to: #fb923c;
}

.rounded-full {
    border-radius: 9999px;
}

.rounded-2xl {
    border-radius: 1rem;
}

.rounded-3xl {
    border-radius: 1.5rem;
}

.border-none {
    border: none;
}

.border-4 {
    border-width: 4px;
}

.border-white {
    border-color: white;
}

.border-t-white {
    border-top-color: white;
}

.object-cover {
    object-fit: cover;
}

.text-center {
    text-align: center;
}

.text-white {
    color: white;
}

.text-red-200 {
    color: #fecaca;
}

.text-blue-900 {
    color: #1e3a8a;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.font-bold {
    font-weight: 700;
}

.font-500 {
    font-weight: 500;
}

.min-w-55px {
    min-width: 55px;
}

.max-w-sm {
    max-width: 24rem;
}

.max-w-md {
    max-width: 28rem;
}

.max-h-90vh {
    max-height: 90vh;
}

.w-12 {
    width: 3rem;
}

.h-12 {
    height: 3rem;
}

.top-3 {
    top: 0.75rem;
}

.right-4 {
    right: 1rem;
}

.cursor-pointer {
    cursor: pointer;
}

.transition-opacity {
    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-500 {
    transition-duration: 500ms;
}

.ease-in-out {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }

    .md\:w-2\.5 {
        width: 0.625rem;
    }

    .md\:h-2\.5 {
        height: 0.625rem;
    }

    .md\:p-5 {
        padding: 1.25rem;
    }

    .md\:p-8 {
        padding: 2rem;
    }

    .md\:top-4 {
        top: 1rem;
    }

    .md\:right-5 {
        right: 1.25rem;
    }

    .md\:mb-6 {
        margin-bottom: 1.5rem;
    }

    .md\:text-2xl {
        font-size: 1.5rem;
        line-height: 2rem;
    }

    .md\:text-3xl {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }

    .md\:rounded-3xl {
        border-radius: 1.5rem;
    }

    .md\:max-w-md {
        max-width: 28rem;
    }

    #routeModal {
        padding: 1.25rem;
    }

    #routeModal>div {
        padding: 2rem;
        border-radius: 1.5rem;
        max-width: 28rem;
    }

    #closeModal {
        top: 1rem;
        right: 1.25rem;
        font-size: 1.875rem;
        line-height: 2.25rem;
    }

    #routeModal h2 {
        font-size: 1.5rem;
        line-height: 2rem;
        margin-bottom: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

/* Carousel Styles */
.carousel-slide {
    pointer-events: none;
}

.carousel-slide.opacity-100 {
    pointer-events: auto;
    z-index: 1;
}

.carousel-slide.opacity-0 {
    z-index: 0;
}

.carousel-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    transition: all 150ms;
}

.carousel-dot.active {
    background-color: rgb(59, 130, 246) !important;
    width: 1.5rem;
    opacity: 1;
}

@media (min-width: 768px) {
    .carousel-dot {
        width: 0.625rem;
        height: 0.625rem;
    }

    .carousel-dot.active {
        width: 2rem;
    }
}

/* Route Item Styles */
.route-item {
    background: white;
    border-radius: 0.75rem;
    padding: 18px 22px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.route-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.route-item-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.route-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.route-item-name {
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
}

.route-item-button {
    border: none;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 1rem;
    background: linear-gradient(to bottom, #cbe1ff, #55a3ff, #8ccdf5);
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
    transition: all 0.2s;
    white-space: nowrap;
    min-width: auto;
    flex-shrink: 0;
    align-self: center;
}

.route-item-button:hover {
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.route-item-button:active {
    transform: scale(0.98);
    box-shadow: 0 1px 2px rgba(59, 130, 246, 0.2);
}

@media (max-width: 640px) {
    .route-item {
        padding: 14px 16px;
        gap: 12px;
    }

    .route-item-header {
        gap: 10px;
    }

    .route-item-name {
        font-size: 0.9375rem;
    }

    .route-item-button {
        padding: 0.4375rem 0.875rem;
        font-size: 0.8125rem;
    }
}

.signal-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 22px;
}

.signal-bar {
    width: 7px;
    background: #4ade80;
    border-radius: 3px;
}

.signal-bar:nth-child(1) {
    height: 7px;
}

.signal-bar:nth-child(2) {
    height: 13px;
}

.signal-bar:nth-child(3) {
    height: 20px;
}

/* Game Card Styles */
.game-card {
    transition: transform 0.2s;
}

.game-card:active {
    transform: scale(0.98);
}

@media (hover: hover) {
    .game-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }
}

/* Modal Styles */
@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.animate-modalIn {
    animation: modalIn 0.3s ease;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Custom Styles */
.text-24rem {
    font-size: 0.8rem;
}

.hover\:opacity-80:hover {
    opacity: 0.8;
}

/* APP Download Card Styles */
.app-download-card {
    background: #e8f4fd;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.app-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.app-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.5;
}

.app-description {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
}

.app-install-btn {
    background: linear-gradient(to bottom, #cbe1ff, #55a3ff, #8ccdf5);
    color: white;
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.app-install-btn:active {
    transform: scale(0.98);
    box-shadow: 0 1px 2px rgba(59, 130, 246, 0.2);
}

@media (max-width: 640px) {
    .app-download-card {
        padding: 0.875rem 1rem;
        gap: 0.75rem;
    }

    .app-title {
        font-size: 0.875rem;
    }

    .app-description {
        font-size: 0.7rem;
    }

    .app-install-btn {
        padding: 0.5rem 1.25rem;
        font-size: 0.8125rem;
    }
}

/* Route Modal */
#routeModal {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

#routeModal.hidden {
    display: none;
}

#routeModal.flex {
    display: flex;
}

/* Enter Web Version Image Styles */
.enter-web-version {
    margin-top: 1rem;
}

.enter-web-version img {
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    user-select: none;
    -webkit-user-select: none;
}

.enter-web-version img:hover {
    opacity: 0.9;
    transform: scale(0.98);
}

.enter-web-version img:active {
    transform: scale(0.96);
    opacity: 0.85;
}

/* Down Tip Styles */
.down-tip {
    /* background-color: #f0f8ff; */
    padding: 2rem 1.5rem;
    margin-top: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.down-tip-scroll {
    color: #3b82f6;
    font-size: 0.9375rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.down-tip-chevron {
    font-size: 1.25rem;
    line-height: 0.5;
    animation: bounce 2s infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-5px);
    }

    60% {
        transform: translateY(-3px);
    }
}

.down-tip-notice {
    color: #6b7280;
    font-size: 0.8125rem;
    line-height: 1.6;
    max-width: 90%;
}

@media (max-width: 640px) {
    .down-tip {
        padding: 1.5rem 1rem;
        gap: 1.25rem;
    }

    .down-tip-scroll {
        font-size: 0.875rem;
    }

    .down-tip-notice {
        font-size: 0.75rem;
    }
}

/* Install Tip Title Styles */
.install-tip-title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 1rem;
    padding: 0;
    position: relative;
    width: 100%;
}

.install-tip-title::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 2px;
    background-color: #e0f2fe;
    z-index: 0;
}

.install-tab {
    background: none;
    border: none;
    padding: 0.75rem 0;
    font-size: 0.9375rem;
    color: #3b82f6;
    cursor: default;
    position: relative;
    font-weight: 500;
}

.install-tab.active {
    color: #3b82f6;
}

.install-tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #3b82f6;
    z-index: 1;
}

@media (max-width: 640px) {
    .install-tip-title {
        gap: 1.5rem;
        margin-top: 1rem;
    }

    .install-tab {
        font-size: 0.875rem;
        padding: 0.625rem 0;
    }
}

/* Install Steps Styles */
.install-steps {
    margin-top: 1.5rem;
    width: 100%;
}

.install-steps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
}

.install-step-item {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.install-step-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

@media (max-width: 640px) {
    .install-steps {
        margin-top: 1.25rem;
    }

    .install-steps-grid {
        gap: 0.75rem;
    }
}

/* Install Notice Styles */
.install-notice {
    background-color: #e8f4fd;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin-top: 1.5rem;
    width: 100%;
}

.install-notice-text {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.6;
    text-align: left;
}

@media (max-width: 640px) {
    .install-notice {
        padding: 0.875rem 1rem;
        margin-top: 1.25rem;
    }

    .install-notice-text {
        font-size: 0.8125rem;
        line-height: 1.5;
    }
}

/* Customer Service Button Styles */
.cs-button {
    position: fixed;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: linear-gradient(to bottom, #cbe1ff, #55a3ff, #8ccdf5);
    border: none;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 40;
    transition: all 0.3s ease;
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
}

.cs-button:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.cs-button:active {
    transform: translateY(-50%) scale(0.95);
}

.cs-list {
    position: fixed;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    margin-top: 4.5rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 0.75rem 0;
    min-width: 10rem;
    z-index: 39;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

.cs-list.show {
    opacity: 1;
    visibility: visible;
    max-height: 20rem;
}

.cs-item {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #374151;
    font-size: 0.9375rem;
    text-decoration: none;
}

.cs-item:hover {
    background: #e8f4fd;
    color: #1e40af;
}

.cs-item:first-child {
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}

.cs-item:last-child {
    border-bottom-left-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
}

.cs-item-icon {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.75rem;
    border-radius: 50%;
    background: linear-gradient(to bottom, #cbe1ff, #55a3ff, #8ccdf5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .cs-button {
        right: 1rem;
        width: 3rem;
        height: 3rem;
        font-size: 1rem;
    }

    .cs-list {
        right: 1rem;
        margin-top: 4rem;
        min-width: 9rem;
    }

    .cs-item {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 640px) {
    .cs-button {
        right: 0.75rem;
        width: 2.75rem;
        height: 2.75rem;
        font-size: 0.9375rem;
    }

    .cs-list {
        right: 0.75rem;
        margin-top: 3.5rem;
        min-width: 8rem;
    }
}

/* Image Viewer Styles */
.image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.image-viewer.show {
    display: flex;
}

.image-viewer-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-viewer img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0.5rem;
}

.image-viewer-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 101;
}

.image-viewer-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.image-viewer-prev,
.image-viewer-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 101;
}

.image-viewer-prev {
    left: 1rem;
}

.image-viewer-next {
    right: 1rem;
}

.image-viewer-prev:hover,
.image-viewer-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.image-viewer-prev:active,
.image-viewer-next:active {
    transform: translateY(-50%) scale(0.95);
}

.install-step-item img {
    cursor: pointer;
    transition: transform 0.2s;
}

.install-step-item img:hover {
    transform: scale(1.02);
}

@media (max-width: 640px) {
    .image-viewer {
        padding: 1rem;
    }

    .image-viewer-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 2rem;
        height: 2rem;
        font-size: 1.25rem;
    }

    .image-viewer-prev,
    .image-viewer-next {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.25rem;
    }

    .image-viewer-prev {
        left: 0.5rem;
    }

    .image-viewer-next {
        right: 0.5rem;
    }
}

/* Loading Overlay Styles */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1.5rem;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner-large {
    width: 3.5rem;
    height: 3.5rem;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: white;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
}
