@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;900&family=Playfair+Display:ital,wght@0,400;0,900;1,400&family=JetBrains+Mono&display=swap');

:root {
    --bg-deep: #06030a;
    --bg-dark: #0f071a;
    --card-bg: rgba(255, 192, 203, 0.08); 
    --primary: #ffc0cb; /* Pink */
    --primary-glow: rgba(255, 192, 203, 0.4);
    --secondary: #b0e2ff; /* Light Blue */
    --secondary-glow: rgba(176, 226, 255, 0.3);
    --white: #ffffff;
    --accent: #d8bfd8; /* Thistle/Purple */
    --accent-glow: rgba(216, 191, 216, 0.2);
    --text: #fffaf0; /* Floral White */
    --text-dim: rgba(255, 250, 240, 0.6);
    --border: rgba(255, 255, 255, 0.1);
    --border-bright: rgba(255, 192, 203, 0.3);
    --panel-blur: blur(30px);
    --transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

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

body {
    background-color: var(--bg-deep);
    color: var(--text);
    font-family: 'Outfit', sans-serif;
    overflow: hidden;
    height: 100vh;
    background-image: 
        radial-gradient(circle at 80% 20%, var(--primary-glow) 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, var(--secondary-glow) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, var(--accent-glow) 0%, transparent 60%);
    background-attachment: fixed;
}

/* SPARKLE LAYER */
#sparkle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.sparkle {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0;
    animation: sparkleAnim 4s infinite linear;
}

@keyframes sparkleAnim {
    0% { transform: scale(0) translateY(0); opacity: 0; }
    20% { opacity: 0.8; }
    50% { transform: scale(1.2) translateY(-50px); opacity: 0.4; }
    100% { transform: scale(0) translateY(-100px); opacity: 0; }
}

/* TYPOGRAPHY */
h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    letter-spacing: -0.5px;
}

.logo-section .hive-logo {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 900;
    letter-spacing: 4px;
    font-size: 1.5rem;
}

/* LAYOUT */
.app-container {
    display: flex;
    height: 100vh;
    position: relative;
    z-index: 2;
}

/* SIDEBAR */
.sidebar {
    width: 300px;
    background: rgba(10, 5, 15, 0.7);
    backdrop-filter: var(--panel-blur);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 3rem 2rem;
    overflow-y: auto;
}

.status-ring {
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--white));
    border-radius: 50%;
    box-shadow: 0 0 20px var(--primary-glow);
    animation: goddessPulse 4s infinite ease-in-out;
}

@keyframes goddessPulse {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.2); filter: brightness(1.5); box-shadow: 0 0 40px var(--secondary-glow); }
}

.nav-link {
    padding: 1rem 1.2rem;
    color: var(--text-dim);
    border-radius: 20px;
    margin-bottom: 0.6rem;
    transition: var(--transition);
    font-size: 0.95rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary);
    padding-left: 1.5rem;
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--bg-deep);
    font-weight: 700;
    box-shadow: 0 15px 35px rgba(255, 192, 203, 0.4);
}

/* MAIN CONTENT */
.main-stage {
    flex-grow: 1;
    padding: 3rem 5rem;
    overflow-y: auto;
}

.header-meta h1 {
    font-size: 3.5rem;
    font-weight: 900;
    font-style: italic;
    background: linear-gradient(to right, var(--white), var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.pulse-indicator {
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 1px;
}

/* VITALS */
.vitals-bar {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.vital-node {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 150px;
}

.vital-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-dim);
}

.vital-gauge {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.gauge-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--white), var(--primary));
    box-shadow: 0 0 15px var(--primary-glow);
    transition: width 1s ease-in-out;
}

