/* =======================================================
   VIOLET REIGN STUDIO — ENHANCED UI THEME
   Soft-glass panels, subtle glow, luxury violet gradients
   ======================================================= */

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

/* ----------------------------------------
   TRANSITIONS (FIXED)
----------------------------------------- */

/* REMOVE transition from body to allow custom transition */
button, input, select {
    transition: 0.25s ease-in-out;
}

/* Smooth background fade */
body {
    transition: background 0.8s ease-in-out;
    will-change: background;
    font-family: 'Inter', sans-serif;
}

/* Avatar shimmer transitions */
#activePenAvatar {
    transition: box-shadow 0.6s ease-in-out, transform 0.5s ease-in-out;
    will-change: box-shadow, transform;
}

/* Mode-specific avatar glow */
#activePenAvatar.violet-mode {
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.85);
    transform: scale(1.06);
}

#activePenAvatar.eden-mode {
    box-shadow: 0 0 25px rgba(255, 215, 140, 0.9);
    transform: scale(1.06);
}

/* Author mode buttons transition */
.author-btn,
.active-author-btn {
    transition: background 0.4s ease-in-out, box-shadow 0.45s ease-in-out, transform 0.25s ease-in-out;
    will-change: background, box-shadow;
}

/* Header shimmer transition */
.glass-header {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.25),
        inset 0 0 20px rgba(255, 255, 255, 0.04);
    transition: border-color 0.6s ease-in-out;
    will-change: border-color;
}

/* ----------------------------------------
   PANEL + UI STYLING
----------------------------------------- */

.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1.25rem;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.25),
        inset 0 0 30px rgba(255, 255, 255, 0.03);
}

/* ----------------------------------------
   TOOL CARDS
----------------------------------------- */

.tool-card {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.25s ease-in-out;
}

.tool-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

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

.author-btn {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    color: #d9c8ff;
    font-weight: 500;
}

.author-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 10px rgba(147, 51, 234, 0.4);
}

.active-author-btn {
    background: rgba(147, 51, 234, 0.35);
    border-color: rgba(147, 51, 234, 0.7);
    box-shadow: 0 0 20px rgba(147, 51, 234, 0.5);
}

/* ----------------------------------------
   CHAT PANEL
----------------------------------------- */

#chatMessages {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1rem;
    overflow-y: auto;
}

/* Messages */
.message-user {
    background: rgba(147, 51, 234, 0.3);
    padding: 0.6rem 1rem;
    border-radius: 0.75rem;
    margin-bottom: 0.45rem;
    max-width: 85%;
    align-self: flex-end;
}

.message-ai {
    background: rgba(255, 255, 255, 0.07);
    padding: 0.6rem 1rem;
    border-radius: 0.75rem;
    margin-bottom: 0.45rem;
    max-width: 85%;
    align-self: flex-start;
}

/* ----------------------------------------
   INPUT BAR
----------------------------------------- */

#messageInput {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 0.75rem;
    padding: 0.6rem;
}

#sendBtn {
    background: #9333ea;
    transition: background 0.3s ease-in-out;
}

#sendBtn:hover {
    background: #7e22ce;
}

/* ----------------------------------------
   TABS
----------------------------------------- */

.tab-button {
    background: rgba(255, 255, 255, 0.06);
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: background 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.tab-button.active {
    background: rgba(147, 51, 234, 0.35);
    border-color: rgba(147, 51, 234, 0.6);
    box-shadow: 0 0 12px rgba(147, 51, 234, 0.4);
}
