@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@500;700&display=swap');

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
    background-color: #010308;
}

@supports (height: 100dvh) {
    body { height: 100dvh !important; }
}

code, pre, .font-mono {
    font-family: 'JetBrains Mono', monospace;
}

.astro-card {
    background: linear-gradient(145deg, rgba(11, 17, 32, 0.94), rgba(3, 6, 15, 0.98));
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.8);
}

canvas#astroBoard {
    cursor: default;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    display: block;
    width: 100%;
    height: 100%;
}

.tool-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.tool-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

input[type=range] {
    accent-color: #38bdf8;
    height: 5px;
    border-radius: 4px;
    background: #334155;
    outline: none;
}

/* 3D ViewCube */
.viewcube-wrapper {
    width: 54px;
    height: 54px;
    perspective: 250px;
    cursor: pointer;
}
.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(-25deg) rotateY(40deg);
    transition: transform 0.08s ease-out;
}
.face {
    position: absolute;
    width: 54px;
    height: 54px;
    background: rgba(15, 23, 42, 0.85);
    border: 1.5px solid #0284c7;
    color: #f8fafc;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: visible;
    transition: all 0.15s;
}
.face:hover { background: #0284c7; color: #fff; }
.face.front  { transform: rotateY(0deg) translateZ(27px); }
.face.back   { transform: rotateY(180deg) translateZ(27px); }
.face.right  { transform: rotateY(90deg) translateZ(27px); }
.face.left   { transform: rotateY(-90deg) translateZ(27px); }
.face.top    { transform: rotateX(90deg) translateZ(27px); }
.face.bottom { transform: rotateX(-90deg) translateZ(27px); }

.cube-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #94a3b8;
    transition: all 0.15s;
}
.cube-btn:hover { background: #1e293b; color: #38bdf8; }

.cube-scale-btn {
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid #334155;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.15s;
}
.cube-scale-btn:hover { border-color: #38bdf8; color: #fff; }
.cube-scale-btn.active {
    background: #0284c7;
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.45);
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #030712; }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #334155; }

.fab-btn { transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.fab-btn:hover { transform: scale(1.08); }
.fab-btn:active { transform: scale(0.94); }

@keyframes bounceShort {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.animate-bounce-short { animation: bounceShort 0.6s ease-in-out; }

@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.animate-spin-slow { animation: spinSlow 16s linear infinite; }