/* FinKidsGo Gamified Anime & Cartoon Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
    --bg-dark: #161320; /* Playful deep purple-black */
    --bg-card: #252033; /* Thick cartoon card background */
    --border-glass: rgba(255, 255, 255, 0.05);
    --border-color: #231f2d; /* Dark border color for fallback */
    
    --primary: #ff5b83; /* Magical anime pink */
    --secondary: #4382ff; /* Vibrant game blue */
    --success: #05d083; /* Slime green */
    --warning: #ffb703; /* Star gold */
    --danger: #ff4757; /* Tomato red */
    
    --text-main: #ffffff;
    --text-muted: #8e8aa0;
    --font-heading: 'Fredoka', sans-serif;
    --font-body: 'Nunito', sans-serif;
    
    --border-cartoon: 3.5px solid #231f2d; /* Cute thick comic border */
    --progress-track: #231f2d; /* Allowance & Tamagotchi scale background */
    --shadow-pop: none; /* Classic neo-pop offset shadow */
    --shadow-pop-sm: none;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 15% 15%, rgba(255, 91, 131, 0.12) 0px, transparent 45%),
        radial-gradient(at 85% 85%, rgba(67, 130, 255, 0.1) 0px, transparent 45%),
        radial-gradient(at 50% 50%, rgba(5, 208, 131, 0.04) 0px, transparent 60%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    padding: 10px;
    display: flex;
    justify-content: center;
}

/* App Wrapper */
.app-container {
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 85px; /* Sticky footer space */
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Dev switcher */
.dev-switcher {
    display: flex;
    gap: 6px;
    background: rgba(11, 15, 26, 0.8);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 4px;
}
.dev-switcher button {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}
.dev-switcher button.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.25);
}

/* Game Card Panels */
.glass-panel {
    background: var(--bg-card);
    border: var(--border-cartoon);
    border-radius: 28px;
    padding: 18px;
    box-shadow: var(--shadow-pop);
    position: relative;
    overflow: visible; /* Support absolute speech bubble overflows */
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}

/* Header & Balance Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #2b243c, #1f1a2c);
    border: var(--border-cartoon);
    box-shadow: var(--shadow-pop);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    border: 2px solid #231f2d;
    box-shadow: none;
}

.user-meta h3 {
    font-size: 15px;
    font-weight: 800;
}
.user-meta .role-badge {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 1px 5px;
    border-radius: 4px;
}

.balance-card {
    text-align: right;
}
.balance-label {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.balance-value {
    font-size: 24px;
    font-weight: 900;
    color: var(--warning);
    display: flex;
    align-items: center;
    gap: 4px;
    text-shadow: none;
}

/* GAMIFIED WEALTH ROAD (Карта Богатства) */
.wealth-road-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wealth-road-title {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
}
.wealth-road-title span {
    white-space: nowrap;
}
.wealth-road-title span.active-status {
    color: var(--success);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
    white-space: nowrap;
}
.wealth-road-title span.active-status.inactive {
    color: var(--text-muted) !important;
    text-shadow: none !important;
}

/* The Horizontal Road Map */
.wealth-road-map {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 15px 5px;
    margin: 4px 0;
    transition: opacity 0.4s, filter 0.4s;
}
.wealth-road-map.inactive {
    opacity: 0.35;
    filter: grayscale(1);
    pointer-events: none;
}

.wealth-road-line {
    position: absolute;
    left: 5%;
    right: 5%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    z-index: 1;
}

.wealth-road-line-fill {
    position: absolute;
    left: 5%;
    height: 6px;
    background: linear-gradient(90deg, var(--danger), var(--warning), var(--success), #38bdf8);
    width: 0%;
    border-radius: 3px;
    z-index: 2;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: none;
}

.wealth-node {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #111827;
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 3;
    position: relative;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wealth-node.passed {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.15);
    box-shadow: none;
}

.wealth-node.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    transform: scale(1.2);
    box-shadow: none;
}

.wealth-node-tooltip {
    position: absolute;
    bottom: -22px;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}

.wealth-node.active .wealth-node-tooltip {
    color: #fff;
}

/* Interactive Pulsing Piggy Bank */
.piggy-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0 12px 0;
}

.pulsing-piggy {
    font-size: 58px;
    cursor: pointer;
    user-select: none;
    transform: scale(calc(1 + var(--pig-scale, 0)));
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: none;
    animation: idle-float 3s ease-in-out infinite;
}

@keyframes idle-float {
    0%, 100% { transform: translateY(0) scale(calc(1 + var(--pig-scale, 0))); }
    50% { transform: translateY(-8px) scale(calc(1 + var(--pig-scale, 0))); }
}

.pulsing-piggy.saving-glow {
    filter: none;
}

/* TYCOON ASSETS GRID */
.tycoon-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tycoon-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.25s ease;
    gap: 12px;
}

.tycoon-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(99, 102, 241, 0.2);
}

/* Challenge Shop Card Styles */
.challenge-shop-card {
    display: flex;
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px;
    padding: 14px;
}

.challenge-shop-body {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.challenge-shop-body .tycoon-visual {
    flex-shrink: 0;
    align-self: flex-start;
}

.challenge-shop-body .tycoon-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.challenge-shop-body .tycoon-title {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.35;
}

.challenge-shop-body .tycoon-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

.challenge-shop-body .tycoon-duration {
    font-size: 9px;
    font-weight: 700;
    color: var(--primary);
    margin-top: 2px;
}

.challenge-shop-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed rgba(255, 255, 255, 0.06);
    padding-top: 10px;
    gap: 10px;
}

.challenge-shop-pricing {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 10.5px;
    font-weight: 800;
}

.challenge-shop-pricing .price-pledge {
    color: var(--danger);
    white-space: nowrap;
}

.challenge-shop-pricing .price-reward {
    color: var(--success);
    white-space: nowrap;
}

.challenge-shop-footer .tycoon-upgrade-btn {
    background: linear-gradient(135deg, var(--primary), #ec4899);
    cursor: pointer;
    padding: 8px 16px;
    font-size: 11.5px;
    font-weight: 800;
    border-radius: 12px;
    border: none;
    color: #fff;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.challenge-shop-footer .tycoon-upgrade-btn:hover {
    transform: translateY(-1px);
}

.tycoon-visual {
    font-size: 34px;
    background: rgba(255, 255, 255, 0.03);
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tycoon-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tycoon-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tycoon-title {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}

.tycoon-level-badge {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: #c084fc;
    font-size: 9px;
    font-weight: 900;
    padding: 1px 5px;
    border-radius: 4px;
    text-transform: uppercase;
}

.tycoon-income-tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--success);
}

.tycoon-upgrade-btn {
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tycoon-upgrade-btn:hover {
    transform: translateY(-1px);
    box-shadow: none;
}

.tycoon-upgrade-btn:active {
    transform: translateY(1px);
}

/* GAMIFIED QUESTS (Chores List) */
.quest-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    border-left: 4px solid var(--primary);
}

.quest-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.quest-title-block {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quest-icon {
    font-size: 24px;
}

.quest-title {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}

.quest-reward {
    font-size: 12px;
    font-weight: 900;
    color: var(--warning);
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    padding: 2px 8px;
    border-radius: 8px;
    white-space: nowrap;
}

.quest-action-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.2s ease;
    align-self: flex-end;
}

.quest-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: none;
}

