/* Base reset and viewport-level defaults */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

body {
    perspective: 1200px;
    overflow: hidden;
    font-family: 'Helvetica Neue', Helvetica, 'Microsoft YaHei', sans-serif;
    background-color: #f7f9ff;
}

/* Cursor theme */
html,
body {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><polygon points="4,4 10,26 14,18 24,18" fill="%23ff91a4" stroke="white" stroke-width="1.5" stroke-linejoin="round"/></svg>') 4 4, auto !important;
}

a,
button,
input,
select,
textarea,
[role="button"],
label,
.btn-nav,
.currency-item,
.terminal-module {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><polygon points="4,4 10,26 14,18 24,18" fill="%23ff91a4" stroke="white" stroke-width="1.5" stroke-linejoin="round"/></svg>') 4 4, pointer !important;
}

/* Background and 3D container */
.static-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #ffeef7 0%, #e7f2ff 100%);
    z-index: -1;
}

.scene {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    pointer-events: none;
}

.ui-layer {
    position: relative;
    width: 100%;
    max-width: 1600px;
    aspect-ratio: 16 / 9;
    transform-style: preserve-3d;
    transform: rotateX(0deg) rotateY(0deg);
    transition: transform 0.15s ease-out;
    pointer-events: none;
}

/* Left-side panel */
.left-panel {
    position: absolute;
    top: 35%;
    left: 4%;
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transform-style: preserve-3d;
    transform-origin: left center;
    transform: translateZ(20px) rotateY(15deg);
    pointer-events: none;
}

.player-card {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.92) 0%, rgba(232, 243, 255, 0.88) 100%);
    padding: 20px;
    position: relative;
    border-left: 4px solid #ff9ec4;
    color: #35507a;
    box-shadow: -10px 10px 20px rgba(120, 150, 200, 0.32);
    pointer-events: auto;
}

.level-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.level-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid rgba(138, 182, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.level-circle .lv-num {
    font-size: 1.8rem;
    font-weight: bold;
    line-height: 1;
}

.level-circle .lv-text {
    font-size: 0.7rem;
    letter-spacing: 1px;
}

.player-info .name {
    font-size: 1.6rem;
    font-weight: bold;
}

.player-info .id {
    font-size: 0.8rem;
    color: #6f7f9d;
    font-family: monospace;
}

.secretary-voice {
    background: rgba(255, 255, 255, 0.78);
    padding: 15px;
    font-size: 0.9rem;
    line-height: 1.6;
    border-left: 2px solid #8ab6ff;
    color: #4a5f86;
    pointer-events: auto;
}

/* Right-side panel */
.right-panel {
    position: absolute;
    top: 20%;
    right: 4%;
    width: 55%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transform-style: preserve-3d;
    transform-origin: right center;
    transform: translate3d(0, 0, 20px) rotateY(-15deg);
    pointer-events: none;
}

.currencies {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    margin-bottom: 20px;
    transform-style: preserve-3d;
    pointer-events: none;
}

.currency-item {
    background: transparent;
    border: none;
    padding: 5px 15px;
    font-family: monospace;
    font-size: 1.1rem;
    color: #2d5fa8;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: -4px 4px 10px rgba(120, 150, 200, 0.28);
    cursor: pointer;
    pointer-events: auto;
    transform: translate3d(0px, 0px, 0px);
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.25s ease, box-shadow 0.25s ease;
}

.currency-icon {
    height: 22px;
    width: auto;
    object-fit: contain;
    pointer-events: none;
}

.currency-item span {
    color: #6f7f9d;
    font-size: 0.9rem;
}

.currency-item:hover {
    background-color: rgba(170, 215, 255, 0.78);
    transform: translate3d(-4px, -4px, 20px);
    box-shadow: -8px 8px 15px rgba(95, 155, 235, 0.42);
}

.terminal-module {
    background: linear-gradient(to right, rgba(240, 249, 255, 0.96), rgba(210, 235, 255, 0.93));
    border-left: 5px solid #4aa9ff;
    height: 140px;
    color: #2d5fa8;
    display: flex;
    align-items: center;
    padding: 0 40px;
    margin-bottom: 5px;
    cursor: pointer;
    position: relative;
    box-shadow: -5px 5px 20px rgba(120, 150, 200, 0.3);
    pointer-events: auto;
    transform: translate3d(0px, 0px, 10px);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.3s ease, box-shadow 0.3s ease;
}

.terminal-module:hover {
    background-color: rgba(180, 220, 255, 0.96);
    transform: translate3d(-8px, -8px, 40px);
    box-shadow: -12px 12px 30px rgba(95, 155, 235, 0.45);
}

.sanity-ring {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 1px solid rgba(74, 169, 255, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 30px;
}

.sanity-ring .num {
    font-size: 2.5rem;
    font-family: 'Arial', sans-serif;
}

.terminal-text .en {
    font-size: 3.5rem;
    font-weight: 300;
    font-family: 'Times New Roman', serif;
    letter-spacing: 2px;
    line-height: 1;
}

.terminal-text .zh {
    font-size: 1.2rem;
    font-weight: bold;
    color: #5b87bf;
    letter-spacing: 5px;
    margin-top: 5px;
}

/* Navigation blocks */
.nav-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    transform-style: preserve-3d;
    pointer-events: none;
}

.nav-grid.two-cols {
    grid-template-columns: 1fr 1fr;
}

.btn-nav {
    background: rgba(255, 255, 255, 0.88);
    height: 85px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 25px;
    cursor: pointer;
    position: relative;
    box-shadow: -4px 4px 15px rgba(120, 150, 200, 0.28);
    pointer-events: auto;
    transform: translate3d(0px, 0px, 0px);
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.25s ease, box-shadow 0.25s ease;
}

.btn-nav::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(74, 169, 255, 0.45);
    transition: 0.2s;
}

.btn-nav:hover {
    background-color: rgba(186, 223, 255, 0.95);
    transform: translate3d(-6px, -6px, 25px);
    box-shadow: -10px 10px 25px rgba(95, 155, 235, 0.44);
}

.btn-nav:hover::after {
    background: #4aa9ff;
    height: 3px;
}

.btn-nav.theme-red {
    background: rgba(126, 191, 255, 0.9);
}

.btn-nav.theme-red:hover {
    background-color: rgba(74, 169, 255, 1);
}

.btn-nav .en {
    font-size: 1.4rem;
    font-family: 'Times New Roman', serif;
    font-style: italic;
    color: #2f5fa5;
}

.btn-nav.theme-red .en {
    color: #fff;
}

.btn-nav .zh {
    font-size: 0.9rem;
    font-weight: bold;
    color: #5c7fb3;
    margin-top: 4px;
}

.btn-nav.theme-red .zh {
    color: rgba(255, 255, 255, 0.92);
}
