/* style.css - A clean and modern refresh */

/* --- Variables and Basic Setup --- */
:root {
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --text-color: #333;
    --light-text: #6c757d;
    --bg-color: #f8f9fa;
    --panel-bg: #ffffff;
    --border-color: #dee2e6;
    --shadow: 0 2px 4px rgba(0,0,0,0.05);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* --- Layout --- */
.main-container {
    display: flex;
    height: 100vh;
    gap: 2rem;
    padding: 1.5rem;
}

.left-panel, .right-panel {
    background-color: var(--panel-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 1.5rem 2rem;
    overflow-y: auto;
}

.left-panel {
    flex: 1;
    max-width: 400px;
}

.right-panel {
    flex: 2;
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0;
}

/* --- Header & Navigation --- */
header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.header-link, .header-link:visited {
    text-decoration: none;
    color: var(--text-color);
}

header nav {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

header nav a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.2s ease-in-out;
}

header nav a:hover {
    color: var(--primary-hover);
}

.hidden { display: none; }

/* --- Persona Library (Left Panel) --- */
#tag-filter {
    width: 100%;
    margin-bottom: 1rem;
}

#avatar-list {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.persona-card {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    transition: box-shadow 0.2s ease-in-out;
}

.persona-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

.persona-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.persona-card-header strong {
    font-size: 1.1rem;
}

.persona-card .description {
    font-size: 0.9rem;
    color: var(--light-text);
    margin-bottom: 0.75rem;
}

.rating-display {
    font-size: 0.8rem;
    color: var(--light-text);
    margin-top: 0.75rem;
}

.rating-widget {
    cursor: pointer;
    display: inline-block;
    margin-left: 0.5rem;
}

.star:hover {
    color: var(--primary-color);
}

/* --- Forms (Right Panel) --- */
h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

form input[type="text"],
form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-family);
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

form input[type="text"]:focus,
form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

form input[type="file"] {
    margin-bottom: 1.5rem;
}

/* --- Buttons --- */
.form-actions {
    display: flex;
    gap: 1rem; /* This adds space between buttons */
    margin-top: 1rem;
}

.action-button {
    border: none;
    border-radius: 5px;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.action-button:hover {
    transform: translateY(-1px);
}

/* Primary Button Style */
.action-button {
    background-color: var(--primary-color);
    color: white;
}
.action-button:hover {
    background-color: var(--primary-hover);
}
.action-button:disabled {
    background-color: #a0c3e6;
    cursor: not-allowed;
    transform: none;
}

/* Secondary Button Style */
.action-button.secondary {
    background-color: #e9ecef;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}
.action-button.secondary:hover {
    background-color: #dee2e6;
}

/* --- Conversation Page Specific --- */
.message-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}
.message-card h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}
.persona-message {
    background-color: var(--panel-bg);
}
.user-message {
    background-color: #e7f3ff;
    border-color: #b3d7ff;
}/* --- Additions for Library and Single Panel Pages --- */

.single-panel-container {
    max-width: 900px;
    margin: 0 auto; /* Centers the content */
    padding: 1.5rem;
}

.single-panel-container header {
    margin-bottom: 2rem;
    text-align: center;
}

#conversation-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.conversation-card {
    display: block;
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.conversation-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
}

.conversation-card h3 {
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.conversation-card .summary {
    color: var(--light-text);
    margin-bottom: 1rem;
}

.conversation-card .card-footer {
    font-size: 0.8rem;
    color: #888;
    text-align: right;
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

