/* --- DIVINATION BOOT SCREEN & EFFECTS --- */

.divination-boot-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    position: relative;
    z-index: 10;
}

.boot-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.2rem;
    color: var(--gold-primary);
    letter-spacing: 2px;
    text-align: center;
    animation: pulse-text 1.5s infinite;
}

.divination-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.15),
            rgba(0, 0, 0, 0.15) 1px,
            transparent 1px,
            transparent 2px);
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
}

.divination-loader {
    background: var(--gold-primary);
    box-shadow: 0 0 10px var(--gold-primary);
    transition: width 0.3s ease;
}

/* --- CAGED / DOSSIER VISUAL OVERHAUL --- */

.divination-grid-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

/* Slot Highlight (from interacting with body) */
.divination-slot.highlight {
    border-color: var(--gold-bright);
    box-shadow: 0 0 15px var(--gold-primary);
    background: rgba(212, 175, 55, 0.1);
}

.divination-grid-row {
    /* The "Cage" */
    border: 2px solid var(--gold-dim);
    background: #050505;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 120px;
    margin-bottom: 15px;
    padding: 15px;
    /* Corner Brackets via pseudo-elements */
    clip-path: polygon(0 0,
            100% 0,
            100% 100%,
            0 100%);
}

@media (min-width: 768px) {
    .divination-grid-row {
        flex-direction: row;
    }

    .div-grid-data-col {
        width: 30%;
        min-width: 200px;
        flex-shrink: 0;
    }
}

.divination-grid-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid var(--gold-primary);
    opacity: 0.3;
    pointer-events: none;
    z-index: 10;
    /* Inner border emphasis */
    margin: 3px;
}

/* LEFT COL: DATA LABEL */
.div-grid-data-col {
    background: repeating-linear-gradient(45deg,
            rgba(212, 175, 55, 0.02),
            rgba(212, 175, 55, 0.02) 10px,
            rgba(0, 0, 0, 0) 10px,
            rgba(0, 0, 0, 0) 20px);
    border-right: 2px solid var(--gold-dim);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.div-grid-header {
    background: var(--gold-dim);
    color: #000;
    padding: 2px 8px;
    display: inline-block;
    font-weight: bold;
    margin-bottom: 10px;
    align-self: flex-start;
    box-shadow: 2px 2px 0 var(--gold-primary);
}

.div-grid-char {
    color: var(--gold-primary);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    font-size: 1.8rem;
    letter-spacing: 1px;
}

.div-grid-cardname {
    font-family: 'Share Tech Mono', monospace;
    opacity: 0.7;
    border-top: 1px solid #333;
    padding-top: 5px;
    margin-top: 5px;
    width: 100%;
}

/* RIGHT COL: NARRATIVE SCREEN */
.div-grid-narrative-col {
    background: #0a0a0a;
    position: relative;
    /* "Screen" look */
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 1);
    flex: 1;
    min-width: 0;
}