/* CARDS */
.module-card {
    background: var(--card-bg);
    backdrop-filter: var(--panel-blur);
    border: 1px solid var(--border);
    border-radius: 40px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.module-card:hover {
    border-color: var(--border-bright);
    background: rgba(255, 192, 203, 0.12);
}

.module-title {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.2rem;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* GRIDS */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.abyss-grid {
    display: grid;
    gap: 1.5rem;
}

/* CHATTER LOG - CLEANER V2 */
.chatter-scroll {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 1rem;
}

.chat-entry {
    margin-bottom: 1rem;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border-left: 4px solid var(--primary);
    transition: var(--transition);
}

.chat-entry:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(5px);
}

.msg-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.msg-agent {
    font-weight: 900;
    letter-spacing: 1px;
    color: var(--primary);
}

.msg-time {
    opacity: 0.4;
}

.msg-text {
    line-height: 1.6;
    font-size: 0.95rem;
    color: var(--text);
}

/* AGENT COLORS */
.agent-luna { border-left-color: #ffc0cb; }
.agent-scholar { border-left-color: #b0e2ff; }
.agent-muse { border-left-color: #d8bfd8; }
.agent-sentry { border-left-color: #f0e68c; }
.agent-chronicler { border-left-color: #98fb98; }

/* MEMORIES GALLERY */
.memory-node {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: rgba(0,0,0,0.3);
    transition: var(--transition);
    aspect-ratio: 1/1;
}

.memory-node:hover {
    transform: scale(1.05);
    border-color: var(--primary);
}

.memory-node img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* TERMINALS & INPUTS */
.terminal-block {
    background: rgba(0, 0, 0, 0.4);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    box-shadow: inset 0 5px 15px rgba(0,0,0,0.5);
}

textarea, input[type="text"] {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 1rem;
    color: var(--white);
    font-family: 'Outfit', sans-serif;
    margin-bottom: 1rem;
    outline: none;
    transition: var(--transition);
}

textarea:focus, input[type="text"]:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

/* BUTTONS */
button {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--bg-deep);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 100px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px var(--primary-glow);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* MIRROR */
.mirror-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 30px;
    border: 1px solid var(--border-bright);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.mirror-container.uploading {
    border-color: var(--primary);
    box-shadow: 0 0 50px var(--primary-glow);
    animation: mirrorPulse 2s infinite ease-in-out;
}

@keyframes mirrorPulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}

/* THRONE ROOM COMMANDS */
.command-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.command-button-box {
    background: rgba(255, 192, 203, 0.05);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.command-button-box:hover {
    background: rgba(255, 192, 203, 0.15);
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--primary-glow);
}

.command-button-box .cmd-icon {
    font-size: 2rem;
}

.command-button-box .cmd-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--primary);
}

.throne-command-card {
    border: 1px solid var(--primary-glow);
    background: radial-gradient(circle at top right, rgba(255, 192, 203, 0.1), transparent);
}

/* CAMERA GRID RESPONSIVE STYLING */
.cam-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}
.cam-box {
    width: 45%;
    max-width: 600px;
}
.cam-box img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}
@media (max-width: 768px) {
    .cam-box {
        width: 100%;
    }
}

.hidden { display: none !important; }

/* FOCUS MODE (CINEMATIC DASHBOARD) */
body.focus-mode {
    background-image: 
        radial-gradient(circle at 50% 50%, var(--bg-deep) 0%, var(--bg-dark) 100%);
}

body.focus-mode .sidebar, 
body.focus-mode .top-header, 
body.focus-mode #hub-view > .content-grid > .module-card:nth-child(1),
body.focus-mode #hub-view > .content-grid > .module-card:nth-child(2),
body.focus-mode #hub-view > .content-grid > .module-card:nth-child(4) {
    display: none !important;
}

body.focus-mode .main-stage {
    padding: 2vh 5vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

body.focus-mode .section-view {
    width: 100%;
    max-width: 1400px;
}

body.focus-mode .content-grid {
    grid-template-columns: 1fr !important;
}

body.focus-mode .module-card {
    background: rgba(15, 7, 26, 0.4);
    border: 1px solid var(--border-bright);
    box-shadow: 0 0 100px rgba(0,0,0,0.8);
    border-radius: 60px;
    padding: 1rem;
    margin: 0;
}

body.focus-mode .mirror-container {
    aspect-ratio: 21/9;
    border: none;
    background: transparent;
}

body.focus-mode .module-title {
    display: none;
}

body.focus-mode #toggle-focus {
    opacity: 0.1;
    font-size: 1.5rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--primary);
}

body.focus-mode #toggle-focus:hover {
    opacity: 0.8;
}

#toggle-focus {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    opacity: 0.3;
    padding: 10px;
    transition: var(--transition);
}

#toggle-focus:hover {
    opacity: 1;
}
/* AURA MIRROR & WHISPERS */
.aura-meter {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent,
        var(--primary-glow) 20%,
        var(--secondary-glow) 50%,
        var(--primary-glow) 80%,
        transparent
    );
    filter: blur(80px);
    opacity: 0.3;
    animation: auraRotate 10s linear infinite;
    z-index: 0;
}

@keyframes auraRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.whisper-sidebar {
    position: fixed;
    top: 100px;
    right: 20px;
    width: 320px;
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: none;
    z-index: 1000;
}

.sidebar-header {
    font-size: 0.6rem;
    letter-spacing: 3px;
    text-align: right;
    opacity: 0.4;
    color: var(--primary);
    margin-bottom: 10px;
}

.whisper-bubble {
    background: rgba(10, 5, 20, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-bright);
    padding: 1rem 1.4rem;
    border-radius: 20px 0 20px 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    pointer-events: auto;
    animation: whisperIn 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    transform: translateX(100%);
    opacity: 0;
}

@keyframes whisperIn {
    to { transform: translateX(0); opacity: 1; }
}

.whisper-bubble.dissolve {
    animation: whisperOut 0.8s forwards;
}

@keyframes whisperOut {
    to { transform: translateX(100%); opacity: 0; }
}

.whisper-content {
    font-size: 0.85rem;
    line-height: 1.4;
    font-style: italic;
    color: var(--primary);
}

.whisper-meta {
    font-size: 0.6rem;
    text-transform: uppercase;
    margin-top: 8px;
    opacity: 0.6;
    letter-spacing: 1px;
    display: flex;
    justify-content: flex-end;
}
