* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    color: rgba(255, 255, 255, 0.87);
    background-color: #1a1a2e;
    touch-action: none;
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
    /* Lock to portrait orientation on supported browsers */
    orientation: portrait;
}

#app {
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* Prevent any extra padding/margin from accumulating */
    padding: 0 !important;
    margin: 0 !important;
}

#pixi-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#pixi-container canvas {
    display: block;
}

/* Dev-mode Telegram header (shown only with ?tgdev param) */
#tg-dev-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #1a1a2e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 9999;
    align-items: center;
    padding: 0 12px;
    font-family: Arial, sans-serif;
}

#tg-dev-header .tg-dev-back {
    display: none;
    background: none;
    border: none;
    color: #6ab3f3;
    font-size: 22px;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
}

#tg-dev-header .tg-dev-title {
    flex: 1;
    text-align: center;
    color: #f5f5f5;
    font-size: 17px;
    font-weight: 600;
}

/* Desktop blocker */
#desktop-blocker {
    display: none;
    width: 100%;
    height: 100dvh;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: #1a1a2e;
}

.blocker-content {
    max-width: 400px;
    padding: 32px;
}

.blocker-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

#desktop-blocker h1 {
    font-family: Arial, sans-serif;
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 12px;
    color: #fff;
}

#desktop-blocker p {
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 28px;
}

.blocker-cta {
    display: inline-block;
    padding: 14px 36px;
    background: #4ecca3;
    color: #000;
    font-family: Arial, sans-serif;
    font-size: 18px;
    font-weight: 700;
    border-radius: 14px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.blocker-cta:hover {
    opacity: 0.85;
}

.blocker-proceed {
    display: block;
    margin: 20px auto 0;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    font-family: Arial, sans-serif;
    font-size: 13px;
    cursor: pointer;
    padding: 8px;
}

.blocker-proceed:hover {
    color: rgba(255, 255, 255, 0.5);
}

/* Force portrait-like layout even in landscape */
@media screen and (orientation: landscape) {
    #app {
        /* Keep the same height, don't recalculate */
        height: 100dvh;
        max-height: 100dvh;
    }
}
