* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: #12122a;
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

#app {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    background: #12122a;
    position: relative;
}

/* Screens */
.screen {
    display: none;
    padding: 20px 16px;
    min-height: 100vh;
}

.screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Home Screen */
.title {
    font-size: 2.2rem;
    margin-top: 60px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

/* 배고픔 경고 배너 */
.hunger-warning-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 95%;
    max-width: 400px;
    margin: 0 auto 10px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #991b1b, #dc2626);
    border-radius: 12px;
    border: 2px solid #f87171;
    animation: warning-flash 1s infinite;
}
.hunger-warning-icon {
    font-size: 1.3rem;
}
.hunger-warning-text {
    color: #fff;
    font-size: 0.9rem;
    font-weight: bold;
}
.hunger-warning-btn {
    background: #fff;
    color: #dc2626;
    border: none;
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
}
.hunger-warning-btn:hover {
    background: #fef2f2;
}
@keyframes warning-flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 배고픔 바 */
.hunger-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 90%;
    max-width: 360px;
    margin: 0 auto 16px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
}
.hunger-bar-label {
    font-size: 0.8rem;
    color: #ccc;
    white-space: nowrap;
}
.hunger-bar-track {
    flex: 1;
    height: 14px;
    background: rgba(255,255,255,0.1);
    border-radius: 7px;
    overflow: hidden;
}
.hunger-bar-fill {
    height: 100%;
    border-radius: 7px;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #22c55e);
    transition: width 0.5s ease;
}
.hunger-bar-fill.low {
    background: linear-gradient(90deg, #ef4444, #f87171);
    animation: hunger-pulse 1s infinite;
}
.hunger-bar-fill.critical {
    background: #ef4444;
    animation: hunger-pulse 0.4s infinite;
}
@keyframes hunger-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.hunger-bar-text {
    font-size: 0.75rem;
    color: #aaa;
    min-width: 32px;
    text-align: right;
}

/* 비만도 바 */
.obesity-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 90%;
    max-width: 360px;
    margin: 0 auto 16px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
}
.obesity-bar-label {
    font-size: 0.8rem;
    color: #ccc;
    white-space: nowrap;
}
.obesity-bar-track {
    flex: 1;
    height: 14px;
    background: rgba(255,255,255,0.1);
    border-radius: 7px;
    overflow: hidden;
}
.obesity-bar-fill {
    height: 100%;
    border-radius: 7px;
    background: linear-gradient(90deg, #facc15, #f97316, #ef4444);
    transition: width 0.5s ease;
}
.obesity-bar-fill.high {
    background: linear-gradient(90deg, #f97316, #ef4444);
    animation: obesity-pulse 1.2s infinite;
}
.obesity-bar-fill.severe {
    background: #ef4444;
    animation: obesity-pulse 0.5s infinite;
}
@keyframes obesity-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
.obesity-bar-text {
    font-size: 0.75rem;
    color: #aaa;
    min-width: 32px;
    text-align: right;
}

/* 사망 오버레이 */
.death-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: #fff;
}
.death-overlay h1 {
    font-size: 3rem;
    color: #ef4444;
    margin-bottom: 12px;
}
.death-overlay p {
    font-size: 1.1rem;
    color: #aaa;
    margin-bottom: 24px;
}
.death-overlay button {
    padding: 12px 32px;
    font-size: 1rem;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.money-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 50px;
    padding: 20px 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.money-label {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 4px;
}

.money-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #4ade80;
}

/* Menu Grid (2 columns) */
.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
}

.menu-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 12px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.menu-btn:active {
    transform: translateY(0);
}

