:root {
    --bg-color: #02060f;
    --dark-blue: #0a1930;
    --light-blue-dim: #4a7596;
    --light-blue: #88c0d0;
    --sky-blue: #b3e5fc;
    --bright-blue: #e1f5fe;
    --oracle-glow: #ffffff;
    --danger: #ff5252;
    --fulfilled: var(--sky-blue);
    --lock-gold: #c5a059;
    /* SMALL: */
    --text-sm:  clamp(0.75rem, 2vw, 1rem);
    --text-stm: clamp(0.85rem, 2.25vw, 1.25rem);
    --text-md:  clamp(1rem, 2.5vw, 1.5rem); 
    --text-mt: clamp(1.125rem, 2.75vw, 1.75rem);
    --text-mtl: clamp(1.5rem, 2.75vw, 2.0rem);
    --text-lg:  clamp(1.75rem, 5vw, 2.25rem);
    --text-xl:  clamp(2rem, 8vw, 2.5rem); /* Lowered from 2rem to 1.5rem */
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', Courier, 'Microsoft YaHei', 'PingFang SC', 'SimHei', monospace;
    background-color: var(--bg-color);
    color: var(--light-blue);
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: scroll;
    padding-top: calc(15px + env(safe-area-inset-top));
    padding-bottom: calc(15px + env(safe-area-inset-bottom));
    padding-left: calc(15px + env(safe-area-inset-left));
    padding-right: calc(15px + env(safe-area-inset-right));
}

#app-wrapper {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

#system-msg {
    position: fixed; 
    top: calc(10px + env(safe-area-inset-top)); 
    width: 90%; 
    max-width: 580px; 
    background: var(--dark-blue); 
    color: var(--sky-blue); 
    text-align: center; 
    padding: 10px; 
    border: 1px solid var(--sky-blue); 
    z-index: 100;
    display: none; 
    font-weight: bold; 
    box-shadow: 0 0 15px var(--dark-blue);
}

#system-msg.bad { 
    border-color: var(--danger); 
    color: var(--danger); 
    box-shadow: 0 0 15px var(--danger); }

header {
    text-align: center;
    margin-bottom: 20px;
}

.index-logo-img {
    width: 100px;
    height: auto;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 2px solid var(--light-blue-dim);
    box-shadow: 0 0 10px rgba(136, 192, 208, 0.4);
}

header h1 {
    font-size: 1.5rem;
    color: var(--sky-blue);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin: 0;
}

.rank-badge {
    display: inline-block;
    background: var(--dark-blue);
    border: 1px solid var(--light-blue);
    padding: 5px 15px;
    margin-top: 10px;
    color: var(--sky-blue);
    font-weight: bold;
    letter-spacing: 1px;
}

.rank-grade { 
    color: var(--light-blue-dim); margin-right: 5px; 
}

.main-nav-tabs {
    display: flex;
    width: 100%;
    margin-bottom: 20px;
    gap: 10px;
}

.main-tab {
    flex: 1;
    text-align: center;
    padding: 12px 5px;
    background: #000;
    border: 1px solid var(--light-blue-dim);
    color: var(--light-blue-dim);
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.main-tab.active {
    background: var(--dark-blue);
    color: var(--sky-blue);
    border-color: var(--sky-blue);
    box-shadow: 0 0 10px rgba(135, 206, 235, 0.2);
}

.view-page {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.container { 
    width: 100%; 
}

.prescript-card {
    background: linear-gradient(180deg, var(--dark-blue) 0%, #030812 100%);
    border: 1px solid var(--light-blue);
    padding: 30px 20px;
    text-align: center;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8), 0 0 15px rgba(136, 192, 208, 0.1);
    position: relative;
    transition: all 0.3s ease;
    width: 100%;
}

.prescript-card.generating { 
    box-shadow: inset 0 0 40px rgba(136, 192, 208, 0.2), 0 0 25px rgba(136, 192, 208, 0.3); 
    border-color: var(--sky-blue); 
}

.quest-marker {
    position: absolute;
    top: 10px;
    left: 10px;
    color: var(--lock-gold);
    border: 1px solid var(--lock-gold);
    padding: 2px 5px;
    letter-spacing: 1px;
    font-size: var(--text-sm); /* Removed the old 0.7rem */
}

#prescript-mark {
    position: absolute;
    top: 10px;
    right: 15px;
    width: 60px;
    height: auto;
    z-index: 10;
    filter: drop-shadow(0 0 8px var(--sky-blue));
    animation: markPulse 3s infinite alternate;
}

@keyframes markPulse {
    from { filter: drop-shadow(0 0 5px var(--sky-blue)); 
        opacity: 0.8; }
    to { filter: drop-shadow(0 0 15px var(--oracle-glow)); 
        opacity: 1; transform: scale(1.05); }
}

.prescript-text { 
    line-height: 1.5; 
    color: var(--sky-blue); 
    margin-bottom: 20px; 
    min-height: 80px; 
    width: 100%; 
    white-space: pre-wrap; 
    word-wrap: break-word; 
    text-align: left; 
    font-size: var(--text-mt); 
    line-height: 1.5;}
    
.typing-cursor::after { 
    content: '█'; 
    animation: blink 1s step-end infinite; }
    @keyframes blink { 50% { opacity: 0; } 
}

.btn-large {
    background: transparent;
    border: 1px solid var(--light-blue);
    color: var(--sky-blue);
    padding: 15px 30px;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.2s;
    width: 80%;
    margin: 10px 0;
}

#display-user-name {
    font-size: var(--text-mtl);
}