/* Gamified Buttons and Forms */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    padding: 12px 18px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.07);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 6, 12, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.modal-content {
    background: #0f1322;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
    border-radius: 28px;
    width: 100%;
    max-width: 380px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: calc(100% - 40px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: gameModalSlide 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-content h3 {
    margin: 0;
}

.modal-content p {
    margin: 0;
    line-height: 1.4;
}

@keyframes gameModalSlide {
    from { opacity: 0; transform: scale(0.9) translateY(15px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Simple list values tags */
.status-pill {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 6px;
}
.status-pill.pending { background: rgba(245, 158, 11, 0.15); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); }
.status-pill.completed { background: rgba(99, 102, 241, 0.15); color: var(--primary); border: 1px solid rgba(99, 102, 241, 0.2); }
.status-pill.approved { background: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.2); }
.status-pill.rejected { background: rgba(244, 63, 94, 0.15); color: var(--danger); border: 1px solid rgba(244, 63, 94, 0.2); }

/* Sticky footer navigation */
.sticky-tabs {
    position: fixed;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-width: 400px;
    background: linear-gradient(135deg, rgba(37, 32, 51, 0.8), rgba(24, 20, 34, 0.88));
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1.5px solid #231f2d !important;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 3px 0 var(--primary), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: space-around;
    padding: 5px 3px;
    gap: 4px;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 9px;
    font-weight: 800;
    cursor: pointer;
    flex: 1;
    padding: 6px 4px;
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.tab-btn i {
    font-size: 19px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    transform: translateY(-1px);
}

.tab-btn.active {
    color: var(--primary);
    transform: translateY(-2px) scale(1.02);
    background: rgba(255, 91, 131, 0.1);
    box-shadow: inset 0 1px 3px rgba(255, 91, 131, 0.05);
}

.tab-btn.active i {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 4px rgba(168, 85, 247, 0.25));
    transform: scale(1.05);
}

/* Parent Cabinet premium tabs */
.parent-tabs-deck {
    display: flex;
    gap: 8px;
    padding: 6px;
    border-radius: 20px;
    margin-bottom: 6px;
    border: 3px solid #231f2d !important;
    background: linear-gradient(135deg, rgba(37, 32, 51, 0.78), rgba(24, 20, 34, 0.85)) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

body.light-theme .parent-tabs-deck {
    background: #ffffff !important;
    border: none !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06) !important;
}

/* Child Cabinet tabs, styled like parent tabs deck */
.child-tabs-deck {
    display: flex;
    gap: 8px;
    padding: 6px;
    border-radius: 20px;
    margin-bottom: 6px;
    border: 3px solid #231f2d !important;
    background: linear-gradient(135deg, rgba(37, 32, 51, 0.78), rgba(24, 20, 34, 0.85)) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

body.light-theme .child-tabs-deck {
    background: #ffffff !important;
    border: none !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06) !important;
}

.child-tabs-deck .tab-btn {
    position: relative;
    flex: 1;
    padding: 8px 4px;
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 800;
    border-radius: 14px;
    border: 2.5px solid #231f2d !important;
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none !important;
}

.child-tabs-deck .tab-btn i {
    font-size: 16px;
}

.child-tabs-deck .tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.child-tabs-deck .tab-btn.active {
    background: linear-gradient(135deg, var(--primary), #4f46e5) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(255, 91, 131, 0.35) !important;
}

.child-tabs-deck .tab-btn.active i {
    background: none !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: #ffffff !important;
    color: #ffffff !important;
}

body.light-theme .child-tabs-deck .tab-btn {
    border: none !important;
    background: #f1f5f9;
    color: var(--text-muted);
    box-shadow: none !important;
}

body.light-theme .child-tabs-deck .tab-btn.active {
    background: linear-gradient(135deg, var(--primary), #4f46e5) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(255, 91, 131, 0.25) !important;
}

.parent-tab-btn {
    position: relative;
    flex: 1;
    padding: 10px 4px;
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 800;
    border-radius: 14px;
    border: 2.5px solid #231f2d !important;
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    box-shadow: none !important;
}

.tab-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, var(--danger), #be123c);
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    min-width: 17px;
    height: 17px;
    padding: 0 3px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #231f2d;
    box-shadow: 0 3px 6px rgba(220, 38, 38, 0.45);
    font-family: var(--font-heading);
    z-index: 10;
}

body.light-theme .parent-tab-btn {
    background: #f1f5f9 !important;
    border: none !important;
    color: var(--text-muted) !important;
    box-shadow: none !important;
}

body.light-theme .parent-tab-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(255, 91, 131, 0.15) !important;
}

body.light-theme .tab-badge {
    border: none !important;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.2) !important;
}

.parent-tab-btn:hover:not(.active) {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

body.light-theme .parent-tab-btn:hover:not(.active) {
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

.tab-content {
    display: none;
}
.tab-content.active {
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: gameFadeIn 0.3s ease-out;
}

@keyframes gameFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* History logs */
.tx-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 180px;
    overflow-y: auto;
}
.tx-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255,255,255,0.01);
    border: 1px solid rgba(255,255,255,0.02);
}
.tx-desc { 
    color: #fff; 
    font-weight: 600; 
    flex: 1;
    min-width: 0;
    word-break: break-word;
}
.tx-amount { 
    font-weight: 800; 
    white-space: nowrap;
    flex-shrink: 0;
}
.tx-plus { color: var(--success); }
.tx-minus { color: var(--danger); }

/* LIGHT THEME STYLES */
body.light-theme {
    --bg-dark: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.85);
    --border-glass: rgba(15, 23, 42, 0.08);
    --border-glow: rgba(99, 102, 241, 0.15);
    --text-main: #0f172a;
    --text-muted: #64748b;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.1) 0px, transparent 40%),
        radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.08) 0px, transparent 40%),
        radial-gradient(at 50% 0%, rgba(16, 185, 129, 0.04) 0px, transparent 50%);
}

body.light-theme .glass-panel::after {
    background: linear-gradient(90deg, transparent, rgba(15, 23, 42, 0.04), transparent);
}

body.light-theme .dev-switcher {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(15, 23, 42, 0.1);
}

body.light-theme .dev-switcher button {
    color: #64748b;
}

body.light-theme .dev-switcher button.active {
    color: #fff;
}

body.light-theme .dashboard-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(241, 245, 249, 0.95));
    border-color: rgba(99, 102, 241, 0.2);
}

body.light-theme .wealth-road-line {
    background: rgba(15, 23, 42, 0.08);
}

body.light-theme .wealth-node {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.12);
}

body.light-theme .wealth-node.passed {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--success);
}

body.light-theme .wealth-node.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: var(--primary);
}

body.light-theme .wealth-node-tooltip {
    color: #64748b;
}

body.light-theme .wealth-node.active .wealth-node-tooltip {
    color: #0f172a;
}

body.light-theme .tycoon-card {
    background: rgba(15, 23, 42, 0.02);
    border-color: rgba(15, 23, 42, 0.06);
}

body.light-theme .tycoon-card:hover {
    background: rgba(15, 23, 42, 0.04);
}

body.light-theme .tycoon-visual {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.06);
}

body.light-theme .tycoon-title {
    color: #0f172a;
}

body.light-theme .quest-card {
    background: rgba(15, 23, 42, 0.02);
    border-color: rgba(15, 23, 42, 0.06);
    border-left: 4px solid var(--primary);
}

body.light-theme .quest-title {
    color: #0f172a;
}

body.light-theme .input-glow {
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.15);
}

body.light-theme .input-glow:focus {
    border-color: var(--primary);
}

