/* --- LUMINOUS CARD STYLES --- */
.luminous-card {
    --sz: clamp(10px, min(2vw, 3vh), 24px);
    position: relative;
    background: radial-gradient(circle at 50% 0%, #3a3a3a 0%, #1a1a1a 64%);
    box-shadow: inset 0 1.01rem 0.2rem -1rem #fff0,
        inset 0 -1.01rem 0.2rem -1rem #0000, 0 -1.02rem 0.2rem -1rem #fff0,
        0 1rem 0.2rem -1rem #0000, 0 0 0 1px #fff3, 0 4px 4px 0 #0004, 0 0 0 1px #333;
    width: 28rem;
    height: 40rem;
    border-radius: 1.8rem;
    color: #fff;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: end;
    transition: all 0.4s ease-in-out, translate 0.4s ease-out;
    font-size: var(--sz);
    transform: scale(1);
}

.luminous-card::before {
    content: "";
    display: block;
    --offset: 1rem;
    width: calc(100% + 2 * var(--offset));
    height: calc(100% + 2 * var(--offset));
    position: absolute;
    left: calc(-1 * var(--offset));
    right: calc(-1 * var(--offset));
    top: calc(-1 * var(--offset));
    bottom: calc(-1 * var(--offset));
    margin: auto;
    box-shadow: inset 0 0 0px 0.06rem #fff2;
    border-radius: 2.6rem;
    --ax: 4rem;
    clip-path: polygon(
        var(--ax) 0,
        0 0,
        0 var(--ax),
        var(--ax) var(--ax),
        var(--ax) calc(100% - var(--ax)),
        0 calc(100% - var(--ax)),
        0 100%,
        var(--ax) 100%,
        var(--ax) calc(100% - var(--ax)),
        calc(100% - var(--ax)) calc(100% - var(--ax)),
        calc(100% - var(--ax)) 100%,
        100% 100%,
        100% calc(100% - var(--ax)),
        calc(100% - var(--ax)) calc(100% - var(--ax)),
        calc(100% - var(--ax)) var(--ax),
        100% var(--ax),
        100% 0,
        calc(100% - var(--ax)) 0,
        calc(100% - var(--ax)) var(--ax),
        var(--ax) var(--ax)
    );
    transition: all 0.4s ease-in-out;
    pointer-events: none;
}

.luminous-card:hover {
    translate: 0 -0.2rem;
}

.luminous-card:hover::before {
    --offset: 0.5rem;
    --ax: 8rem;
    border-radius: 2.2rem;
    box-shadow: inset 0 0 0 0.08rem #fff1;
}

.luminous-card .light-layer {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    transform-style: preserve-3d;
    perspective: 400px;
    pointer-events: none;
}

.luminous-card .slit {
    position: absolute;
    left: 0;
    right: 0;
    top: 30%; /* Moved up from center (50%) */
    margin: auto;
    width: 64%;
    height: 1.2rem;
    transform: rotateX(-76deg);
    background: #121212;
    box-shadow: 0 0 4px 0 #fff0;
    transition: all 0.4s ease-in-out;
}

.luminous-card .lumen {
    position: absolute;
    left: 0;
    right: 0;
    top: 30%; /* Moved up to match slit */
    margin: auto;
    width: 100%;
    height: 100%;
    pointer-events: none;
    perspective: 400px;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.luminous-card .lumen .min {
    width: 70%;
    height: 3rem;
    background: linear-gradient(#fff0, #fffa);
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    /* Removed bottom positioning to rely on top */
    margin: auto;
    transform: rotateX(-42deg);
    opacity: 0.4;
}

.luminous-card .lumen .mid {
    width: 74%;
    height: 13rem;
    background: linear-gradient(#fff0, #fffa);
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    /* Removed bottom positioning */
    margin: auto;
    transform: rotateX(-42deg);
    filter: blur(1rem);
    opacity: 0.8;
    border-radius: 100% 100% 0 0;
}

.luminous-card .lumen .hi {
    width: 50%;
    height: 13rem;
    background: linear-gradient(#fff0, #fffa);
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    /* Removed bottom positioning */
    margin: auto;
    transform: rotateX(22deg);
    filter: blur(1rem);
    opacity: 0.6;
    border-radius: 100% 100% 0 0;
}

.luminous-card .darken {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    width: 100%;
    height: 100%;
    pointer-events: none;
    perspective: 400px;
    transition: opacity 0.4s ease-in-out;
    opacity: 0.5;
}

.luminous-card .darken > * {
    transition: opacity 0.4s ease-in-out;
}

.luminous-card .darken .sl {
    width: 64%;
    height: 10rem;
    background: linear-gradient(#000, #0000);
    position: absolute;
    left: 0;
    right: 0;
    top: calc(30% + 9.6em); /* Adjusted based on new top */
    margin: auto;
    filter: blur(0.2rem);
    opacity: 0.1;
    border-radius: 0 0 100% 100%;
    transform: rotateX(-22deg);
}

.luminous-card .darken .ll {
    width: 62%;
    height: 10rem;
    background: linear-gradient(#000a, #0000);
    position: absolute;
    left: 0;
    right: 0;
    top: calc(30% + 11em); /* Adjusted based on new top */
    margin: auto;
    filter: blur(0.8rem);
    opacity: 0.4;
    border-radius: 0 0 100% 100%;
    transform: rotateX(22deg);
}

.luminous-card .darken .slt {
    width: 0.5rem;
    height: 4rem;
    background: linear-gradient(#0005, #0000);
    position: absolute;
    left: 0;
    right: 11.5rem;
    top: calc(30% + 3.9em); /* Adjusted based on new top */
    margin: auto;
    opacity: 0.6;
    border-radius: 0 0 100% 100%;
    transform: skewY(42deg);
}

.luminous-card .darken .srt {
    width: 0.5rem;
    height: 4rem;
    background: linear-gradient(#0005, #0000);
    position: absolute;
    right: 0;
    left: 11.5rem;
    top: calc(30% + 3.9em); /* Adjusted based on new top */
    margin: auto;
    opacity: 0.6;
    border-radius: 0 0 100% 100%;
    transform: skewY(-42deg);
}

.luminous-card .content .icon {
    position: absolute;
    top: 2rem;
    left: 0;
    right: 0;
    margin: auto;
    width: fit-content;
    filter: drop-shadow(0 -1.2rem 1px transparent);
    transition: filter 0.4s ease-in-out;
}

.luminous-card .content > h4 {
    margin: 0;
    margin-top: 6.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
    color: #ccc;
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 2;
}

.luminous-card .content .bottom {
    position: relative;
    padding-bottom: 3rem;
}

.luminous-card .content .bottom .description-scroll {
    max-height: 280px;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding-right: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: #555 transparent;
}

.command-group {
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.command-group:last-child {
    border-bottom: none;
}

.cmd-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.cmd-tag {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(217, 128, 250, 0.3);
    color: var(--highlight);
    font-family: 'Courier New', monospace;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
}

.cmd-desc {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
}

.cmd-detail {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0;
    padding-left: 0.5rem;
    line-height: 1.4;
}

.luminous-card .content .bottom .toggle {
    position: absolute;
    right: 0;
    top: -2.5rem;
    height: 2rem;
    width: 4.8rem;
    border-radius: 0.6rem;
    background: #000;
    box-shadow: inset 0 -8px 8px 0.3rem #0004, inset 0 0 1px 0.3rem #ddd,
        inset 0 -2px 1px 0.3rem #fff, inset 0 1px 2px 0.3rem #0006,
        inset 0 0 1px 0.8rem #aaa;
    cursor: pointer;
    transition: all 0.4s ease-in-out;
    z-index: 20;
}

.luminous-card .content .bottom .toggle::before {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    width: 3.4rem;
    height: 0.68rem;
    border-radius: 0.2rem;
    background: #000;
    transition: all 0.4s ease-in-out;
}

.luminous-card .content .bottom .toggle .handle {
    position: absolute;
    top: 0;
    bottom: 0.04rem;
    margin: auto;
    left: 0.68rem;
    width: 40%;
    height: 30%;
    background: #aaa;
    border-radius: 0.2rem;
    box-shadow: inset 0 1px 4px 0 #fff, inset 0 -1px 1px 0 #000a,
        0 0 1px 1px #0003, 1px 3px 6px 1px #000a;
    transition: all 0.4s ease-in-out;
}

.luminous-card .content .bottom .toggle.active .handle {
    transform: translateX(1.58rem);
}

.luminous-card .content .bottom .toggle span {
    pointer-events: none;
    text-align: center;
    position: absolute;
    left: 0;
    right: 0;
    margin: auto;
    bottom: calc(100% + 0.4rem);
    font-size: 0.6rem;
    font-weight: 100;
    color: #555;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.luminous-card .content .bottom .toggle:hover span {
    opacity: 1;
}

.luminous-card .content .bottom .toggle:not(.active):hover .handle {
    transform: translateX(0.2rem);
}

/* Active State for Luminous Card */
.luminous-card.light-on {
    box-shadow: inset 0 1.01rem 0.1rem -1rem #fffa, inset 0 -4rem 3rem -3rem #000a,
        0 -1.02rem 0.2rem -1rem #fffa, 0 1rem 0.2rem -1rem #000, 0 0 0 1px #fff2,
        0 4px 4px 0 #0004, 0 0 0 1px #333;
}

.luminous-card.light-on .slit {
    background: #fff;
    box-shadow: 0 0 4px 0 #fff;
}

.luminous-card.light-on .lumen {
    opacity: 0.5;
}

.luminous-card.light-on .darken {
    opacity: 0.8;
}

.luminous-card.light-on .darken .sl {
    opacity: 0.2;
}

.luminous-card.light-on .darken .ll {
    opacity: 1;
}

.luminous-card.light-on .darken .slt {
    opacity: 1;
}

.luminous-card.light-on .darken .srt {
    opacity: 1;
}

.luminous-card.light-on .content .icon {
    filter: drop-shadow(0 -1.2rem 2px #0003) brightness(1.64);
}

.luminous-card.light-on .content .bottom .toggle::before {
    background: #fffc;
    box-shadow: 0 0 0.3rem 0.2rem #fff7;
}

.luminous-card.light-on .content .bottom .toggle .handle {
    box-shadow: inset 0 1px 12px 0 #fff, inset 0 -1px 1px 0 #fffa,
        0 0 2px 1px #4443, 1px 3px 6px 1px #0004;
}

/* Close button for luminous card */
.close-luminous-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #555;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s;
}

.close-luminous-modal:hover {
    color: #fff;
}