.btn-large:hover { 
    background: var(--light-blue); 
    color: #000; 
}

.btn-large:disabled {
    opacity: 0.5; 
    cursor: not-allowed; 
}

.cooldown-msg { 
    font-size: 0.9rem; 
    color: var(--light-blue-dim); 
    margin-top: 10px; 
    white-space: nowrap; 
    overflow: hidden;
    text-overflow: ellipsis;
}

.hidden { 
    display: none !important; 
}

.action-row { 
    display: flex; 
    width: 100%; 
    justify-content: space-around; 
    gap: 10px; 
    margin-top: 5px; 
}

.btn-action {
    flex: 1;
    background: transparent;
    border: 1px solid var(--light-blue-dim);
    color: var(--light-blue);
    padding: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-action:hover { 
    background: rgba(136, 192, 208, 0.2); 
}

.fulfilled-btn:hover { 
    background: rgba(179, 229, 252, 0.15); 
    border-color: var(--fulfilled); 
    color: var(--fulfilled); 
}

.failed-btn:hover { 
    background: rgba(255, 215, 0, 0.15); 
    border-color: var(--danger); 
    color: var(--danger); 
}

.btn-proceed { 
    border-color: var(--sky-blue); 
    color: var(--sky-blue); 
    font-weight: bold; 
    width: 100%;
    margin-top: 5px; 
}

.stats-area { 
    background: #050a14; 
    padding: 15px; 
    border: 1px solid var(--light-blue-dim); 
    width: 100%; 
}

.stats-grid { 
    display: flex; 
    align-items: center; 
    width: 100%; }

.stat-box { 
    flex: 1; 
    text-align: center; 
    padding: 5px 0; 
}

.stat-box:first-child { 
    border-right: 1px solid var(--light-blue-dim); 
}

.stat-icon { 
    width: 30px; 
    height: 30px; 
    margin-bottom: 5px; 
}

.stat-value { 
    color: var(--sky-blue); 
    font-weight: bold; 
    font-size: var(--text-mtl); /* Changed to lg, removed old 1.5rem */
}

.stat-label { 
    font-size: 0.8rem; 
    color: var(--light-blue-dim); 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}

.ascend-box { 
    margin-top: 15px; 
    border-top: 1px solid var(--light-blue-dim); 
    padding-top: 10px; 
    text-align: center; 
    display: none; 
}

.ascend-box.visible { 
    display: block; 
}

.ascend-cost { 
    display: block; 
    font-size: 0.8rem; 
    color: var(--light-blue); 
    margin-bottom: 5px; 
}

.ascend-req { 
    display: block; 
    font-size: 0.7rem; 
    color: var(--danger); 
    margin-top: 5px; 
}

.warning-text { 
    font-size: 0.7rem; 
    color: var(--lock-gold); 
    display: block; 
    margin-top: 5px; 
}

.pending-section { 
    background: #050a14; 
    padding: 15px; 
    border: 1px solid var(--light-blue-dim); 
    width: 100%; 
}

.pending-item { 
    padding: 15px; 
    border: 1px solid var(--light-blue-dim); 
    margin-bottom: 10px; 
    font-size: 0.9rem; 
    cursor: pointer; 
    background: #02060f; 
    white-space: normal; 
    word-wrap: break-word; 
    line-height: 1.4;
    border-radius: 4px; 
}

.pending-item:hover { 
    border-color: var(--sky-blue); 
}

.pending-item.glow-skyblue {
    border-color: var(--sky-blue);
    box-shadow: 0 0 10px rgba(135, 206, 235, 0.6);
}

.modal { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.85); 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    z-index: 50; 
}