body.light-theme select.input-glow {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%233b82f6'><polygon points='0,30 100,30 50,80'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-size: 14px !important;
    background-position: calc(100% - 18px) center !important;
}
body.light-theme select.input-glow:focus {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%236366f1'><polygon points='0,80 100,80 50,30'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-size: 14px !important;
    background-position: calc(100% - 18px) center !important;
}
body.light-theme select.input-glow option {
    background: #ffffff;
    color: #0f172a;
}

body.light-theme .modal-content {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.15);
}

body.light-theme .tx-row {
    background: rgba(15, 23, 42, 0.01);
    border-color: rgba(15, 23, 42, 0.03);
}

body.light-theme .tx-desc {
    color: #0f172a;
}

body.light-theme .sticky-tabs {
    background: rgba(255, 255, 255, 0.9) !important;
    border: none !important;
    box-shadow: 0 8px 24px rgba(31, 41, 55, 0.08), 0 3px 0 var(--secondary) !important;
}

body.light-theme .tab-btn.active {
    background: rgba(255, 91, 131, 0.08);
}

body.light-theme .db-inspector {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(15, 23, 42, 0.1);
    color: #0f172a;
}

body.light-theme .db-inspector th {
    background: rgba(15, 23, 42, 0.04);
}

body.light-theme .db-inspector td, body.light-theme .db-inspector th {
    border-color: rgba(15, 23, 42, 0.08);
}

/* TAMAGOTCHI & VIRTUES BADGES VISUAL STYLE */
.tamagotchi-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.1));
    border: 1.5px solid rgba(168, 85, 247, 0.25);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.15), var(--shadow-game);
}

.tamagotchi-avatar-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.tamagotchi-character {
    font-size: 54px;
    user-select: none;
    animation: pet-float 3s ease-in-out infinite;
}

@keyframes pet-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-6px) scale(1.05); }
}

.tamagotchi-level-tag {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--secondary), #ec4899);
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.tamagotchi-info-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tamagotchi-name {
    font-family: var(--font-heading), sans-serif;
    font-size: 16px;
    font-weight: 900;
    color: #fff;
}

.tamagotchi-progress-track {
    height: 22px;
    background: #231f2d;
    border-radius: 8px;
    overflow: hidden;
    margin: 0;
    position: relative;
    border: 2.5px solid #231f2d;
    box-shadow: none;
}

.tamagotchi-scale-text {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    font-family: var(--font-heading), sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    pointer-events: none;
    z-index: 2;
    color: #ffffff;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.45);
    opacity: 0.6;
}

.tamagotchi-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), #ec4899);
    width: 30%;
    transition: width 0.5s ease;
}

/* BADGE VAULT (Витрина Достижений) */
.badge-vault-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 10px 4px;
    position: relative;
    transition: all 0.2s ease;
    cursor: help;
}

.badge-medal {
    font-size: 28px;
    filter: grayscale(1);
    opacity: 0.25;
    transition: all 0.3s ease;
}

.badge-item.unlocked {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.badge-item.unlocked .badge-medal {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.05);
    animation: medal-glow 2s infinite alternate;
}

@keyframes medal-glow {
    0% { filter: drop-shadow(0 0 2px rgba(16, 185, 129, 0.2)); }
    100% { filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.6)); }
}

.badge-title {
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 6px;
    text-align: center;
}

.badge-item.unlocked .badge-title {
    color: #fff;
}

.badge-level-tag {
    position: absolute;
    top: -6px;
    right: -4px;
    font-size: 8px;
    font-weight: 900;
    font-family: var(--font-heading);
    background: linear-gradient(135deg, var(--warning), #f97316);
    color: #231f2d;
    padding: 2px 6px;
    border-radius: 8px;
    border: 2px solid #231f2d;
    box-shadow: 1.5px 1.5px 0 #231f2d;
    transform: rotate(5deg);
    display: none;
    animation: bounce-level 0.3s ease-out;
}

@keyframes bounce-level {
    0% { transform: scale(0.3) rotate(0deg); }
    70% { transform: scale(1.1) rotate(10deg); }
    100% { transform: scale(1) rotate(5deg); }
}

/* CHARACTER PICKER MODAL GRID */
.char-picker-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 8px 0;
}

.char-picker-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 12px 6px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.char-picker-option:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
    transform: translateY(-2px);
}

.char-picker-option.selected {
    border-color: var(--secondary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.15));
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
}

/* ==========================================================================
   ANIME & RETRO CARTOON POP THEME DEFINITIONS
   ========================================================================== */

/* 1. Playful Cartoon Speech Bubble above Pet */
.tamagotchi-bubble {
    position: absolute;
    bottom: 100%;
    margin-bottom: 12px;
    left: -6px;
    background: #ffffff;
    color: #231f2d;
    border: 3px solid #231f2d;
    padding: 8px 12px;
    border-radius: 16px;
    font-size: 10px;
    font-weight: 800;
    white-space: normal;
    width: 220px;
    text-align: center;
    box-shadow: none;
    opacity: 1;
    transition: opacity 0.15s ease, transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
    animation: bubble-float-left 2.5s ease-in-out infinite;
    pointer-events: none;
}

.tamagotchi-bubble::after {
    content: '';
    position: absolute;
    bottom: -7px;
    left: 41px;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-right: 3px solid #231f2d;
    border-bottom: 3px solid #231f2d;
}

@keyframes bubble-float-left {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* 2. Squish & Bounce Tapping Animation for Pet */
.tapped-bounce {
    animation: tapped-bounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

@keyframes tapped-bounce {
    0%, 100% { transform: scale(1) translateY(0); }
    30% { transform: scale(0.7, 1.3) translateY(-12px); }
    60% { transform: scale(1.3, 0.7) translateY(8px); }
    80% { transform: scale(0.95, 1.05); }
}

/* 3. Inputs & Forms Pop Outlines */
.input-glow {
    background: #1e1b29;
    color: #ffffff;
    border: var(--border-cartoon);
    border-radius: 18px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--font-body);
    box-shadow: none;
    transition: all 0.15s ease;
    outline: none;
    width: 100%;
}

.input-glow:focus {
    border-color: var(--primary);
    background: #252033;
    box-shadow: none;
}

select.input-glow {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23ff5b83'><polygon points='0,30 100,30 50,80'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-size: 14px !important;
    background-position: calc(100% - 18px) center !important;
    padding-right: 42px !important;
    cursor: pointer;
    transition: all 0.2s ease;
}
select.input-glow:focus {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23a855f7'><polygon points='0,80 100,80 50,30'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-size: 14px !important;
    background-position: calc(100% - 18px) center !important;
}
select.input-glow option {
    background: #252033;
    color: #fff;
}

/* 4. Neon Pop Cartoon Buttons Overrides */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), #ec4899) !important;
    border: var(--border-cartoon) !important;
    border-radius: 20px !important;
    box-shadow: none !important;
    font-family: var(--font-heading) !important;
    font-weight: 800 !important;
    color: #fff !important;
    transition: all 0.1s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.btn-primary:hover {
    transform: none !important;
    box-shadow: none !important;
}

.btn-primary:active {
    transform: none !important;
    box-shadow: none !important;
}