.menu-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.menu-btn.btn-stock {
    background: linear-gradient(135deg, #1a4d2e, #2d7a4a);
}

.menu-btn.btn-stock:hover {
    background: linear-gradient(135deg, #2d7a4a, #3da060);
}

.menu-btn.btn-attendance {
    background: linear-gradient(135deg, #4d3a1a, #7a5a2d);
}

.menu-btn.btn-attendance:hover {
    background: linear-gradient(135deg, #7a5a2d, #a07a3d);
}

.menu-btn.btn-bank {
    background: linear-gradient(135deg, #1a3a5c, #2d6a9a);
}

.menu-btn.btn-bank:hover {
    background: linear-gradient(135deg, #2d6a9a, #3d8ac0);
}

.menu-btn.btn-playzone {
    background: linear-gradient(135deg, #7c2d12, #c2410c);
}

.menu-btn.btn-playzone:hover {
    background: linear-gradient(135deg, #c2410c, #ea580c);
}

.menu-btn.btn-donation {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.menu-btn.btn-donation:hover {
    background: linear-gradient(135deg, #8b5cf6, #c084fc);
}

.menu-btn-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.menu-btn-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

/* General btn (for attendance check-in etc) */
.btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

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

.btn-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.btn-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

/* Screen Header */
.screen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.screen-header h2 {
    font-size: 1.1rem;
}

.header-money {
    font-size: 0.8rem;
    color: #4ade80;
}

.btn-back {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==================== Portfolio Summary ==================== */

.portfolio-summary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    width: 100%;
}

.portfolio-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.85rem;
}

.portfolio-label {
    color: #888;
}

.portfolio-value {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
}

/* ==================== Stock Tabs ==================== */

.stock-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    width: 100%;
}

.stock-tab {
    flex: 1;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #888;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.stock-tab.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* ==================== Stock List ==================== */

.stock-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stock-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: background 0.2s;
    gap: 12px;
}

.stock-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.stock-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stock-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.stock-code {
    font-size: 0.7rem;
    color: #666;
    margin-top: 1px;
}

.stock-owned-info {
    margin-top: 4px;
    font-size: 0.7rem;
    color: #aaa;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.stock-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.stock-price-value {
    font-weight: 700;
    font-size: 0.95rem;
}

.stock-change {
    font-size: 0.75rem;
    font-weight: 600;
}

.stock-change.up, .up {
    color: #ef4444;
}

.stock-change.down, .down {
    color: #3b82f6;
}

.stock-mini-chart {
    flex-shrink: 0;
}

/* ==================== Stock Detail ==================== */

.detail-price-section {
    text-align: center;
    padding: 8px 0 16px;
    width: 100%;
}

.detail-current-price {
    font-size: 2rem;
    font-weight: 800;
}

.detail-current-price.up { color: #ef4444; }
.detail-current-price.down { color: #3b82f6; }

.detail-change {
    font-size: 0.85rem;
    margin-top: 4px;
}

.detail-change.up { color: #ef4444; }
.detail-change.down { color: #3b82f6; }

.detail-chart-container {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
}

.detail-chart-container canvas {
    width: 100%;
    height: 200px;
}

.detail-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    margin-bottom: 12px;
}

.info-cell {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    font-size: 0.8rem;
}

.info-label {
    color: #888;
}

/* Holding info */
.detail-holding {
    width: 100%;
    background: rgba(255, 215, 0, 0.06);
    border: 1px solid rgba(255, 215, 0, 0.15);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
}

.holding-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    font-size: 0.85rem;
}

.holding-row span:first-child {
    color: #aaa;
}

/* ==================== Order Book ==================== */

.order-book {
    width: 100%;
    margin-bottom: 12px;
}

.order-book-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #aaa;
}

.order-book-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.order-sell-side, .order-buy-side {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.order-sell-side {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 6px;
    margin-bottom: 6px;
}

.order-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 8px;
    font-size: 0.78rem;
}

.order-price {
    width: 80px;
    font-weight: 600;
    text-align: right;
}

.order-bar-container {
    flex: 1;
    position: relative;
    height: 20px;
    display: flex;
    align-items: center;
}

.order-bar {
    position: absolute;
    height: 100%;
    border-radius: 3px;
}

.sell-bar {
    background: rgba(59, 130, 246, 0.15);
    right: 0;
}

.buy-bar {
    background: rgba(239, 68, 68, 0.15);
    left: 0;
}

.order-qty {
    position: relative;
    z-index: 1;
    font-size: 0.72rem;
    color: #888;
    margin-left: 4px;
}

/* ==================== Trade Section ==================== */

.trade-section {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 16px;
    position: sticky;
    bottom: 16px;
}

.trade-input-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.trade-input-row label {
    font-size: 0.9rem;
    color: #aaa;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 4px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.qty-control input {
    width: 60px;
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 6px;
    padding: 6px;
    font-size: 0.95rem;
}

.qty-control input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.trade-total {
    text-align: center;
    font-size: 0.85rem;
    color: #aaa;
    margin-bottom: 12px;
}

.trade-total span {
    color: #fff;
    font-weight: 600;
}

.trade-buttons {
    display: flex;
    gap: 10px;
}

.trade-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
    color: white;
}

.trade-btn:hover {
    opacity: 0.85;
}

.trade-btn.buy {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

.trade-btn.sell {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}

/* ==================== Toast ==================== */

.toast {
    position: fixed;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 50, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: bottom 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.toast.show {
    bottom: 30px;
}

/* ==================== Attendance Screen ==================== */

.attendance-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 40px;
}

.streak-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
    padding: 30px 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.streak-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: #ffd700;
}

.streak-label {
    font-size: 0.95rem;
    color: #aaa;
    margin-top: 4px;
}

.btn-checkin {
    background: linear-gradient(135deg, #1a4d6e, #2d7aaa);
    padding: 20px 60px;
}

.btn-checkin:hover {
    background: linear-gradient(135deg, #2d7aaa, #3da0d0);
}

.btn-checkin.disabled {
    background: #333;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.checkin-message {
    margin-top: 24px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffd700;
    min-height: 30px;
    text-align: center;
}

/* ==================== Bank Screen ==================== */

.bank-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.bank-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: background 0.2s;
}

.bank-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.bank-item.bankrupt {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(255, 0, 0, 0.05);
    border-color: rgba(255, 0, 0, 0.15);
}

.bank-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bank-icon {
    font-size: 1.8rem;
}

.bank-info {
    display: flex;
    flex-direction: column;
}

.bank-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.bank-rates {
    font-size: 0.72rem;
    color: #888;
    margin-top: 2px;
}

.bank-my-info {
    display: flex;
    gap: 8px;
    margin-top: 3px;
    font-size: 0.7rem;
    color: #aaa;
}

.bank-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.bank-status {
    font-size: 0.8rem;
    font-weight: 600;
}

.bank-status.safe { color: #4ade80; }
.bank-status.warning { color: #facc15; }
.bank-status.danger { color: #ef4444; }
.bank-status.frozen { color: #f97316; }
.bank-status.bankrupt { color: #666; }

.bank-ratio {
    font-size: 0.7rem;
    color: #888;
}

/* Bank Detail */
.bank-detail-status {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 12px;
    text-align: center;
}

.bank-detail-status.safe-box {
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.bank-detail-status.danger-box {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    animation: pulse-danger 2s infinite;
}

.bank-detail-status.frozen-box {
    background: rgba(249, 115, 22, 0.08);
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.bank-loan-limit-bar {
    margin-top: 10px;
}

.loan-limit-label {
    font-size: 0.72rem;
    color: #aaa;
    margin-bottom: 4px;
}

.loan-limit-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.loan-limit-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80, #facc15, #ef4444);
    border-radius: 3px;
    transition: width 0.3s;
}

@keyframes pulse-danger {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.bank-status-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.bank-status-desc {
    font-size: 0.78rem;
    color: #aaa;
}

.bank-detail-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    margin-bottom: 12px;
}

.bank-action-section {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.bank-action-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #ccc;
}

.menu-btn.btn-shop {
    background: linear-gradient(135deg, #1a5c3a, #2d9a60);
}

.menu-btn.btn-shop:hover {
    background: linear-gradient(135deg, #2d9a60, #3dc080);
}

/* ==================== Shop ==================== */

.shop-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #aaa;
    margin: 12px 0 8px;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.shop-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.shop-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    transition: background 0.2s;
}

.shop-card:hover {
    background: rgba(255,255,255,0.07);
}

.shop-card.owned {
    border-color: rgba(74,222,128,0.3);
    background: rgba(74,222,128,0.05);
}

.shop-card-icon {
    font-size: 2.2rem;
    flex-shrink: 0;
}

.shop-card-info {
    flex: 1;
}

.shop-card-name {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.shop-card-desc {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 4px;
}

.shop-card-effect {
    font-size: 0.72rem;
    color: #4ade80;
    font-weight: 600;
}

.shop-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.shop-card-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: #facc15;
}

.shop-buy-btn {
    padding: 7px 16px;
    border: none;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.shop-buy-btn:hover { opacity: 0.85; }
.shop-buy-btn:disabled {
    background: #333;
    cursor: not-allowed;
    opacity: 0.5;
}

.shop-owned-badge {
    font-size: 0.75rem;
    color: #4ade80;
    font-weight: 700;
}

.robot-panel {
    background: rgba(99,102,241,0.08);
    border: 1px solid rgba(99,102,241,0.25);
    border-radius: 12px;
    padding: 14px;
    margin-top: 8px;
    width: 100%;
}

.robot-panel-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.robot-toggle-btn {
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid #ef4444;
    background: rgba(239,68,68,0.15);
    color: #ef4444;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.robot-toggle-btn.active {
    border-color: #4ade80;
    background: rgba(74,222,128,0.15);
    color: #4ade80;
}
.robot-strategy-info {
    font-size: 0.72rem;
    color: #888;
    margin-bottom: 10px;
    padding: 4px 8px;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
}

.robot-panel-label {
    font-size: 0.75rem;
    color: #888;
    font-weight: 600;
    margin-bottom: 4px;
}

.robot-panel-val {
    font-size: 1rem;
    font-weight: 700;
}

.robot-pos-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    padding: 3px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.robot-log-list {
    max-height: 160px;
    overflow-y: auto;
    margin-top: 4px;
}

.robot-log-item {
    font-size: 0.72rem;
    color: #ccc;
    padding: 3px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    line-height: 1.4;
}

/* ==================== Donation Section ==================== */
.donation-section {
    margin: 16px 0 8px;
    padding: 16px;
    background: rgba(251,191,36,0.07);
    border: 1px solid rgba(251,191,36,0.25);
    border-radius: 14px;
}
.donation-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fbbf24;
}
.donation-trust-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.donation-trust-label { font-size: 0.8rem; color: #aaa; }
.donation-trust-val { font-size: 0.85rem; font-weight: 700; color: #fbbf24; }
.donation-trust-bar-wrap {
    background: rgba(255,255,255,0.08);
    border-radius: 6px;
    height: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}
.donation-trust-bar {
    height: 100%;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: 6px;
    transition: width 0.4s ease;
}
.donation-effects {
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 10px;
}
.donation-effect-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    padding: 3px 0;
    color: #ccc;
}
.donation-warn {
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.4);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.78rem;
    color: #ef4444;
    font-weight: 600;
    margin-bottom: 8px;
}
.donation-note {
    font-size: 0.72rem;
    color: #f87171;
    margin-bottom: 10px;
}
.donation-btns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}
.donation-btn {
    background: rgba(251,191,36,0.15);
    border: 1px solid rgba(251,191,36,0.35);
    color: #fbbf24;
    border-radius: 8px;
    padding: 8px 4px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.4;
    transition: background 0.15s;
}
.donation-btn:hover { background: rgba(251,191,36,0.28); }
.donation-btn small { font-size: 0.68rem; color: #a3e635; font-weight: 500; }
.donation-custom-row {
    display: flex;
    gap: 8px;
}
.donation-custom-input {
    flex: 1;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(251,191,36,0.3);
    border-radius: 8px;
    padding: 8px 10px;
    color: #fff;
    font-size: 0.85rem;
}
.donation-custom-input::placeholder { color: #888; }
.donation-custom-btn {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    color: #1a1a1a;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.donation-support {
    margin-top: 12px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(96, 165, 250, 0.32);
    background: rgba(59, 130, 246, 0.10);
}

.donation-support-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: #93c5fd;
    margin-bottom: 4px;
}

.donation-support-desc {
    font-size: 0.72rem;
    color: #bfdbfe;
    margin-bottom: 8px;
}

.donation-support-btn {
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    color: #0f172a;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

.donation-support-btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.donation-focus {
    animation: donationFocusPulse 1.1s ease;
}

@keyframes donationFocusPulse {
    0% { box-shadow: 0 0 0 0 rgba(96,165,250,0.0); }
    35% { box-shadow: 0 0 0 9px rgba(96,165,250,0.22); }
    100% { box-shadow: 0 0 0 0 rgba(96,165,250,0.0); }
}

/* ==================== Playzone Hub ==================== */

.playzone-hub {
    width: 100%;
    margin-top: 20px;
}

.menu-btn.btn-park {
    background: linear-gradient(135deg, #7c2d12, #c2410c);
}

.menu-btn.btn-park:hover {
    background: linear-gradient(135deg, #c2410c, #ea580c);
}

/* ==================== 3D Park (1인칭 전체화면) ==================== */

/* park-screen이 활성화되면 header를 숨기고 content 꽉 채우기 */
#park-screen.active {
    padding: 0;
}

#park-screen.active .screen-header {
    display: none;
}

#park-screen.active #park-content {
    width: 100%;
    height: 100vh;
}

/* 전체화면 3D 래퍼 */
.park-fs-wrapper {
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 200;
    overflow: hidden;
}

#park-3d-mount {
    width: 100%;
    height: 100%;
}

#park-3d-mount canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* HUD - 상단 */
.park-hud {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    align-items: center;
    pointer-events: none;
    z-index: 210;
}

.park-hud-coins {
    background: rgba(0,0,0,0.7);
    padding: 7px 18px;
    border-radius: 24px;
    font-size: 1rem;
    font-weight: 700;
    color: #facc15;
    backdrop-filter: blur(4px);
}

.park-hud-msg {
    background: rgba(0,0,0,0.7);
    padding: 7px 18px;
    border-radius: 24px;
    font-size: 0.9rem;
    color: #4ade80;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.3s;
    backdrop-filter: blur(4px);
}

.park-hud-msg.show { opacity: 1; }

/* 놀이기구 순간이동 패널 */
.park-tp-panel {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 220;
    pointer-events: auto;
}
.park-tp-btn {
    background: rgba(0,0,0,0.65);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}
.park-tp-btn:hover {
    background: rgba(59, 130, 246, 0.7);
    transform: scale(1.05);
    border-color: rgba(255,255,255,0.6);
}
.park-tp-btn:active {
    transform: scale(0.95);
}

/* 조준점 */
.park-crosshair {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.4rem;
    color: rgba(255,255,255,0.8);
    pointer-events: none;
    z-index: 210;
    text-shadow: 0 0 4px #000;
    line-height: 1;
}

/* 탑승 프롬프트 */
.park-interact {
    position: absolute;
    bottom: 28%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.72);
    border: 1.5px solid rgba(255,255,255,0.25);
    color: #fff;
    padding: 10px 28px;
    border-radius: 24px;
    font-size: 1rem;
    font-weight: 700;
    z-index: 210;
    backdrop-filter: blur(4px);
    white-space: nowrap;
    align-items: center;
    justify-content: center;
}

/* 클릭 안내 */
.park-lock-hint {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.78);
    color: #fff;
    padding: 18px 36px;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    z-index: 220;
    text-align: center;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 하단 오버레이 바 (뒤로가기 + 힌트) */
.park-overlay-bar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.5));
    z-index: 210;
    pointer-events: none;
}

.park-overlay-back {
    pointer-events: all;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(4px);
}

.park-overlay-back:hover { background: rgba(255,255,255,0.15); }

.park-overlay-hint {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.55);
    pointer-events: none;
}

/* 모바일 조이스틱 영역 */
.park-joystick-zone {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50%;
    height: 45%;
    z-index: 205;
    touch-action: none;
}

.park-joy-look {
    left: 50%;
}

@media (hover: hover) {
    /* 마우스 환경에서는 조이스틱 숨김 */
    .park-joystick-zone { display: none; }
    .wp-joystick-zone { display: none; }
}

/* ======== 워터파크 ======== */
.wp-fs-wrapper {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: #000;
    z-index: 200;
    overflow: hidden;
}
#wp-3d-mount { width: 100%; height: 100%; }
#wp-3d-mount canvas { display: block; width: 100% !important; height: 100% !important; }

.wp-hud {
    position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 12px; align-items: center; pointer-events: none; z-index: 210;
}
.wp-hud-coins {
    background: rgba(0,0,0,0.7); padding: 7px 18px; border-radius: 24px;
    font-size: 1rem; font-weight: 700; color: #38bdf8; backdrop-filter: blur(4px);
}
.wp-hud-msg {
    background: rgba(0,0,0,0.7); padding: 7px 18px; border-radius: 24px;
    font-size: 0.9rem; color: #22d3ee; font-weight: 700; opacity: 0;
    transition: opacity 0.3s; backdrop-filter: blur(4px);
}
.wp-hud-msg.show { opacity: 1; }

.wp-tp-panel {
    position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 6px; z-index: 220; pointer-events: auto;
}
.wp-tp-btn {
    background: rgba(0,80,140,0.7); color: #fff; border: 1px solid rgba(56,189,248,0.5);
    border-radius: 8px; padding: 6px 10px; font-size: 0.75rem; cursor: pointer;
    transition: background 0.2s, transform 0.1s; white-space: nowrap; backdrop-filter: blur(4px);
}
.wp-tp-btn:hover { background: rgba(14,165,233,0.8); transform: scale(1.05); }
.wp-tp-btn:active { transform: scale(0.95); }

.wp-crosshair {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-size: 1.4rem; color: rgba(255,255,255,0.8); pointer-events: none;
    z-index: 210; text-shadow: 0 0 4px #000; line-height: 1;
}
.wp-interact {
    position: absolute; bottom: 28%; left: 50%; transform: translateX(-50%);
    background: rgba(0,50,100,0.75); border: 1.5px solid rgba(56,189,248,0.4);
    color: #fff; padding: 10px 28px; border-radius: 24px; font-size: 1rem;
    font-weight: 700; z-index: 210; backdrop-filter: blur(4px); white-space: nowrap;
    align-items: center; justify-content: center;
}
.wp-lock-hint {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: rgba(0,50,100,0.8); color: #fff; padding: 18px 36px; border-radius: 16px;
    font-size: 1.1rem; font-weight: 700; z-index: 220; text-align: center;
    backdrop-filter: blur(6px); border: 1px solid rgba(56,189,248,0.3);
    display: flex; align-items: center; gap: 10px;
}
.wp-overlay-bar {
    position: absolute; bottom: 0; left: 0; right: 0;
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 16px; background: linear-gradient(transparent, rgba(0,30,60,0.6));
    z-index: 210; pointer-events: none;
}
.wp-overlay-back {
    pointer-events: all; background: rgba(0,50,100,0.7);
    border: 1px solid rgba(56,189,248,0.3); color: #fff; padding: 8px 16px;
    border-radius: 10px; font-size: 0.85rem; font-weight: 700; cursor: pointer;
    backdrop-filter: blur(4px);
}
.wp-overlay-back:hover { background: rgba(14,165,233,0.4); }
.wp-overlay-hint { font-size: 0.72rem; color: rgba(200,230,255,0.55); pointer-events: none; }

.wp-joystick-zone {
    position: absolute; bottom: 0; left: 0; width: 50%; height: 45%;
    z-index: 205; touch-action: none;
}
.wp-joy-look { left: 50%; }

.btn-waterpark { background: linear-gradient(135deg, #0ea5e9, #0284c7) !important; }
