/* Custom styles inspired by ShadCN and v0.dev */
@font-face {
    font-family: 'Avenir';
    src: url('Avenir/Avenir/Avenir Regular/Avenir Regular.ttf') format('truetype');
}

body {
    font-family: 'Avenir', sans-serif;
    background-color: #030712; /* Deep charcoal/almost black */
    color: #d1d5db; /* Light gray text */
}

.no-scroll {
    overflow: hidden;
}

.no-scroll {
    overflow: hidden;
}

body.light-theme {
    background-color: #f3f4f6; /* Lighter background for light theme */
    color: #374151; /* Darker text for light theme */
    --prose-text-color: #374151; /* Darker text for light mode */
}

body.light-theme .custom-input {
    background-color: #f9fafb;
    border-color: #d1d5db;
}

body.light-theme .custom-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(37, 147, 255, 0.2);
}

body.light-theme #theme-toggle {
    background-color: #e5e7eb;
    color: #4b5563;
}

#home-screen {
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 25px 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

body.light-theme #home-screen {
    background-image: linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

body.light-theme aside {
    background-color: #ffffff;
    border-color: #e5e7eb;
}

body.light-theme aside .text-gray-200 {
    color: #374151; /* Darker text for headings in light mode sidebar */
}

body.light-theme aside .text-gray-500 {
    color: #4b5563; /* Darker text for icons in light mode sidebar */
}

body.light-theme aside .border-gray-800 {
    border-color: #d1d5db; /* Lighter borders in light mode sidebar */
}

/* Accent color variables for easy theming */
:root {
    --accent-color: #2593ff; /* Nord blue */
    --accent-color-hover: #5cafff;
    --accent-color-focus-ring: rgba(37, 147, 255, 0.4);
    --prose-text-color: #d1d5db; /* Default for dark mode */
}

/* Custom input styling */
.custom-input {
    background-color: #111827;
    border: 2px solid #374151;
    transition: border-color 0.1s ease-out, box-shadow 0.1s ease-out;
    /* Removed Nord blue glow */
}
.custom-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px var(--accent-color-focus-ring); /* Focus ring only */
}

/* Custom button styling */
.custom-button {
    background-color: var(--accent-color);
    color: #030712;
    transition: background-color 0.2s;
}

#idea-form {
    width: 70%; /* Slightly wider */
    margin: 0 auto; /* Center the form */
}
.custom-button:hover {
    background-color: var(--accent-color-hover);
}

.custom-button-secondary {
    background-color: #1f2937; /* Dark gray */
    color: #d1d5db; /* Light gray text */
    border: 1px solid #374151;
    transition: background-color 0.2s;
}

#chat-and-canvas {
    width: 100%;
}

aside {
    width: 30%;
}

#canvas {
    width: 70%;
    margin: 0 auto;
    max-width: 1200px;
}

.custom-button-secondary:hover {
    background-color: #374151;
}

/* Unique Button Colors */
.custom-button.plan {
    background-color: #2593ff; /* Blue */
}
.custom-button-secondary.ppt {
    background-color: #1f2937;
    border-color: #4f46e5; /* Indigo */
}
.custom-button-secondary.ppt:hover {
    background-color: #312e81;
}
.custom-button-secondary.cofounder {
    background-color: #1f2937;
    border-color: #16a34a; /* Green */
}
.custom-button-secondary.cofounder:hover {
    background-color: #15803d;
}

body.light-theme h1,
body.light-theme p {
    color: #374151; /* Darker text for light theme */
}

body.light-theme .custom-button {
    background-color: var(--accent-color); /* Keep accent color */
    color: #f3f4f6; /* Lighter text for light theme button */
}

body.light-theme #glowing-circle div {
    background-color: var(--accent-color);
    opacity: 0.2; /* Adjust opacity for light theme to be more pronounced */
}

#glowing-circle div {
    filter: blur(60px); /* More blurred */
}

