:root {
    --color-primary: #007AFF;
    --color-primary-hover: #0051D5;
    --color-bg-dark: #0a0e27;
    --color-bg-card: rgba(255, 255, 255, 0.03);
    --color-success: #34C759;
    --color-gold: #FFD700;
    --color-white: #FFFFFF;
    --color-gray: #8E8E93;
    --color-gray-light: #AEAEB2;
    --color-text-primary: #FFFFFF;
    --color-text-secondary: #8E8E93;
    --color-border: rgba(255, 255, 255, 0.08);

    --font-size-heading: 20px;
    --font-size-body: 15px;
    --font-size-small: 13px;
    --font-weight-bold: 600;
    --font-weight-medium: 500;

    --border-radius-button: 10px;
    --border-radius-card: 12px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

.card, .button, .item, .category-card, .subcategory-item {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

html {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #0a0e27;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0f1429 100%);
    color: var(--color-text-primary);
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
    padding-top: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    margin: 0;
    position: relative;
}

body.mobile-device.fullscreen-mode:not(.onboarding-page) {
    padding-top: max(env(safe-area-inset-top, 0px), 48px);
    transition: padding-top 0.2s ease-out;
}

body.desktop-device:not(.onboarding-page),
body:not(.mobile-device):not(.onboarding-page) {
    padding-top: 1rem;
    transition: padding-top 0.2s ease-out;
}

body.mobile-device:not(.fullscreen-mode):not(.onboarding-page) {
    padding-top: 1rem;
    transition: padding-top 0.2s ease-out;
}

.app {
    min-height: 100vh;
    position: relative;
    overflow: visible;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    box-sizing: border-box;
}

.app:has(.content.page-airdrop) {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.content {
    padding: 1rem;
    padding-top: 0;
    padding-bottom: 9vh;
    transition: padding-top 0.2s ease-out;
    -webkit-overflow-scrolling: touch;
    min-height: 93vh;
    max-height: 100vh;
    box-sizing: border-box;
    overflow-y: auto;
}


.content.page-user {
    padding-bottom: calc(10vh + 100px) !important;
    max-height: 100vh !important;
    overflow-y: auto !important;
}

.content.page-quest {
    padding-bottom: calc(10vh + 100px) !important;
    max-height: 100vh !important;
    overflow-y: auto !important;
}

.content.page-raffle {
    padding-bottom: calc(10vh + 100px) !important;
    max-height: 100vh !important;
    overflow-y: auto !important;
}

.content.page-achievements {
    padding-bottom: calc(10vh + 100px) !important;
    max-height: 100vh !important;
    overflow-y: auto !important;
}

.content.page-airdrop {
    padding: 0 !important;
    padding-bottom: calc(10vh + 20px) !important;
    max-height: 100vh !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    min-height: calc(100vh - 80px) !important;
}

body.mobile-device.fullscreen-mode .content {
    padding-top: max(1rem, 48px);
    transition: padding-top 0.2s ease-out;
}

body.mobile-device.fullscreen-mode .page-web3 {
    padding-top: max(env(safe-area-inset-top, 0px), 48px);
    transition: padding-top 0.2s ease-out;
}

body.mobile-device.fullscreen-mode .page-airdrop,
body.mobile-device.fullscreen-mode .page-quest,
body.mobile-device.fullscreen-mode .page-raffle,
body.mobile-device.fullscreen-mode .page-user {
    padding-top: max(env(safe-area-inset-top, 0px), 48px);
    transition: padding-top 0.2s ease-out;
}

body.mobile-device.fullscreen-mode .content.page-airdrop {
    padding-top: 0 !important;
}

body.desktop-device .content,
body.desktop-device .page-web3,
body.desktop-device .page-airdrop,
body.desktop-device .page-quest,
body.desktop-device .page-raffle,
body.desktop-device .page-user,
body.desktop-device .page-achievements,
body.desktop-device .page-favorites,
body:not(.mobile-device) .content,
body:not(.mobile-device) .page-web3,
body:not(.mobile-device) .page-airdrop,
body:not(.mobile-device) .page-quest,
body:not(.mobile-device) .page-raffle,
body:not(.mobile-device) .page-user,
body:not(.mobile-device) .page-achievements,
body:not(.mobile-device) .page-favorites {
    padding-top: 1rem;
    transition: padding-top 0.2s ease-out;
}

body.desktop-device .content.page-airdrop,
body:not(.mobile-device) .content.page-airdrop {
    padding-top: 0 !important;
}

body.mobile-device:not(.fullscreen-mode) .content,
body.mobile-device:not(.fullscreen-mode) .page-web3,
body.mobile-device:not(.fullscreen-mode) .page-airdrop,
body.mobile-device:not(.fullscreen-mode) .page-quest,
body.mobile-device:not(.fullscreen-mode) .page-raffle,
body.mobile-device:not(.fullscreen-mode) .page-user,
body.mobile-device:not(.fullscreen-mode) .page-achievements,
body.mobile-device:not(.fullscreen-mode) .page-favorites {
    padding-top: 1rem;
    transition: padding-top 0.2s ease-out;
}

body.mobile-device:not(.fullscreen-mode) .content.page-airdrop {
    padding-top: 0 !important;
}

.button {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.875rem 1.5rem;
    border-radius: var(--border-radius-button);
    border: none;
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    min-height: 44px;
}

.button .icon,
a.button .icon {
    filter: brightness(0) saturate(100%) invert(100%);
}

.button .bi,
a.button .bi,
button.button .bi {
    color: var(--color-white) !important;
}

.button.primary .bi,
.button[style*="background: var(--color-primary)"] .bi,
.button[style*="background-color: var(--color-primary)"] .bi {
    color: var(--color-white) !important;
}

.button:hover {
    background: var(--color-primary-hover);
    transform: scale(0.98);
}

.button:active {
    transform: scale(0.96);
}

.card {
    background: var(--color-bg-card);
    border-radius: var(--border-radius-card);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--color-border);
    backdrop-filter: blur(10px);
}

.card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.card:active {
    transform: translateY(0);
}

.title {
    font-size: var(--font-size-heading);
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
    transition: color 0.2s ease;
}

.text {
    font-size: var(--font-size-body);
    color: var(--color-text-secondary);
    line-height: 1.5;
    transition: color 0.2s ease;
}

.header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    padding: var(--spacing-sm) 0;
    padding-bottom: 0;
    z-index: 1000;
    height: auto;
    min-height: 60px;
    overflow: visible !important;
    padding-left: max(0px, env(safe-area-inset-left, 0px));
    padding-right: max(0px, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.footer.web3-active {
    background: linear-gradient(180deg, rgba(0, 122, 255, 0.15) 0%, rgba(0, 122, 255, 0.05) 50%, rgba(0, 0, 0, 0.8) 100%);
    box-shadow: 0 -4px 30px rgba(0, 122, 255, 0.3), 0 -2px 15px rgba(0, 122, 255, 0.2);
}

.footer .group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    text-decoration: none;
    color: var(--color-text-secondary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: var(--spacing-xs);
    border-radius: 8px;
    flex: 1;
    max-width: 80px;
    cursor: pointer;
    position: relative;
}

.footer .group.footer-center {
    flex: 0 0 65px;
    max-width: 65px;
    width: 65px;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0.3rem;
    padding-bottom: 0.6rem;
    padding-left: 0.375rem;
    padding-right: 0.375rem;
    background: #4361EE;
    border-radius: 16px 16px 0 0;
    border-top: 2px solid rgba(67, 97, 238, 0.5);
    border-left: 2px solid rgba(67, 97, 238, 0.5);
    border-right: 2px solid rgba(67, 97, 238, 0.5);
    border-bottom: none;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.7),
                0 0 10px rgba(67, 97, 238, 0.3),
                inset 0 2px 0 rgba(255, 255, 255, 0.1);
    z-index: 1001;
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    height: calc(100% + 16px + 0.5rem);
    min-height: calc(60px + 16px + 0.5rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    pointer-events: auto;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: web3GlowPulse 3s ease-in-out infinite;
}

@keyframes web3GlowPulse {
    0%, 100% {
        box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.7),
                    0 0 10px rgba(67, 97, 238, 0.3),
                    inset 0 2px 0 rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.7),
                    0 0 10px rgba(67, 97, 238, 0.4),
                    inset 0 2px 0 rgba(255, 255, 255, 0.1);
    }
}

.footer.active .group.footer-center {
    background: #4361EE;
}

.footer .group.footer-center.active {
    background: #4361EE !important;
    border-top-color: rgba(67, 97, 238, 0.7);
    border-left-color: rgba(67, 97, 238, 0.7);
    border-right-color: rgba(67, 97, 238, 0.7);
    box-shadow: 0 -8px 30px rgba(67, 97, 238, 0.4),
                0 -4px 20px rgba(67, 97, 238, 0.3),
                0 0 30px rgba(67, 97, 238, 0.3),
                0 0 50px rgba(67, 97, 238, 0.2),
                0 0 70px rgba(67, 97, 238, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.15),
                inset 0 -1px 0 rgba(67, 97, 238, 0.2);
    color: var(--color-white) !important;
    opacity: 1 !important;
    transform: translateX(-50%) scale(1);
    animation: web3GlowPulseActive 3s ease-in-out infinite;
}

.footer .group.footer-center:active {
    transform: translateX(-50%) scale(0.95) !important;
    background: rgba(67, 97, 238, 0.85) !important;
}

.footer .group.footer-center:hover:not(.active) {
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.7),
                0 0 15px rgba(67, 97, 238, 0.5),
                inset 0 2px 0 rgba(255, 255, 255, 0.1);
}