.btn-secondary {
    background: #332d46 !important;
    border: var(--border-cartoon) !important;
    border-radius: 20px !important;
    box-shadow: none !important;
    font-family: var(--font-heading) !important;
    color: #fff !important;
    transition: all 0.1s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.btn-secondary:hover {
    background: #3c3552 !important;
    transform: none !important;
    box-shadow: none !important;
}

.btn-secondary:active {
    transform: none !important;
    box-shadow: none !important;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #e11d48) !important;
    border: var(--border-cartoon) !important;
    border-radius: 20px !important;
    box-shadow: none !important;
    font-family: var(--font-heading) !important;
    font-weight: 800 !important;
    color: #fff !important;
    transition: all 0.1s ease !important;
}
.btn-danger:hover {
    transform: none !important;
    box-shadow: none !important;
}
.btn-danger:active {
    transform: none !important;
    box-shadow: none !important;
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669) !important;
    border: var(--border-cartoon) !important;
    border-radius: 20px !important;
    box-shadow: none !important;
    font-family: var(--font-heading) !important;
    font-weight: 800 !important;
    color: #fff !important;
    transition: all 0.1s ease !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-success:hover {
    transform: none !important;
    box-shadow: none !important;
}
.btn-success:active {
    transform: none !important;
    box-shadow: none !important;
}

/* 5. Wealth Road Gamified Nodes Redesign */
.wealth-road-line {
    height: 14px !important;
    background: #231f2d !important;
    border: 2px solid #231f2d !important;
    border-radius: 8px !important;
}

.wealth-road-line-fill {
    height: 14px !important;
    background: linear-gradient(90deg, var(--danger), var(--warning), var(--success), var(--secondary)) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

.wealth-node {
    width: 44px !important;
    height: 44px !important;
    border: 3.5px solid #231f2d !important;
    box-shadow: none !important;
    border-radius: 14px !important; /* Playful squarish-round game node */
    font-size: 20px !important;
    background: #2e283e !important;
}

.wealth-node.passed {
    background: var(--success) !important;
    border-color: #231f2d !important;
}

.wealth-node.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    transform: scale(1.15) !important;
    box-shadow: none !important;
}

.wealth-node-tooltip {
    bottom: -24px !important;
    font-size: 9px !important;
    font-weight: 900 !important;
    color: var(--text-muted) !important;
}

/* 6. Tamagotchi Pet Companion & Cards Overrides */
.tamagotchi-card {
    background: linear-gradient(135deg, #322b46, #252033) !important;
    border: var(--border-cartoon) !important;
    box-shadow: none !important;
    border-radius: 28px !important;
}

.tamagotchi-avatar-wrapper {
    background: #ffeaef !important; /* Sweet pink pet background */
    border: 3.5px solid #231f2d !important;
    box-shadow: none !important;
    border-radius: 22px !important;
    width: 86px !important;
    height: 86px !important;
}

.tamagotchi-character {
    font-size: 60px !important;
}

.pulsing-piggy {
    font-size: 77px !important;
    filter: none !important;
}

/* 7. Quest, Assets & Passive Chores Cards */
.quest-card, .tycoon-card, .char-picker-option {
    background: #2c273c !important;
    border: var(--border-cartoon) !important;
    border-radius: 22px !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
}

.quest-card:hover, .tycoon-card:hover, .char-picker-option:hover {
    transform: none !important;
    box-shadow: none !important;
    background: #342e47 !important;
}

.char-picker-option.selected {
    background: linear-gradient(135deg, rgba(255, 91, 131, 0.2), rgba(67, 130, 255, 0.2)) !important;
    border-color: var(--primary) !important;
    box-shadow: none !important;
}

.tycoon-visual {
    background: #1e1b29 !important;
    border: 2px solid #231f2d !important;
    border-radius: 14px !important;
}

/* 8. Collector-Style Virtue Achievement Cards */
.badge-item {
    background: #201d2c !important;
    border: 2.5px solid #231f2d !important;
    border-radius: 18px !important;
    box-shadow: none !important;
    padding: 12px 6px !important;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.badge-item.unlocked {
    background: linear-gradient(135deg, rgba(5, 208, 131, 0.15), rgba(5, 208, 131, 0.05)) !important;
    border-color: var(--success) !important;
    box-shadow: none !important;
}

.badge-item.unlocked .badge-medal {
    filter: none !important;
    opacity: 1 !important;
    transform: scale(1.1) !important;
    animation: medal-bounce 2s infinite alternate !important;
}

@keyframes medal-bounce {
    0% { transform: scale(1.05) translateY(0); }
    100% { transform: scale(1.15) translateY(-3px); }
}

/* 9. Light Theme Anime-Pastel Dream Overrides */
body.light-theme {
    --bg-dark: #f8f9fb; /* 2. Слегка сероватый/лавандовый фон приложения */
    --bg-card: #ffffff; /* 2. Карточки - чисто белые */
    --text-main: #334155; /* 4. Текст - темно-серый (slate-700) */
    --text-muted: #64748b; /* slate-500 */
    --border-color: transparent;
    --border-cartoon: none;
    --progress-track: #e5e7eb; /* 3. Подложка шкал - светло-серая */
    background-image: 
        radial-gradient(at 15% 15%, rgba(255, 91, 131, 0.03) 0px, transparent 45%),
        radial-gradient(at 85% 85%, rgba(67, 130, 255, 0.03) 0px, transparent 45%),
        radial-gradient(at 50% 50%, rgba(5, 208, 131, 0.02) 0px, transparent 60%) !important;
}

/* 1. Убираем черные обводки и добавляем мягкие тени */
body.light-theme .glass-panel,
body.light-theme .dashboard-header,
body.light-theme .quest-card,
body.light-theme .tycoon-card,
body.light-theme .char-picker-option,
body.light-theme .badge-item,
body.light-theme .modal-content,
body.light-theme .goal-card,
body.light-theme .goal-empty-card,
body.light-theme .list-item,
body.light-theme .child-card-parent-view {
    background: #ffffff !important;
    border: none !important;
    box-shadow: 0 8px 24px rgba(31, 41, 55, 0.06), 0 2px 8px rgba(31, 41, 55, 0.04) !important;
}

body.light-theme .quest-card:hover, 
body.light-theme .tycoon-card:hover, 
body.light-theme .char-picker-option:hover {
    background: #fbfbfb !important;
    box-shadow: 0 12px 28px rgba(31, 41, 55, 0.08), 0 4px 10px rgba(31, 41, 55, 0.05) !important;
}

body.light-theme .char-picker-option.selected {
    background: linear-gradient(135deg, #e0e7ff, #f3e8ff) !important;
    border: 2.5px solid var(--secondary) !important;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.2) !important;
}

/* Стили полей ввода */
body.light-theme .input-glow {
    background: #ffffff !important;
    color: var(--text-main) !important;
    border: 1.5px solid #e2e8f0 !important;
    box-shadow: none !important;
}

body.light-theme .input-glow:focus {
    background: #ffffff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(255, 91, 131, 0.1) !important;
}

/* Стили кнопок (убираем черную рамку, добавляем тень) */
body.light-theme .btn-primary,
body.light-theme .btn-secondary,
body.light-theme .btn-danger,
body.light-theme .btn-success,
body.light-theme button,
body.light-theme .quest-action-btn,
body.light-theme .avatar-option-btn {
    border: none !important;
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.08) !important;
}

body.light-theme .btn-secondary {
    background: #f1f5f9 !important;
    color: var(--text-main) !important;
}
body.light-theme .btn-secondary:hover {
    background: #e2e8f0 !important;
}

body.light-theme .tycoon-visual {
    background: #f8f9fb !important;
    border: none !important;
}

body.light-theme .badge-item {
    background: #ffffff !important;
    border: none !important;
}

body.light-theme .badge-item.unlocked {
    background: #f0fff4 !important;
    border-color: transparent !important;
    box-shadow: 0 8px 24px rgba(5, 208, 131, 0.08) !important;
}

body.light-theme .tab-btn.active {
    color: var(--primary) !important;
}

body.light-theme .tx-row {
    background: #ffffff !important;
    border: none !important;
    color: var(--text-main) !important;
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.03) !important;
}

body.light-theme .tx-desc {
    color: var(--text-main) !important;
}

body.light-theme .dev-switcher {
    background: #f1f5f9 !important;
    border: none !important;
    box-shadow: none !important;
}
body.light-theme .dev-switcher button {
    color: #64748b !important;
}
body.light-theme .dev-switcher button.active {
    background: #ffffff !important;
    color: var(--text-main) !important;
    box-shadow: 0 4px 10px rgba(31, 41, 55, 0.08) !important;
}

/* 3. Подложки шкал прогресса */
body.light-theme .goal-progress-track,
body.light-theme .allowance-progress-track,
body.light-theme .tamagotchi-progress-track {
    background: #e2e8f0 !important;
    border: none !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .tamagotchi-scale-text {
    color: #231f2d !important;
    text-shadow: none !important;
}
body.light-theme .goal-cost {
    background: #f1f5f9 !important;
    border: none !important;
    color: var(--warning) !important;
}
body.light-theme .user-avatar {
    border: none !important;
    box-shadow: 0 4px 10px rgba(31, 41, 55, 0.08) !important;
}
body.light-theme #allowanceCountdown {
    background: #e5e7eb !important;
    border: none !important;
    color: var(--text-main) !important;
}
body.light-theme #wizPairingCode {
    background: #e5e7eb !important;
    border: none !important;
    color: var(--secondary) !important;
}
body.light-theme .tamagotchi-avatar-wrapper,
body.light-theme .tamagotchi-card .tamagotchi-avatar-wrapper {
    background: #ffeaef !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(255, 91, 131, 0.15) !important;
}
body.light-theme #petSleepTimer {
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    color: #ea580c !important; /* High-contrast orange-600 */
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.06) !important;
}
body.light-theme .tamagotchi-bubble,
body.light-theme .tamagotchi-card .tamagotchi-bubble {
    border: none !important;
    background: #ffffff !important;
    color: var(--text-main) !important;
    box-shadow: 0 4px 16px rgba(31, 41, 55, 0.08) !important;
}
body.light-theme .tamagotchi-bubble::after,
body.light-theme .tamagotchi-card .tamagotchi-bubble::after {
    border: none !important;
    background: #ffffff !important;
}
body.light-theme .wealth-road-line {
    background: #e5e7eb !important;
    border: none !important;
}
body.light-theme .wealth-node {
    background: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.08) !important;
}
body.light-theme .wealth-node.passed {
    background: var(--success) !important;
    border: none !important;
}
body.light-theme .wealth-node.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    border: none !important;
}

