/* ==========================================================================
   ELY USHIROMIYA · PERFECTLY BALANCED VICTORIAN MASTERPIECE (ely.zzzlatam.net)
   ========================================================================== */

:root {
    /* Vivian ZZZ Theme (Primary Default) */
    --bg-main: #120921;
    --bg-card: #1c0f33;
    --border-gold: #d4af37;
    --border-gold-glow: rgba(212, 175, 55, 0.45);
    --accent-purple: #c084fc;
    --accent-cyan: #06b6d4;
    --accent-spotlight: rgba(168, 85, 247, 0.25);
    --fog-color: rgba(168, 85, 247, 0.08);
    
    --text-gold: #e6cb72;
    --text-heading: #ffffff;
    --text-body: #f7f3ec;
    --text-muted: #cdbee0;

    --font-display: 'Cinzel', serif;
    --font-heading: 'Playfair Display', serif;
    --font-sub: 'Cormorant Garamond', serif;
    --font-body: 'EB Garamond', serif;
    --font-code: 'Fira Code', monospace;
}

[data-theme="lambdadelta"] {
    --bg-main: #1a081a;
    --bg-card: #2b0b28;
    --border-gold: #f59e0b;
    --accent-purple: #f43f5e;
    --accent-cyan: #facc15;
    --accent-spotlight: rgba(245, 158, 11, 0.25);
    --fog-color: rgba(245, 158, 11, 0.08);
    --text-gold: #fcd34d;
}

[data-theme="cocoa"] {
    --bg-main: #1a0814;
    --bg-card: #2b0b20;
    --border-gold: #f472b6;
    --accent-purple: #fb7185;
    --accent-cyan: #fbcfe8;
    --accent-spotlight: rgba(244, 114, 182, 0.25);
    --fog-color: rgba(244, 114, 182, 0.08);
    --text-gold: #f472b6;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg-main);
    background-image: 
        radial-gradient(ellipse at 50% 20%, var(--accent-spotlight) 0%, transparent 60%),
        linear-gradient(to bottom, var(--bg-main) 0%, #0a0412 100%);
    color: var(--text-body);
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.5;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    position: relative;
    transition: background 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 960px) {
    body {
        height: auto;
        overflow-y: auto;
    }
}

/* Background Canvas Layers */
#fogCanvas, #rainCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
}
#fogCanvas { z-index: -2; }
#rainCanvas { z-index: -1; }

.ambient-spotlight {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 780px;
    height: 780px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-spotlight) 0%, transparent 70%);
    filter: blur(140px);
    z-index: -1;
    pointer-events: none;
    transition: background 0.6s ease;
}

/* Main Container Frame */
.victorian-frame {
    max-width: 1160px;
    height: 100vh;
    margin: 0 auto;
    padding: 1.2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 960px) {
    .victorian-frame {
        height: auto;
        padding: 2rem 1rem;
    }
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
}

.title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 900;
    color: var(--text-heading);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.1rem;
    text-shadow: 0 5px 20px rgba(0, 0, 0, 0.8);
}

.gold-text {
    color: var(--text-gold);
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.header-divider {
    font-family: var(--font-display);
    color: var(--border-gold);
    font-size: 1rem;
    letter-spacing: 0.3em;
    margin: 0.2rem 0;
}

/* Main 2-Column Grid Layout */
.main-grid {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 1.5rem;
    align-items: stretch;
}

@media (max-width: 960px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

/* Victorian Base Card */
.victorian-card {
    background: var(--bg-card);
    border: 2px solid var(--border-gold);
    position: relative;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7), inset 0 0 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

/* Corner Ornaments */
.corner-ornament {
    position: absolute;
    color: var(--border-gold);
    font-size: 1rem;
    pointer-events: none;
    z-index: 2;
}

.top-left { top: 8px; left: 10px; }
.top-right { top: 8px; right: 10px; }
.bottom-left { bottom: 8px; left: 10px; }
.bottom-right { bottom: 8px; right: 10px; }

/* Left Side: Profile Card */
.profile-card {
    padding: 1.5rem 1.4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.8rem;
    height: 100%;
}

.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.6rem;
}

.pfp-container {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    border: 2px solid var(--border-gold);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.8);
    flex-shrink: 0;
}

.pfp-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pfp-gold-ring {
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.5);
    pointer-events: none;
}

.profile-names {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.profile-display-name {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-heading);
    line-height: 1.1;
}

.profile-username {
    font-family: var(--font-code);
    font-size: 0.88rem;
    color: var(--text-gold);
}

.profile-role {
    background: #120921;
    border: 1px solid var(--border-gold);
    color: var(--text-gold);
    font-family: var(--font-display);
    font-size: 0.72rem;
    padding: 0.2rem 0.6rem;
    letter-spacing: 0.1em;
    margin-top: 0.2rem;
}

.ornamental-line {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-gold), transparent);
    width: 100%;
}

.profile-bio {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-body);
    line-height: 1.5;
    text-align: center;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    width: 100%;
}

.stat-cell {
    background: #120921;
    border: 1px solid rgba(212, 175, 55, 0.4);
    padding: 0.5rem;
    text-align: center;
}

.stat-cell-val {
    display: block;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-gold);
}

.stat-cell-lbl {
    font-family: var(--font-sub);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Right Side: Showcase Section */
.showcase-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

/* Navigation Tabs */
.nav-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
}

.tab-btn {
    background: var(--bg-card);
    border: 2px solid var(--border-gold);
    padding: 0.65rem 1rem;
    color: var(--text-body);
    cursor: pointer;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.tab-btn:hover {
    background: rgba(212, 175, 55, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px var(--border-gold-glow);
}

.tab-btn.active {
    background: #2a164a;
    border-color: var(--border-gold);
    box-shadow: 0 0 18px var(--border-gold-glow);
}

.tab-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-heading);
}

/* Character Showcase Card */
.char-card {
    display: none;
    height: 100%;
}

.char-card.active {
    display: block;
    animation: fadeIn 0.4s ease;
    height: 100%;
}

.char-display-card {
    padding: 1.6rem;
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.6rem;
    align-items: center;
    height: 100%;
}

@media (max-width: 880px) {
    .char-display-card {
        grid-template-columns: 1fr;
    }
}

.char-image-frame {
    position: relative;
    height: 280px;
    border: 2px solid var(--border-gold);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    background: #0d0617;
}

.char-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.5s ease;
}

.char-image-frame:hover .char-img {
    transform: scale(1.04);
}

.img-frame-gold {
    position: absolute;
    inset: 5px;
    border: 1px solid rgba(212, 175, 55, 0.45);
    pointer-events: none;
}

.char-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.char-header-wrap {
    display: flex;
    flex-direction: column;
}

.char-title {
    font-family: var(--font-heading);
    font-size: 2.3rem;
    font-weight: 800;
    color: var(--text-heading);
    line-height: 1.1;
}

.char-origin {
    font-family: var(--font-sub);
    font-size: 1.15rem;
    font-style: italic;
    color: var(--text-gold);
}

.char-desc {
    font-family: var(--font-body);
    font-size: 1.25rem;
    color: var(--text-body);
    line-height: 1.65;
}

.traits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-top: 0.4rem;
}

.trait-box {
    background: #120921;
    border: 1px solid rgba(212, 175, 55, 0.45);
    padding: 0.75rem 0.5rem;
    text-align: center;
}

.trait-label {
    display: block;
    font-family: var(--font-sub);
    font-size: 0.88rem;
    color: var(--text-muted);
}

.trait-val {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-gold);
}

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