/* =========================================================
SHARED.CSS
Common styles used by both index.css and gallery.css
========================================================= */

/* ---------- DESIGN TOKENS ---------- */

:root {
--bg-color: #0f172a !important;
--card-bg: rgba(15, 23, 42, 0.75);
--accent-color: #38bdf8;
--text-main: #f8fafc;
--text-dim: #94a3b8;


/* Default values - individual CSS files may override */
--max-width: 520px;
--side-gap: 48px;


}

/* ---------- BASE STYLES ---------- */

a {
color: var(--accent-color);
text-decoration: none;
}

a:hover {
text-decoration: underline;
}

body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: var(--bg-color);
color: var(--text-main);
margin: 0;
display: flex;
flex-direction: column;
align-items: center;
overflow-x: hidden;
}

#neuralCanvas {
position: fixed;
inset: 0;
z-index: -1;
background: #0f172a !important;
touch-action: pan-y;
}

/* ---------- LAYOUT ---------- */

.content-wrap {
width: 100%;
max-width: var(--max-width);
padding-left: var(--side-gap);
padding-right: var(--side-gap);
box-sizing: border-box;
margin: 0 auto;
}

.container {
margin-top: 56px;
margin-bottom: 56px;
padding: 2rem;
background: var(--card-bg);
backdrop-filter: blur(12px);
border-radius: 20px;
border: 2px solid rgba(56,189,248,0.35);
text-align: center;
}

.grid {
display: flex;
flex-direction: column;
gap: 64px;
padding-bottom: 80px;
}

.char-card {
background: var(--card-bg);
backdrop-filter: blur(12px);
border-radius: 20px;
border: 2px solid rgba(56,189,248,0.25);
padding: 20px;
display: flex;
flex-direction: column;
gap: 20px;
}

@media (min-width: 600px) {


.main-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.char-info {
    flex: 1;
}

.char-main-img {
    width: 220px !important;
}


}

@media (max-width: 500px) {


:root {
    --side-gap: 16px;
}

.avatar-portal-wrap {
    gap: 15px;
}


}

.char-main-img {
width: 100%;
border-radius: 12px;
}

h2 {
margin: 0;
color: var(--accent-color);
}

/**************
 TABLE SUPPORT
**************/

table {
    border-collapse: collapse;
    width: 100%;
    table-layout: fixed;
    background-color: transparent;
}

th,
td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: left;
    font-size: 0.9em;
    background-color: transparent;

    overflow-wrap: anywhere;
    word-break: break-word;
}

th {
    font-weight: bold;
}

.session-key {
    font-family: monospace;
    line-height: 1.4;
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 500px) {

    table {
        font-size: 0.8rem;
    }

    th,
    td {
        padding: 4px;
    }
}

/* ---------- STATUS BADGES ---------- */

.status-badge {
display: inline-flex;
align-items: center;
justify-content: center;
width: fit-content;
margin: 0 auto 0.5rem auto;
padding: 0.25rem 0.75rem;
background: rgba(56, 189, 248, 0.1);
color: var(--accent-color);
border-radius: 999px;
font-size: 0.8rem;
font-weight: bold;
text-transform: uppercase;
letter-spacing: 0.05em;
}

/* ---------- DETAILS ---------- */

details {
background: rgba(0,0,0,0.25);
padding: 12px;
border-radius: 10px;
border: 1px solid rgba(56,189,248,0.15);
}

summary {
cursor: pointer;
color: var(--accent-color);
font-weight: bold;
padding: 6px 4px;
}

.full-desc {
padding: 10px;
font-size: 0.9rem;
color: var(--text-dim);
line-height: 1.6;
text-align: left;
}

/* ---------- TAG PREVIEWS ---------- */

.tag-preview-mini {
display: block;
font-size: 0.75rem;
color: var(--text-dim);
margin-top: 8px;
opacity: 0.8;
letter-spacing: 0.5px;
font-style: italic;
}

.tag-label {
font-weight: bold;
color: var(--accent-color);
margin-right: 4px;
text-transform: uppercase;
font-size: 0.7rem;
font-style: normal;
}

/* ---------- BUTTONS ---------- */

.links {
display: flex;
gap: 10px;
margin-top: 15px;
flex-wrap: wrap;
}