/* Boardgame goal progress styling classes (Dark Mode Defaults) */
.goal-card {
    padding: 14px 16px;
    background: linear-gradient(135deg, #2d263f, #1e192b);
    border: var(--border-cartoon);
    box-shadow: none;
    border-radius: 28px;
    margin-bottom: 8px;
}

.goal-cost {
    background: #231f2d;
    color: var(--warning);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 900;
    border: 2px solid #231f2d;
    box-shadow: none;
}

.goal-progress-track {
    height: 22px;
    background: #231f2d;
    border-radius: 14px;
    border: 3px solid #231f2d;
    position: relative;
    margin: 12px 0;
    overflow: visible;
}

.goal-empty-card {
    padding: 22px 18px;
    background: rgba(0, 0, 0, 0.15);
    border: 2px dashed var(--text-muted);
    box-shadow: none;
    border-radius: 28px;
    text-align: center;
    margin-bottom: 8px;
}

/* 10. Wealth Node Character Token Style */
.wealth-node-pet-token {
    position: absolute;
    top: -24px;
    right: -12px;
    width: 26px;
    height: 26px;
    background: #ffffff;
    border: 2px solid #231f2d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    box-shadow: none;
    animation: token-bounce 1s infinite alternate;
    z-index: 15;
    pointer-events: none;
}

body.light-theme .wealth-node-pet-token {
    background: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.1) !important;
}

@keyframes token-bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-4px); }
}

/* 11. Bouncy Shake Wobble Animation for tapping */
.wobble-shake {
    animation: wobble-shake 0.4s ease !important;
}

@keyframes wobble-shake {
    0%, 100% { transform: rotate(0deg) scale(calc(1 + var(--pig-scale, 0))); }
    25% { transform: rotate(-6deg) scale(calc((1 + var(--pig-scale, 0)) * 0.95)); }
    75% { transform: rotate(6deg) scale(calc((1 + var(--pig-scale, 0)) * 0.95)); }
}

/* 12. Floating Pop Coin Indicators Styles */
.floating-pop-coin {
    position: absolute;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 900;
    color: var(--success);
    text-shadow: 
        -2px -2px 0 #231f2d,  
         2px -2px 0 #231f2d,
        -2px  2px 0 #231f2d,
         2px  2px 0 #231f2d; /* Cute cartoon outline */
    pointer-events: none;
    z-index: 2000;
    animation: float-bubble-up 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.floating-pop-coin.negative {
    color: var(--danger);
}

@keyframes float-bubble-up {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px) scale(1.2);
    }
}

/* 8. Goal Progress Track Pin bounce animation */
@keyframes pet-pin-bounce {
    0% {
        transform: translateY(0) scale(1) rotate(-3deg);
    }
    100% {
        transform: translateY(-8px) scale(1.15) rotate(3deg);
    }
}

.goal-progress-fill-vibrant {
    box-shadow: none;
}

/* 9. Piggy Skin Customizer Options */
.piggy-skin-option {
    font-size: 22px !important;
    padding: 4px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
.piggy-skin-option:hover {
    transform: scale(1.3) !important;
    filter: none !important;
}

/* 10. Interactive Guided Tour Highlight System */
body.light-theme .parent-tab-btn.active.guided-highlight,
body.light-theme .parent-tab-btn.guided-highlight,
body.light-theme .guided-highlight,
body .guided-highlight,
.guided-highlight {
    position: relative !important;
    z-index: 1200 !important;
    border-color: var(--secondary) !important;
    box-shadow: 0 0 25px var(--secondary), 0 0 0 9999px rgba(11, 15, 26, 0.85) !important;
    pointer-events: none !important;
    background: #2c273c !important; /* Ensure highlighted panel background is fully opaque */
    transition: all 0.3s ease !important;
    outline: 3px solid var(--secondary) !important;
    outline-offset: 2px !important;
}
body.light-theme .guided-highlight:not(.parent-tab-btn) {
    background: #ffffff !important;
}

/* Disable backdrop filters during active guided tour to prevent stacking context clipping of dimming shadows in Safari/WebKit */
body.guided-tour-active .child-tabs-deck,
body.guided-tour-active .parent-tabs-deck {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Responsive profile bar actions for narrow screens */
@media (max-width: 440px) {
    .profile-bar .btn-action span {
        display: none !important;
    }
    .profile-bar .btn-action {
        width: 32px !important;
        height: 32px !important;
        padding: 0 !important;
        justify-content: center !important;
    }
    .profile-bar #childName {
        max-width: 85px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Small secondary button with theme overrides */
.btn-secondary-sm {
    background: #332d46;
    border: 1.5px solid #231f2d;
    border-radius: 12px;
    color: var(--text-main);
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.2s ease;
}

.btn-secondary-sm:hover {
    background: #3c3552;
}

body.light-theme .btn-secondary-sm {
    background: #f1f5f9 !important;
    border: none !important;
    color: var(--text-main) !important;
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.08) !important;
}

/* Settings modal option rows and divider styles */
.settings-option-row {
    background: rgba(255, 255, 255, 0.03);
    border: 2.5px solid #231f2d;
    transition: background 0.2s ease, border-color 0.2s ease;
}

body.light-theme .settings-option-row {
    background: rgba(15, 23, 42, 0.03) !important;
    border: none !important;
}

.settings-divider {
    border-bottom: 2px solid #231f2d;
}

body.light-theme .settings-divider {
    border-bottom: 1.5px solid #e2e8f0 !important;
}

/* iOS styled toggle switch */
.ios-switch, .ios-switch *, .ios-switch *::before, .ios-switch *::after {
    box-sizing: border-box !important;
}

.ios-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.ios-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
}

.ios-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.05);
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 24px;
    border: 2px solid #231f2d !important;
}