.footer .group.footer-center.active:hover {
    box-shadow: 0 -8px 30px rgba(67, 97, 238, 0.5),
                0 -4px 20px rgba(67, 97, 238, 0.4),
                0 0 35px rgba(67, 97, 238, 0.4),
                0 0 55px rgba(67, 97, 238, 0.3),
                0 0 75px rgba(67, 97, 238, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.15),
                inset 0 -1px 0 rgba(67, 97, 238, 0.2);
}

@keyframes web3GlowPulseActive {
    0%, 100% {
        box-shadow: 0 -8px 30px rgba(67, 97, 238, 0.4),
                    0 -4px 20px rgba(67, 97, 238, 0.3),
                    0 0 30px rgba(67, 97, 238, 0.3),
                    0 0 50px rgba(67, 97, 238, 0.2),
                    0 0 70px rgba(67, 97, 238, 0.15),
                    inset 0 1px 0 rgba(255, 255, 255, 0.15),
                    inset 0 -1px 0 rgba(67, 97, 238, 0.2);
    }
    50% {
        box-shadow: 0 -8px 30px rgba(67, 97, 238, 0.5),
                    0 -4px 20px rgba(67, 97, 238, 0.4),
                    0 0 35px rgba(67, 97, 238, 0.4),
                    0 0 55px rgba(67, 97, 238, 0.3),
                    0 0 75px rgba(67, 97, 238, 0.25),
                    inset 0 1px 0 rgba(255, 255, 255, 0.15),
                    inset 0 -1px 0 rgba(67, 97, 238, 0.2);
    }
}