.modal-content { 
    background: #050a14; 
    padding: 20px; 
    border: 1px solid var(--sky-blue); 
    width: 85%; max-width: 400px; 
    text-align: center; 
    position: relative; 
}

.modal-text { 
    font-size: 1rem; 
    color: var(--sky-blue); 
    margin-bottom: 20px; 
    line-height: 1.5; 
    white-space: pre-wrap; 
    word-wrap: break-word; 
    text-align: left; }

.exit-btn { 
    border-color: var(--light-blue-dim); 
    color: var(--light-blue-dim); 
}

.ritual-header { 
    font-size: 0.8rem; 
    color: var(--lock-gold); 
    display: block; 
    margin-bottom: 5px; 
}

.ritual-title { 
    font-size: 1.2rem; 
    color: var(--bright-blue); 
    display: block; 
    margin-bottom: 15px; 
    font-weight: bold; 
}

.ritual-body { 
    font-size: 0.95rem; 
    color: var(--light-blue); 
    text-align: left; 
    padding: 0 10px; 
    line-height: 1.6; 
}

.quote { 
    font-style: italic; 
    color: var(--sky-blue); 
}

input[type="text"] { 
    width: 100%; 
    padding: 10px; 
    background: #02060f; 
    border: 1px solid var(--light-blue-dim); 
    color: var(--sky-blue); 
    font-family: inherit; 
    margin-bottom: 10px; 
    box-sizing: border-box; 
}

.list-item { 
    display: flex; 
    justify-content: space-between; 
    padding: 8px; 
    border: 1px solid var(--light-blue-dim); 
    margin-bottom: 5px; 
    font-size: 0.8rem; 
    background: #02060f; 
}

/* ========================================= */
/* MIRROR DIMENSION HUB AESTHETICS           */
/* ========================================= */
.mirror-hub-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 15px 5px;
    box-sizing: border-box;
}

.mirror-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin-top: 0;
    padding-top: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid;
    border-image: linear-gradient(to right, rgba(197, 160, 89, 0) 0%, rgba(197, 160, 89, 0.8) 50%, rgba(197, 160, 89, 0) 100%) 1;
    margin-bottom: 15px;
}

.mirror-title {
    color: var(--sky-blue);
    font-size: var(--text-mt);
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 0 0 8px rgba(136, 192, 208, 0.4);
    margin: 0;
    text-align: center;
}

.mirror-divider {
    height: 2px;
    width: 100%;
    max-width: 420px;
    background: linear-gradient(to right, rgba(197, 160, 89, 0) 0%, rgba(197, 160, 89, 0.8) 50%, rgba(197, 160, 89, 0) 100%);
    margin: 15px auto;
}

.mirror-menu-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 420px;
    align-items: center;
}

.mirror-menu-grid .btn-mirror {
    max-width: 420px;
}

/* Custom themed buttons */
.btn-mirror {
    background: #02060f;
    border: 1px solid var(--light-blue-dim);
    color: var(--light-blue);
    padding: 14px 10px;
    font-family: inherit;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: inset 0 0 10px rgba(10, 25, 48, 0.5);
    font-size: var(--text-sm);
    text-align: center;
    border-radius: 4px;
    width: 100%;
    max-width: 320px;
}

.btn-mirror:hover {
    background: var(--dark-blue);
    color: #fff;
    box-shadow: 0 0 10px rgba(136, 192, 208, 0.2);
}

.btn-mirror-sky {
    border-color: var(--sky-blue);
    color: var(--sky-blue);
}

.btn-mirror-sky:hover {
    background: rgba(135, 206, 235, 0.15);
    border-color: #fff;
    color: #fff;
    box-shadow: 0 0 12px rgba(135, 206, 235, 0.4);
}

.btn-mirror-gold {
    border-color: var(--lock-gold);
    color: var(--lock-gold);
}