body.light-theme .ios-slider {
    background-color: #e2e8f0;
    border: 2px solid #cbd5e1 !important;
}

.ios-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    top: 2px;
    background-color: white;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

body.light-theme .ios-slider:before {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    left: 2px;
    top: 2px;
}

.ios-switch input:checked + .ios-slider {
    background-color: #10b981; /* iOS green */
    border-color: #10b981 !important;
}

.ios-switch input:checked + .ios-slider:before {
    transform: translateX(20px);
}

body.light-theme .ios-switch input:checked + .ios-slider {
    background-color: #10b981;
    border-color: #10b981 !important;
}

body.light-theme .ios-switch input:checked + .ios-slider:before {
    transform: translateX(20px);
}

/* Treat cards grid for feeding modal */
.treat-card {
    background: #2c273c !important;
    border: var(--border-cartoon) !important;
    border-radius: 22px !important;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease !important;
    text-align: center;
    position: relative;
    user-select: none;
}
.treat-card:not(.disabled):hover {
    background: #342e47 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2) !important;
    border-color: #10b981 !important;
}
.treat-card.disabled {
    opacity: 0.35;
    filter: grayscale(100%);
    cursor: not-allowed;
    pointer-events: none;
}
.treat-emoji {
    font-size: 32px;
    margin-bottom: 4px;
    transition: transform 0.2s ease;
}
.treat-card:not(.disabled):hover .treat-emoji {
    transform: scale(1.15);
}
.treat-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}
.treat-value {
    font-size: 10px;
    font-weight: 800;
    color: var(--success);
    margin-top: 3px;
}

/* Light theme overrides for treat-card */
body.light-theme .treat-card {
    background: #ffffff !important;
    border: none !important;
    box-shadow: 0 8px 24px rgba(31, 41, 55, 0.06), 0 2px 8px rgba(31, 41, 55, 0.04) !important;
}
body.light-theme .treat-card:not(.disabled):hover {
    background: #fbfbfb !important;
    box-shadow: 0 12px 28px rgba(31, 41, 55, 0.08), 0 4px 10px rgba(31, 41, 55, 0.05) !important;
    border-color: #10b981 !important;
}

/* ====================================================
   PET MINI GAMES CSS
   ==================================================== */
.game-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 16px;
    border: 2.5px solid #231f2d;
    background: #252033;
    margin-bottom: 4px;
    transition: transform 0.2s, background-color 0.2s;
    user-select: none;
}
.game-menu-item.unlocked {
    cursor: pointer;
}
.game-menu-item.unlocked:hover {
    background: #2f2842;
    transform: translateY(-2px);
}
.game-menu-item.locked {
    opacity: 0.6;
    background: #1f1a2c;
    cursor: not-allowed;
}
.game-menu-icon {
    font-size: 20px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 91, 131, 0.08);
    border-radius: 12px;
    flex-shrink: 0;
}
.game-menu-details {
    flex: 1;
}
.game-menu-title {
    font-size: 12px;
    font-weight: 900;
    color: #fff;
    font-family: var(--font-heading), sans-serif;
    margin-bottom: 2px;
}
.game-menu-level-req {
    font-size: 9px;
    font-weight: 800;
}
.badge-unlocked {
    color: var(--success);
}
.badge-locked {
    color: var(--text-muted);
}
.btn-play-arrow {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1.5px solid #231f2d;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    padding: 0;
    box-shadow: none !important;
}
.btn-play-arrow.disabled {
    background: #475569;
    color: #94a3b8;
    border-color: #334155;
}

/* Tic-Tac-Toe Grid */
.ttt-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-width: 240px;
    margin: 10px auto;
}
.ttt-cell {
    aspect-ratio: 1;
    border-radius: 12px;
    border: 2.5px solid #231f2d;
    background: #2f2842;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    cursor: pointer;
    transition: background-color 0.1s, transform 0.1s;
    user-select: none;
}
.ttt-cell:not(.filled):hover {
    background: #3b3254;
    transform: scale(1.03);
}