.div-text-wrapper {
    font-family: 'Share Tech Mono', monospace;
    /* Tech feel */
    font-size: 1.0rem;
    line-height: 1.5;
    color: #eee;
    padding: 10px;
    border-left: 2px solid var(--gold-dark);
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.div-narrative-prefix {
    color: var(--gold-dark);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    margin-bottom: 8px;
    border-bottom: 1px dashed #333;
    padding-bottom: 4px;
    display: block;
}

.div-narrative-content {
    font-style: normal;
    /* Monospace doesn't need italics usually */
    color: #fff;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

/* HOVER EFFECTS */
.divination-grid-row:hover {
    border-color: var(--gold-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.15);
}

.divination-grid-row:hover .div-grid-data-col {
    border-right-color: var(--gold-primary);
}

/* RESONANCE OVERRIDES */
.resonance-row {
    border-color: var(--glitch-red);
    background: #0f0505;
}

/* Chakra Filled State (Steady Glow) */
.chakra-point.filled {
    background: var(--gold-primary);
    box-shadow: 0 0 10px var(--gold-primary);
    opacity: 0.8;
}

/* Chakra Active State (Pulsing) - Overrides Filled */
.chakra-point.active {
    background: var(--gold-bright, #fff);
    box-shadow: 0 0 15px var(--gold-primary), 0 0 30px var(--gold-bright, #fff);
    border-color: #fff;
    transform: translate(-50%, -50%) scale(1.3);
    animation: chakrapulse 1.5s infinite;
    opacity: 1;
    z-index: 20;
}

.resonance-row .div-grid-data-col {
    background: repeating-linear-gradient(45deg,
            rgba(255, 0, 0, 0.05),
            rgba(255, 0, 0, 0.05) 10px,
            rgba(0, 0, 0, 0) 10px,
            rgba(0, 0, 0, 0) 20px);
    border-right-color: var(--glitch-red);
}

.resonance-row .div-grid-header {
    background: var(--glitch-red);
    color: #000;
    box-shadow: 2px 2px 0 #800;
}

.resonate-label {
    color: var(--glitch-red);
    font-size: 1.1rem;
}

/* DECRYPT BUTTON */
.resonance-overlay span {
    background: var(--glitch-red);
    color: #000;
    padding: 8px 16px;
    border: 1px solid #fff;
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 800;
    box-shadow: 0 0 15px var(--glitch-red);
    cursor: pointer;
}

/* RESONANCE - BIG & BOLD */
.resonance-row {
    margin-top: 40px;
    border-top: 2px solid var(--gold-primary);
    padding-top: 20px;
    animation: pulse-border 2s infinite;
}

.resonate-label {
    font-size: 1.5rem;
    color: var(--gold-bright);
    text-align: center;
    width: 100%;
    margin-bottom: 10px;
    letter-spacing: 4px;
    text-shadow: 0 0 10px var(--gold-primary);
}

.resonate-content {
    font-size: 1.2rem;
    padding: 30px;
    text-align: center;
    border: 1px solid var(--gold-dim);
    background: rgba(10, 10, 10, 0.8);
    cursor: pointer;
    transition: all 0.5s;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.resonate-content.censored {
    background: repeating-linear-gradient(45deg,
            #111,
            #111 10px,
            #222 10px,
            #222 20px);
    border-color: var(--glitch-red);
}

.resonate-content.censored:hover {
    border-color: #fff;
    box-shadow: 0 0 20px var(--glitch-red);
    transform: scale(1.02);
}

.div-scramble-text {
    font-size: 1.5rem;
    letter-spacing: 3px;
    color: var(--glitch-red);
}

.click-instruction {
    font-size: 0.9rem;
    color: #888;
    margin-top: 15px;
    animation: blink 0.8s infinite;
}

@keyframes pulse-border {
    0% {
        box-shadow: 0 0 5px var(--gold-dim);
    }

    50% {
        box-shadow: 0 0 20px var(--gold-primary);
    }

    100% {
        box-shadow: 0 0 5px var(--gold-dim);
    }
}

.resonance-overlay span:hover {
    background: #fff;
    color: var(--glitch-red);
    box-shadow: 0 0 25px var(--glitch-red);
}

/* Chakra Tooltips */
.chakra-point::after {
    content: attr(data-label);
    position: absolute;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(5, 5, 5, 0.95);
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    padding: 4px 8px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 1px;
}

.chakra-point:hover::after,
.chakra-point.active::after {
    opacity: 1;
    bottom: 120%;
}

/* --- RESONANCE REVEAL (MISSING STYLES) --- */

.resonance-row {
    margin-top: 30px;
    border-color: var(--glitch-red);
    box-shadow: 0 0 20px rgba(255, 0, 60, 0.2);
}

.interactive-row {
    cursor: pointer;
    transition: all 0.3s ease;
}

.interactive-row:hover {
    box-shadow: 0 0 30px rgba(255, 0, 60, 0.4);
    transform: scale(1.01);
}

.resonate-label {
    color: var(--glitch-red);
    border-right-color: var(--glitch-red);
    background: rgba(20, 0, 0, 0.5);
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.resonate-content {
    background: rgba(10, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.resonate-content.censored {
    cursor: pointer;
    background: repeating-linear-gradient(45deg,
            #111,
            #111 10px,
            #200 10px,
            #200 20px);
}

.resonate-content.censored:hover {
    box-shadow: inset 0 0 30px var(--glitch-red);
    border: 1px solid var(--glitch-red);
    transform: scale(1.02);
}

.div-scramble-text {
    font-family: 'Share Tech Mono', monospace;
    color: var(--glitch-red);
    text-align: center;
    z-index: 2;
}

.scramble-layer {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 10px;
    animation: glitchText 0.3s infinite;
}

.click-instruction {
    font-size: 0.8rem;
    color: #fff;
    opacity: 0.7;
    animation: pulse 1s infinite alternate;
}

.div-clear-text {
    display: none;
    /* Hidden until reveal */
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--gold-primary);
    font-size: 1.1rem;
    line-height: 1.6;
    padding: 20px;
    text-align: left;
    width: 100%;
    position: relative;
    z-index: 10;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.resonate-content.revealed {
    background: rgba(5, 5, 5, 0.95) !important;
    border: 1px solid var(--gold-dim);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
}

.resonate-content.revealed .div-clear-text {
    display: block !important;
    opacity: 1 !important;
    filter: none !important;
}

@keyframes glitchText {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }

    100% {
        transform: translate(0);
    }
}

@keyframes pulse {
    from {
        opacity: 0.5;
    }

    to {
        opacity: 1;
    }
}