.btn-mirror-gold:hover {
    background: rgba(255, 215, 0, 0.15);
    border-color: #fff;
    color: #fff;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}

.btn-mirror-exit {
    background: #02060f;
    border: 1px solid var(--sky-blue);
    color: var(--sky-blue);
    padding: 10px 16px;
    font-family: inherit;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: inset 0 0 8px rgba(10, 25, 48, 0.5);
    font-size: 0.8rem;
    text-align: center;
    border-radius: 4px;
    width: 100%;
    max-width: 250px;
    margin: 10px auto;
    display: block;
}

.btn-mirror-exit:hover {
    background: rgba(135, 206, 235, 0.15);
    border-color: #fff;
    color: #fff;
    box-shadow: 0 0 12px rgba(135, 206, 235, 0.4);
}

.btn-mirror-back {
    background: var(--dark-blue);
    color: var(--sky-blue);
    border: 1px solid var(--sky-blue);
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-mirror-back:hover {
    background: var(--sky-blue);
    color: var(--bg-color);
    box-shadow: 0 0 8px rgba(179, 229, 252, 0.5);
}

/* Slide boxes: blue (visual), orange (name), green (info) styled to the theme */
.box-blue {
    border: 1px solid var(--sky-blue);
    background: rgba(136, 192, 208, 0.06);
    color: var(--sky-blue);
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(136, 192, 208, 0.05);
}

.box-orange {
    border: 1px solid var(--lock-gold);
    background: rgba(197, 160, 89, 0.03);
    color: var(--lock-gold);
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(197, 160, 89, 0.03);
}

.box-green {
    border: 1px solid var(--light-blue-dim);
    background: rgba(10, 25, 48, 0.9);
    color: var(--bright-blue);
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* Scroll Containers */
.side-scroll-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 5px;
    width: 100%;
    box-sizing: border-box;
}

.side-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.side-scroll-container::-webkit-scrollbar-thumb {
    background: var(--light-blue-dim);
    border-radius: 3px;
}

.up-down-scroll-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.up-down-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.up-down-scroll-container::-webkit-scrollbar-thumb {
    background: var(--light-blue-dim);
    border-radius: 3px;
}

#ui-input-lock {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: transparent;
    z-index: 10000;
    display: none;
    cursor: wait;
    pointer-events: all;
}

.mirror-subpage-container {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: all 0.3s ease;
    padding: 20px;
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
}

/* ========================================= */
/* STORY ACCORDION STYLES (SLIDE 2)          */
/* ========================================= */
.story-accordion {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.story-chapter-btn {
    width: 85%;
    max-width: 440px;
    padding: 14px 18px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    background: #02060f;
    border: 1px solid var(--sky-blue);
    color: var(--sky-blue);
    border-radius: 4px;
    transition: all 0.2s ease;
    text-align: left;
    box-shadow: inset 0 0 10px rgba(10, 25, 48, 0.5);
}

.story-chapter-btn:hover {
    background: rgba(135, 206, 235, 0.1);
    box-shadow: 0 0 8px rgba(135, 206, 235, 0.2);
}

.story-chapter-btn.active {
    background: rgba(135, 206, 235, 0.15);
    border-color: #fff;
    color: #fff;
    box-shadow: 0 0 12px rgba(135, 206, 235, 0.4);
}

.ch-align-left {
    align-self: flex-start;
    margin-left: 5%;
}

.ch-align-right {
    align-self: flex-start;
    margin-left: 5%;
}

.story-pages-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 8px;
    width: 60%;
    max-width: 280px;
    align-self: flex-start;
    margin-left: 12%;
}

.ch-align-left-pages {
    align-self: flex-start;
    margin-left: 12%;
}

.ch-align-right-pages {
    align-self: flex-start;
    margin-left: 12%;
}

.story-page-btn {
    width: 100%;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    background: #02060f;
    border: 1px solid var(--lock-gold);
    color: var(--lock-gold);
    border-radius: 4px;
    text-align: left;
    transition: all 0.2s ease;
    box-shadow: inset 0 0 5px rgba(10, 25, 48, 0.5);
}

.story-page-btn:hover {
    background: rgba(197, 160, 89, 0.15);
    border-color: var(--lock-gold);
    color: #fff;
    box-shadow: 0 0 8px rgba(197, 160, 89, 0.3);
}

/* ========================================= */
/* WORKSHOP & CRAFTING STYLES (SLIDES 14-15) */
/* ========================================= */
.mirror-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
    margin-bottom: 15px;
}