/* Shell Game Grid */
.shells-grid-container {
    display: flex;
    justify-content: space-around;
    gap: 12px;
    margin: 20px 0;
    min-height: 80px;
}
.shell-cup-wrapper {
    position: relative;
    width: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.shell-cup {
    font-size: 48px;
    cursor: pointer;
    z-index: 5;
    position: relative;
    user-select: none;
    transform-origin: bottom;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.shell-cup.lifted {
    transform: translateY(-35px) rotate(15deg);
}
.shell-cup.shuffling {
    animation: cup-wobble 0.25s infinite alternate;
}
@keyframes cup-wobble {
    0% { transform: rotate(-5deg) translateX(-3px); }
    100% { transform: rotate(5deg) translateX(3px); }
}
.shell-coin {
    font-size: 28px;
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.shell-cup.lifted ~ .shell-coin {
    opacity: 1;
}
.shell-empty-shadow {
    position: absolute;
    bottom: 4px;
    width: 24px;
    height: 4px;
    background: rgba(0,0,0,0.15);
    border-radius: 50%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

/* Memory Match Grid */
.memo-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    max-width: 320px;
    margin: 10px auto;
}
.memo-card {
    aspect-ratio: 1;
    perspective: 1000px;
    cursor: pointer;
}
.memo-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.5s;
    transform-style: preserve-3d;
    border-radius: 12px;
    border: 2.2px solid #231f2d;
    background: #2f2842;
}
.memo-card.flipped .memo-card-inner {
    transform: rotateY(180deg);
}
.memo-card-front, .memo-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    border-radius: 10px;
}
.memo-card-front {
    background: #252033;
    color: #a78bfa;
    font-size: 16px;
    font-weight: 800;
}
.memo-card-back {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    transform: rotateY(180deg);
}
.memo-card.matched .memo-card-inner {
    background: linear-gradient(135deg, var(--success), #10b981) !important;
    border-color: #047857;
}

/* Uno Cards Layout */
.uno-hand-container {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 6px;
    min-height: 70px;
}
.uno-card {
    width: 44px;
    height: 64px;
    border-radius: 8px;
    border: 2.2px solid #231f2d;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-family: var(--font-heading), sans-serif;
    font-weight: 900;
    font-size: 14px;
    text-shadow: 1px 1px 0px rgba(0,0,0,0.4);
    user-select: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.uno-card.card-red {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: white;
}
.uno-card.card-green {
    background: linear-gradient(135deg, #10b981, #047857);
    color: white;
}
.uno-card.card-blue {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}
.uno-card.card-yellow {
    background: linear-gradient(135deg, #f59e0b, #b45309);
    color: white;
}
.uno-card.card-back {
    background: linear-gradient(135deg, #475569, #1e293b);
    color: #94a3b8;
    font-size: 20px;
    text-shadow: none;
    box-shadow: none !important;
}
.uno-card.playable {
    cursor: pointer;
    box-shadow: 0 0 10px var(--primary);
    transform: translateY(-4px);
}
.uno-card.playable:hover {
    transform: translateY(-6px) scale(1.05);
}
@keyframes uno-draw-attention {
    0% { transform: scale(1); box-shadow: 0 0 5px var(--warning); }
    100% { transform: scale(1.05); box-shadow: 0 0 15px var(--warning); }
}
button.uno-card.card-back.attention {
    animation: uno-draw-attention 0.8s ease-in-out infinite alternate;
}

/* Light Theme Overrides for Games */
body.light-theme .game-menu-item {
    background: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.04), 0 2px 4px rgba(31, 41, 55, 0.02) !important;
}
body.light-theme .game-menu-icon {
    background: #f1f5f9 !important;
}
body.light-theme .game-menu-item.unlocked:hover {
    background: #f8fafc !important;
}
body.light-theme .game-menu-item.locked {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
}
body.light-theme .game-menu-title {
    color: #231f2d !important;
}
body.light-theme .badge-locked {
    color: #64748b !important;
}
body.light-theme .btn-play-arrow {
    border-color: #cbd5e1 !important;
}
body.light-theme .btn-play-arrow.disabled {
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    border-color: #cbd5e1 !important;
}
body.light-theme .ttt-cell {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
}
body.light-theme .ttt-cell:not(.filled):hover {
    background: #f1f5f9 !important;
}
body.light-theme .memo-card-inner {
    border-color: #cbd5e1 !important;
    background: #f8fafc !important;
}
body.light-theme .memo-card-front {
    background: #f8fafc !important;
    color: #64748b !important;
}
body.light-theme .uno-card {
    border-color: #cbd5e1 !important;
}
body.light-theme .uno-card.card-back {
    background: linear-gradient(135deg, #cbd5e1, #94a3b8) !important;
    color: #475569 !important;
}

/* ----------------------------------------------------
   PET MINI-GAMES STYLING SYSTEM
   ---------------------------------------------------- */

/* Unified Game Area Panel */
.game-area-card {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 20px 14px 14px 14px;
    margin-bottom: 12px;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.02), 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}
body.light-theme .game-area-card {
    background: #f1f5f9 !important;
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}

/* Game Secondary Action Button (e.g. Close Game) */
.game-secondary-btn {
    width: auto;
    min-width: 120px;
    padding: 8px 20px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1.5px solid rgba(255, 91, 131, 0.2) !important;
    border-radius: 12px !important;
    color: var(--primary) !important;
    background: rgba(255, 91, 131, 0.02) !important;
    cursor: pointer;
    transition: all 0.2s ease;
    height: auto !important;
    box-shadow: none !important;
    margin: 0;
}
.game-secondary-btn:hover {
    background: rgba(255, 91, 131, 0.08) !important;
    border-color: var(--primary) !important;
    color: #ff85a2 !important;
    transform: translateY(-1.5px);
}
.game-secondary-btn:active {
    transform: translateY(0);
}

body.light-theme .game-secondary-btn {
    background: #ffffff !important;
    border: 1.5px solid rgba(255, 91, 131, 0.2) !important;
    color: var(--primary) !important;
}
body.light-theme .game-secondary-btn:hover {
    background: #fff5f7 !important;
    border-color: var(--primary) !important;
    color: #db2777 !important;
}

/* Game Title */
.game-area-title {
    font-family: var(--font-heading), sans-serif;
    font-size: 16px;
    font-weight: 900;
    color: var(--primary) !important;
    margin-top: 4px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-align: center;
}
body.light-theme .game-area-title {
    color: var(--primary) !important;
}

/* Games Map Unlock Hint */
.games-map-unlock-hint {
    font-size: 10px;
    color: var(--warning);
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 12px;
    text-align: center;
}
body.light-theme .games-map-unlock-hint {
    color: var(--primary) !important;
}

/* RPS Choice Buttons */
.rps-choice-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 8px;
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.rps-choice-btn .choice-emoji {
    font-size: 38px;
    line-height: 1;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.rps-choice-btn .choice-label {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    transition: color 0.2s ease;
}
.rps-choice-btn:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(255, 91, 131, 0.2);
}
.rps-choice-btn:hover .choice-emoji {
    transform: scale(1.16) translateY(-4px);
}
.rps-choice-btn:hover .choice-label {
    color: #ff85a2;
}
.rps-choice-btn:active {
    transform: translateY(-1px) scale(0.97);
    box-shadow: 0 2px 6px rgba(255, 91, 131, 0.15);
}

body.light-theme .rps-choice-btn {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.04), 0 2px 4px rgba(31, 41, 55, 0.02) !important;
}
body.light-theme .rps-choice-btn .choice-label {
    color: #475569 !important;
}
body.light-theme .rps-choice-btn:hover {
    background: #ffffff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 8px 20px rgba(255, 91, 131, 0.12) !important;
}
body.light-theme .rps-choice-btn:hover .choice-label {
    color: var(--primary) !important;
}

/* VS Result Screen styling */
.rps-vs-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}
.rps-vs-player-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
}
.rps-vs-player-label {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.rps-vs-circle {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}
.rps-vs-circle span {
    font-size: 38px;
    line-height: 1;
}

.rps-vs-divider {
    font-size: 11px;
    font-weight: 900;
    color: #a78bfa;
    background: rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.25);
    padding: 4px 10px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(167, 139, 250, 0.1);
}
body.light-theme .rps-vs-divider {
    color: #6d28d9;
    background: rgba(109, 40, 217, 0.08);
    border-color: rgba(109, 40, 217, 0.2);
}

.rps-vs-circle.winner {
    border-color: var(--success) !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4) !important;
    transform: scale(1.08);
    background: rgba(16, 185, 129, 0.06);
}
.rps-vs-circle.loser {
    border-color: rgba(255, 255, 255, 0.03) !important;
    opacity: 0.4;
    transform: scale(0.88);
}
.rps-vs-circle.draw {
    border-color: var(--warning) !important;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.25) !important;
    background: rgba(245, 158, 11, 0.04);
}

body.light-theme .rps-vs-circle {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03) !important;
}
body.light-theme .rps-vs-circle.winner {
    background: rgba(16, 185, 129, 0.04) !important;
    border-color: var(--success) !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2) !important;
}
body.light-theme .rps-vs-circle.draw {
    background: rgba(245, 158, 11, 0.03) !important;
    border-color: var(--warning) !important;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.12) !important;
}

/* Result Message Text */
.game-result-text {
    font-size: 15px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 14px;
    margin-bottom: 20px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
body.light-theme .game-result-text {
    text-shadow: none !important;
}
.game-result-text.win {
    color: #10b981;
}
body.light-theme .game-result-text.win {
    color: #059669;
}
.game-result-text.lose {
    color: #f43f5e;
}
body.light-theme .game-result-text.lose {
    color: #e11d48;
}
.game-result-text.draw {
    color: #f59e0b;
}
body.light-theme .game-result-text.draw {
    color: #d97706;
}

/* Game Big Actions (e.g. Play Again) */
.game-action-btn {
    width: auto;
    padding: 10px 24px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #7c3aed, #6d28d9) !important;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35) !important;
    cursor: pointer;
    transition: all 0.2s ease;
    height: auto !important;
}
.game-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(124, 58, 237, 0.45) !important;
}
.game-action-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Red Notification Badges (iOS Style) */
.tab-btn-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, var(--danger), #be123c);
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: none !important;
    pointer-events: none;
    box-sizing: border-box;
    font-family: var(--font-heading);
    z-index: 10;
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.4);
    opacity: 0.9;
}