.btn {
padding: 8px 12px;
border-radius: 8px;
font-size: 0.75rem;
font-weight: bold;
text-decoration: none;
background: rgba(56, 189, 248, 0.1);
color: var(--accent-color);
border: 1px solid var(--accent-color);
transition: 0.2s;
cursor: pointer;
}

.btn:hover {
background: var(--accent-color);
color: #0f172a;
}

.btn-chub {
border-color: #f8fafc;
color: #f8fafc;
}

.btn,
.btn:hover,
.btn:active,
.btn:focus {
text-decoration: none !important;
}

/* ---------- TOAST ---------- */

#copy-toast {
position: fixed;
bottom: 30px;
left: 50%;
transform: translateX(-50%) translateY(100px);
background: rgba(15,23,42,0.9);
color: var(--accent-color);
padding: 12px 24px;
border-radius: 999px;
border: 1px solid var(--accent-color);
opacity: 0;
transition: all 0.4s ease;
z-index: 3000;
}

#copy-toast.show {
transform: translateX(-50%) translateY(0);
opacity: 1;
}

/* ---------- FOOTER ---------- */

.footer {
font-size: 0.8rem;
opacity: 0.6;
text-align: center;
}

/* ---------- AVATAR PORTALS ---------- */

.avatar-portal-wrap {
display: flex;
justify-content: center;
flex-wrap: wrap;
gap: 30px;
margin: 20px 0;
}

.portal-link {
position: relative;
width: 80px;
height: 80px;
border-radius: 50%;
border: 2px solid var(--accent-color);
box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
overflow: hidden;
transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portal-link img {
width: 100%;
height: 100%;
object-fit: cover;
}

.portal-link:hover {
transform: scale(1.1);
box-shadow: 0 0 25px rgba(56, 189, 248, 0.8);
border-color: #fff;
}

.portal-container {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
text-decoration: none !important;
}

.portal-label {
font-size: 0.7rem;
font-weight: bold;
color: var(--accent-color);
text-transform: uppercase;
letter-spacing: 1px;
}

/* ---------- ORBITAL OVERLAY ---------- */

.overlay {
position: fixed;
inset: 0;
background: rgba(10, 15, 28, 0.98);
backdrop-filter: blur(15px);
z-index: 2000;
display: none;
justify-content: center;
align-items: center;
opacity: 0;
transition: opacity 0.4s ease;
}

.overlay.active {
display: flex;
opacity: 1;
}

.close-orbit {
position: absolute;
top: 20px;
right: 30px;
font-size: 2.5rem;
color: var(--accent-color);
cursor: pointer;
z-index: 2001;
}

#orbit-wrap {
position: relative;
width: 95vw;
height: 95vh;
max-width: 900px;
max-height: 900px;
}

.orbit-sun {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 140px;
height: 140px;
border-radius: 50%;
border: 3px solid var(--accent-color);
box-shadow: 0 0 30px rgba(56, 189, 248, 0.5);
z-index: 5;
object-fit: cover;
animation: sunPulse 4s infinite ease-in-out;
}

#orbitCanvas {
width: 100%;
height: 100%;
}

/* ---------- ANIMATIONS ---------- */

@keyframes sunPulse {
0%, 100% {
transform: translate(-50%, -50%) scale(1);
}


50% {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 0 50px rgba(56, 189, 248, 0.7);
}


}

.signal-pulse {
position: absolute;
inset: 0;
border-radius: 16px;
border: 2px solid rgba(56, 189, 248, 0.7);
z-index: 1;
pointer-events: none;
animation: signalPulse 0.9s ease-out forwards;
}

@keyframes signalPulse {
0% {
transform: scale(1);
opacity: 0.9;
box-shadow: 0 0 10px rgba(56,189,248,0.6);
}


70% {
    opacity: 0.35;
}

100% {
    transform: scale(1.18);
    opacity: 0;
    box-shadow: 0 0 40px rgba(56,189,248,0);
}


}

.char-img-wrap {
position: relative;
display: inline-block;
border-radius: 12px;
overflow: visible;
}

.char-main-img.signal-active {
box-shadow:
0 0 25px rgba(56,189,248,0.45),
0 0 60px rgba(56,189,248,0.18);


transform: scale(1.015);


}