.mirror-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, rgba(197, 160, 89, 0) 0%, rgba(197, 160, 89, 0.8) 50%, rgba(197, 160, 89, 0) 100%);
}

.stand-weapon-card, .storage-card {
    flex-shrink: 0;
    width: 110px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.2s ease;
    border-radius: 6px;
    padding: 4px;
    border: 1px solid transparent;
}

.stand-weapon-card:hover, .storage-card:hover {
    border-color: rgba(136, 192, 208, 0.3);
    background: rgba(136, 192, 208, 0.02);
}

.stand-weapon-card.active, .storage-card.active {
    border-color: var(--lock-gold);
    box-shadow: 0 0 10px rgba(197, 160, 89, 0.4);
    background: rgba(197, 160, 89, 0.04);
}

.crafting-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.crafting-top-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: rgba(5, 10, 20, 0.4);
    border: 1px solid rgba(135, 206, 235, 0.1);
    border-radius: 8px;
    padding: 15px;
    box-sizing: border-box;
}

.crafting-materials-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    padding-left: 20px;
}

.crafting-material-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.crafting-material-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    border: 2px solid var(--sky-blue);
    background: rgba(136, 192, 208, 0.08);
    box-shadow: 0 0 8px rgba(136, 192, 208, 0.2);
    transition: all 0.2s ease;
}

.crafting-material-circle.insufficient {
    border-color: var(--danger);
    background: rgba(220, 53, 69, 0.08);
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.2);
}

.crafting-material-qty {
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--sky-blue);
    text-align: center;
}

.crafting-material-qty.insufficient {
    color: var(--danger);
}

.crafting-material-name {
    font-size: 0.6rem;
    color: var(--light-blue-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crafting-actions-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    padding-left: 10px;
}

.crafting-cost-label {
    font-size: 0.8rem;
    color: var(--light-blue-dim);
}

.crafting-cost-val {
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--sky-blue);
}

.crafting-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    width: 100%;
}

.crafting-bottom-panel {
    border: 1px solid rgba(135, 206, 235, 0.15);
    background: rgba(2, 6, 15, 0.6);
    border-radius: 6px;
    padding: 12px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.crafting-panel-title {
    font-size: 0.75rem;
    color: var(--sky-blue);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    border-bottom: 1px solid rgba(135, 206, 235, 0.15);
    padding-bottom: 6px;
    margin-bottom: 4px;
}
/* ========================================= */
/* PREMIUM GLASSMORPHISM AESTHETICS          */
/* ========================================= */

.glass-panel {
    background: rgba(10, 15, 30, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(136, 192, 208, 0.3);
    border-radius: 12px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(136, 192, 208, 0.1);
    color: #fff;
    padding: 20px;
    transition: all 0.3s ease;
}

.glass-card {
    background: linear-gradient(135deg, rgba(20, 25, 45, 0.8) 0%, rgba(10, 15, 30, 0.9) 100%);
    border: 1px solid rgba(136, 192, 208, 0.2);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(136, 192, 208, 0.8);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(136, 192, 208, 0.4);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    transition: left 0.5s ease;
}

.glass-card:hover::before {
    left: 200%;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    box-sizing: border-box;
}

/* Custom scrollbar for grid */
.inventory-grid::-webkit-scrollbar {
    width: 8px;
}
.inventory-grid::-webkit-scrollbar-track {
    background: rgba(10, 15, 30, 0.5);
    border-radius: 4px;
}
.inventory-grid::-webkit-scrollbar-thumb {
    background: rgba(136, 192, 208, 0.5);
    border-radius: 4px;
}
.inventory-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(136, 192, 208, 0.8);
}

.item-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(136, 192, 208, 0.5));
}

.item-name {
    font-size: 0.85rem;
    color: var(--sky-blue);
    text-align: center;
    font-weight: bold;
    margin-bottom: 5px;
}

.item-count {
    position: absolute;
    bottom: 5px;
    right: 8px;
    font-size: 0.75rem;
    color: #fff;
    background: rgba(0,0,0,0.6);
    padding: 2px 6px;
    border-radius: 10px;
    border: 1px solid var(--sky-blue);
}

/* Modal styling for details */
.glass-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    width: 90%;
    max-width: 400px;
}

.glowing-text {
    text-shadow: 0 0 10px rgba(136, 192, 208, 0.8);
    color: #fff;
}