body.light-theme .tab-btn-badge {
    background: linear-gradient(135deg, var(--danger), #e11d48);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

#submitProofBtn:disabled {
    background: #4b5563 !important;
    color: #9ca3af !important;
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

.template-item-card {
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.template-item-card:hover {
    border-color: var(--secondary) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.15);
}
.template-item-card:active {
    transform: translateY(0);
}

.template-category-header {
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.template-category-header:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--secondary) !important;
}
.template-category-header:active {
    transform: scale(0.99);
}

/* Whims child selector tabs deck */
.whims-tabs-deck {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    border-bottom: 1.5px solid rgba(255,255,255,0.06);
    padding-bottom: 8px;
    overflow-x: auto;
}
.whims-tab-btn {
    background: rgba(0, 0, 0, 0.25);
    border: 1.5px solid var(--border-color);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    font-family: var(--font-heading);
}
.whims-tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}
.whims-tab-btn.active {
    background: linear-gradient(135deg, var(--primary), #ec4899) !important;
    color: #fff !important;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(236, 72, 153, 0.25);
}
body.light-theme .whims-tab-btn {
    background: #e2e8f0;
    border-color: transparent;
    color: var(--text-muted);
}
body.light-theme .whims-tab-btn.active {
    background: linear-gradient(135deg, var(--primary), #ec4899) !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(236, 72, 153, 0.15);
}

/* Premium Piggy Bank Skin styling */
.pulsing-piggy img {
    width: 152px;
    height: 152px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    /* Fix quality issues when scaling large images in browser */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: auto;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translate3d(0,0,0);
    transform: translate3d(0,0,0);
}

.premium-piggy-item.piggy-skin-option {
    aspect-ratio: 1;
    border-radius: 16px !important;
    border: 2px solid rgba(255,255,255,0.06) !important;
    background: rgba(0,0,0,0.15) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    padding: 6px !important;
    font-size: initial !important;
}

.premium-piggy-item.piggy-skin-option:hover {
    transform: scale(1.05) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    filter: none !important;
}

.premium-piggy-item.piggy-skin-option.active-skin {
    border-color: var(--secondary) !important;
    background: rgba(255, 255, 255, 0.15) !important;
    transform: scale(1.05) !important;
    filter: none !important;
}

body.light-theme .premium-piggy-item.piggy-skin-option {
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .premium-piggy-item.piggy-skin-option:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
}

body.light-theme .premium-piggy-item.piggy-skin-option.active-skin {
    background: rgba(67, 130, 255, 0.1) !important;
    border-color: var(--secondary) !important;
}

/* Premium Pricing Cards CSS */
.premium-plan-card {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 12px 16px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.premium-plan-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(245, 158, 11, 0.4);
    transform: translateY(-2px);
}

.premium-plan-card.selected {
    background: rgba(245, 158, 11, 0.08);
    border-color: #f59e0b;
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.2);
}

.premium-plan-card .plan-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.premium-plan-card .plan-label {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 900;
    color: var(--text-main);
}

.premium-plan-card .plan-price {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 900;
    color: #f59e0b;
}

.premium-plan-card .plan-note {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.3;
}

.premium-plan-card .plan-badge {
    position: absolute;
    top: -9px;
    right: 14px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-size: 8px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Light Theme overrides for Plan Cards */
body.light-theme .premium-plan-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .premium-plan-card:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(245, 158, 11, 0.5);
}

body.light-theme .premium-plan-card.selected {
    background: rgba(245, 158, 11, 0.06);
    border-color: #f59e0b;
}

body.light-theme .premium-plan-card .plan-label {
    color: #1e1b4b;
}

/* Premium Warning Modal styles */
.premium-warning-modal-content {
    max-width: 420px;
    padding: 26px;
    border-radius: 28px;
    text-align: center;
    width: 90%;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #252033, #1f1a2c) !important;
    border: 3.5px solid #231f2d !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3) !important;
}
body.light-theme .premium-warning-modal-content {
    background: linear-gradient(135deg, #ffffff, #fbfaff) !important;
    border: 2.5px solid rgba(245, 158, 11, 0.35) !important;
    box-shadow: 0 20px 40px rgba(31, 41, 55, 0.12) !important;
}

.warning-hero-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.warning-glowing-circle {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.35) 0%, rgba(245, 158, 11, 0) 70%);
    animation: circlePulseGlow 3s infinite alternate;
}
.warning-floating-icon {
    font-size: 44px;
    z-index: 1;
    animation: iconFloat 4s infinite ease-in-out;
    filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.35));
    display: flex;
    align-items: center;
    justify-content: center;
}
@keyframes circlePulseGlow {
    0% { transform: scale(0.85); opacity: 0.4; }
    100% { transform: scale(1.25); opacity: 0.95; }
}
@keyframes iconFloat {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(4deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

.warning-title {
    font-family: var(--font-heading);
    font-weight: 900;
    text-transform: uppercase;
    font-size: 20px;
    margin-bottom: 8px !important;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #ffb700, #ff7b00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #f59e0b; /* Fallback */
    display: inline-block;
}

.warning-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
    text-align: left;
}
@media (max-width: 480px) {
    .warning-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.warning-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.25s ease;
}
.warning-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}
body.light-theme .warning-card {
    background: rgba(15, 23, 42, 0.02) !important;
    border: 1.5px solid rgba(15, 23, 42, 0.05) !important;
}
body.light-theme .warning-card:hover {
    background: rgba(15, 23, 42, 0.04) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
}

.warning-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
}
.warning-card-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.warning-card-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}
.warning-card-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.35;
}

/* Card Icons color palettes */
.icon-profiles {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}
body.light-theme .icon-profiles {
    background: rgba(99, 102, 241, 0.12) !important;
    color: #4f46e5 !important;
}

.icon-tasks {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}
body.light-theme .icon-tasks {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #059669 !important;
}

.icon-pets {
    background: rgba(244, 63, 94, 0.15);
    color: #fb7185;
}
body.light-theme .icon-pets {
    background: rgba(244, 63, 94, 0.12) !important;
    color: #e11d48 !important;
}

.icon-ai {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}
body.light-theme .icon-ai {
    background: rgba(245, 158, 11, 0.12) !important;
    color: #d97706 !important;
}

.pulse-glow-btn {
    animation: buttonPulseGlow 2s infinite ease-in-out;
    transition: all 0.3s ease;
}
.pulse-glow-btn:hover {
    transform: scale(1.03);
    filter: brightness(1.1);
}
@keyframes buttonPulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

/* Whim Ideas Modal Styles */
.whim-idea-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 14px;
    transition: all 0.2s ease;
}
body.light-theme .whim-idea-box {
    background: rgba(15, 23, 42, 0.02) !important;
    border-color: rgba(15, 23, 42, 0.06) !important;
}
.whim-tip-box {
    background: rgba(245, 158, 11, 0.06);
    border: 1.5px solid rgba(245, 158, 11, 0.15);
    padding: 12px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
body.light-theme .whim-tip-box {
    background: rgba(245, 158, 11, 0.04) !important;
    border-color: rgba(245, 158, 11, 0.12) !important;
}