.footer .group.footer-center.active .icon {
    filter: brightness(0) saturate(100%) invert(100%) !important;
}

.footer .group.footer-center.active .bi {
    color: var(--color-white) !important;
}

.footer .group.footer-center.active .title {
    color: var(--color-white) !important;
}

.footer .group.footer-center .footer-center-top-text {
    font-size: 10px !important;
    font-weight: 600 !important;
    color: var(--color-white);
    text-align: center;
    margin-bottom: 0.15rem;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0.9;
}

.footer .group.footer-center.active .footer-center-top-text {
    color: var(--color-white) !important;
    opacity: 1;
}

.footer .group.footer-center .icon,
.footer .group.footer-center .bi {
    width: 32px !important;
    height: 32px !important;
    font-size: 32px !important;
    background-size: 32px 32px !important;
    margin: auto;
    margin-top: 0.1rem;
    flex-shrink: 0;
    display: block !important;
    color: var(--color-white) !important;
}

.footer .group.footer-center .icon {
    filter: brightness(0) saturate(100%) invert(100%) !important;
}

.footer .group.footer-center .title {
    font-size: 10px !important;
    font-weight: 700 !important;
    margin-top: 0;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    color: var(--color-white) !important;
}

.footer .group.active {
    color: var(--color-primary);
    background: transparent;
}

.footer .group.active:hover {
    background: transparent;
}

.footer .group.active .bi {
    color: var(--color-primary);
}

.footer .group .bi {
    font-size: 22px;
    color: var(--color-text-secondary);
    transition: all 0.2s ease;
}

