/* MERGE-BLOCK: base.css */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

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

body {
    background: var(--bg-app);
    color: var(--text-primary);
    font-family: var(--font-sans);
    -webkit-user-select: none;
    user-select: none;
    touch-action: manipulation;
    overscroll-behavior: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(0, 243, 255, 0.06) 0%, transparent 42%),
        radial-gradient(circle at 88% 82%, rgba(255, 0, 255, 0.04) 0%, transparent 40%);
}

body.game-active {
    touch-action: none;
}

.hidden {
    display: none !important;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    padding: 18px 20px;
}

.glass-card.menu-card {
    padding: 22px 18px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--accent-2);
    background: rgba(0, 243, 255, 0.06);
    color: var(--accent-2);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform 0.1s ease;
}

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

.btn:hover {
    background: var(--accent-2);
    color: #001018;
    box-shadow: 0 0 18px var(--accent-2-glow);
}

.btn.alt {
    border-color: rgba(167, 139, 250, 0.65);
    background: rgba(99, 102, 241, 0.12);
    color: #c4b5fd;
}

.btn.alt:hover {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

.btn.success {
    border-color: rgba(51, 255, 51, 0.65);
    color: #6ee7b7;
}

.btn.success:hover {
    background: var(--success);
    color: #001a12;
}

.btn.danger {
    border-color: rgba(239, 68, 68, 0.65);
    color: #fca5a5;
}

.btn.danger:hover {
    background: var(--danger-ui);
    color: #fff;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.input {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 15px;
    outline: none;
}

.input:focus {
    border-color: var(--border-active);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.toggle.active {
    border-color: var(--border-active);
    background: var(--accent-glow);
    color: #c7d2fe;
}

#app {
    position: relative;
    width: var(--play-width);
    height: var(--play-height);
    flex-shrink: 0;
    overflow: hidden;
}

#game-wrap {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

canvas {
    display: block;
    touch-action: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
    transform: translateX(-50%) translateY(12px);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 2000;
    white-space: nowrap;
}

.toast.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast svg {
    width: 16px;
    height: 16px;
    stroke: var(--success);
    fill: none;
    stroke-width: 2.5;
}

.panel-hint {
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}
/* END-MERGE-BLOCK */