/* Custom scrollbar for a modern look */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #111827;
}
::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* Animation for highlighting updated content */
@keyframes highlight-fade {
    from { background-color: rgba(45, 212, 191, 0.2); }
    to { background-color: transparent; }
}
.highlight-update {
    animation: highlight-fade 2s ease-out forwards;
}

/* Enhanced Prose/Markdown Styling */
#canvas-content {
    font-size: 1.1rem; /* Increase base font size */
    line-height: 1.6;
}

#canvas-content h1 {
    font-size: 2.5em;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 1rem; /* Adjusted for more space */
    padding-bottom: 0.3em;
    border-bottom: 1px solid #4b5563;
}

#canvas-content h2 {
    font-size: 2em;
    font-weight: 500;
    margin-top: 1.25rem; /* Adjusted for more space */
    margin-bottom: 0.75rem; /* Adjusted for more space */
    padding-bottom: 0.3em;
    border-bottom: 1px solid #4b5563;
}

#canvas-content h3 {
    font-size: 1.5em;
    font-weight: 600;
    margin-top: 1rem; /* Adjusted for more space */
    margin-bottom: 0.5rem; /* Adjusted for more space */
}

#canvas-content p, #canvas-content ul, #canvas-content ol {
    margin-bottom: 0.75rem; /* Adjusted for more space */
}

#canvas-content hr {
    height: 1px;
    border: none;
    background-color: #4b5563;
    margin: 1.5rem 0; /* Adjusted for more space */
}

body.light-theme #canvas-content hr {
    background-color: #d1d5db; /* Subtle line in light mode */
}

#canvas-content blockquote {
    font-style: italic;
    padding-left: 1.5em;
    border-left-width: 4px;
    border-color: var(--accent-color);
    color: #a1a1aa;
    margin: 1rem 0;
}


.status-indicator {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-indicator.thinking {
    background-color: #1f2937;
    color: #d1d5db;
}

.status-indicator.success {
    background-color: #16a34a;
    color: #f0fdf4;
}

.status-indicator .spinner {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 2px solid #4b5563;
    border-top-color: #2593ff;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Canvas content wrapping and table styling */
#canvas-content, #canvas-content * {
    word-wrap: break-word;
    max-width: 100%;
}

#canvas-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    border-collapse: collapse;
    width: 100%;
    margin: 1.5rem 0;
    border: 1px solid #4b5563;
    border-radius: 8px;
}

#canvas-content th, #canvas-content td {
    padding: 1em;
    border: 1px solid #374151;
    color: var(--prose-text-color); /* Use variable for theme-adaptive color */
}

#canvas-content th {
    background-color: #1f2937;
    font-weight: 600;
}

body.light-theme #canvas-content th {
    background-color: #e5e7eb; /* Lighter background for light theme table header */
    color: #1f2937; /* Darker text for light theme table header */
}

body.light-theme #canvas-content td {
    color: #374151; /* Ensure table data text is visible in light theme */
}

/* New styles for the dynamic stop/send button */
.stop-icon-container {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #ef4444; /* Red color */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.stop-icon-container .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Keyframe for the spinner animation already exists, but ensure it's accessible */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
/* --- Feasibility Score Styles --- */
.feasibility-score-container {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
    background-color: #1a202c;
    border-radius: 1rem;
    border: 1px solid #2d3748;
    margin-bottom: 2rem;
}

.score-circle-container {
    flex-shrink: 0;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #4c51bf, #6b46c1, #b794f4, #4c51bf);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    position: relative;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.score-number {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.score-label {
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.score-details {
    flex-grow: 1;
}

.score-summary {
    font-size: 1.125rem;
    font-style: italic;
    color: #a0aec0;
    margin-bottom: 1.5rem;
    border-left: 3px solid #6b46c1;
    padding-left: 1rem;
}

.score-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.breakdown-item {
    background-color: #2d3748;
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
}

.breakdown-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #a0aec0;
    margin-bottom: 0.25rem;
}

.breakdown-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}