.footer .group .bi {
    width: 22px !important;
    height: 22px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    font-size: 22px !important;
    color: var(--color-text-secondary);
    transition: color 0.2s ease;
}

.footer .group.active .bi {
    color: var(--color-primary) !important;
}

.footer .group .icon {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    background-size: 22px 22px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    filter: brightness(0) saturate(100%) invert(60%) sepia(0%) saturate(5044%) hue-rotate(133deg) brightness(87%) contrast(83%);
    transition: all 0.2s ease;
    flex-shrink: 0 !important;
    display: block !important;
}

.footer .group.active .icon {
    filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(202deg) brightness(102%) contrast(101%);
}

.footer .group .title {
    font-size: 10px;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0;
}

.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bi {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    transition: color 0.2s ease;
}

.icon-sm .bi {
    font-size: 1rem;
}

.icon-lg .bi {
    font-size: 1.5rem;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--color-bg-dark);
    border-radius: var(--border-radius-card);
    padding: 2rem;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.wheel-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin: var(--spacing-lg) auto;
}

.wheel-container canvas {
    width: 100%;
    height: 100%;
    background: transparent !important;
    border-radius: 50%;
}

.wheel-container .pointer {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 24px solid var(--color-primary);
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.wheel-container #logo {
    display: none;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-alt));
    border-radius: 4px;
    transition: width 0.3s ease;
}

._noscrollbar::-webkit-scrollbar {
    display: none;
}

._noscrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-modal.active {
    opacity: 1;
    pointer-events: all;
}

.custom-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
}

.custom-modal-content {
    position: relative;
    background: var(--color-bg-dark);
    border-radius: 24px;
    padding: 2rem;
    width: calc(100% - 2rem);
    max-width: calc(100% - 2rem);
    margin: 0 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: scale(0.85) translateY(30px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-sizing: border-box;
    will-change: transform, opacity;
}

.custom-modal-content.show {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.custom-modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    margin: 0 auto 1rem;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform, opacity;
}

.custom-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-text-primary);
    text-align: center;
    margin-bottom: 0.75rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

.custom-modal-content.show .custom-modal-title {
    opacity: 1;
    transform: translateY(0);
}

.custom-modal-message {
    font-size: 15px;
    color: var(--color-text-secondary);
    text-align: center;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.15s;
}

.custom-modal-content.show .custom-modal-message {
    opacity: 1;
    transform: translateY(0);
}

.custom-modal-buttons {
    display: flex;
    gap: 0.75rem;
    flex-direction: column;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

.custom-modal-content.show .custom-modal-buttons {
    opacity: 1;
    transform: translateY(0);
}

.custom-modal-button {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-primary);
    position: relative;
    overflow: hidden;
}

.custom-modal-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.custom-modal-button:hover::before {
    width: 300px;
    height: 300px;
}

.custom-modal-button.primary {
    background: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.custom-modal-button.primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
}

.custom-modal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.custom-modal-button:active {
    transform: translateY(0) scale(0.98);
}

.app {
    min-height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

.content {
    flex: 1;
    width: 100%;
    max-width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: var(--spacing-md);
    padding-bottom: 9vh;
    padding-left: max(var(--spacing-md), env(safe-area-inset-left, 0px));
    padding-right: max(var(--spacing-md), env(safe-area-inset-right, 0px));
    padding-bottom: max(9vh, env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    position: relative;
    height: 100%;
}

@media (max-height: 700px) {
    .content {
        padding: 0.75rem;
        padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
        padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
        padding-bottom: max(7vh, env(safe-area-inset-bottom, 0px));
    }

    .footer {
        min-height: 50px;
        padding: 0.5rem 0;
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
    }

    .footer .group .title {
        font-size: 10px;
    }

    .footer .group .bi {
        font-size: 18px;
    }
}

.content > * {
    max-width: 100%;
}

.card, .button {
    max-width: 100%;
    word-wrap: break-word;
}

.page {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

.slide-out-left {
    animation: slideOutLeft 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.slide-out-right {
    animation: slideOutRight 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.slide-in-right {
    animation: slideInRight 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.slide-in-left {
    animation: slideInLeft 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-30%);
        opacity: 0;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(30%);
        opacity: 0;
    }
}

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

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

input,
textarea,
[contenteditable="true"] {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}
