/* Material 3 Design System - Neutral Gray Theme */
:root {
    /* Primary Colors - Gray */
    --md-sys-color-primary: #a5a5a5;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #E8E8E8;
    --md-sys-color-on-primary-container: #1A1A1A;

    /* Surface Colors */
    --md-sys-color-surface: #FFFFFF;
    --md-sys-color-on-surface: #1A1A1A;
    --md-sys-color-surface-variant: #F0F0F0;
    --md-sys-color-on-surface-variant: #505050;

    /* Background */
    --md-sys-color-background: #FFFFFF;
    --md-sys-color-on-background: #1A1A1A;

    /* Outline */
    --md-sys-color-outline: #757575;
    --md-sys-color-outline-variant: #D0D0D0;

    /* Shadows */
    --md-sys-elevation-1: 0 1px 2px rgba(0, 0, 0, 0.05);
    --md-sys-elevation-2: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --md-sys-elevation-3: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);

    /* Message Colors */
    --user-message-bg: #E8E8E8;
    --ai-message-bg: #F5F5F5;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #FFFFFF;
    color: var(--md-sys-color-on-background);
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('kitchen-pattern.jpg');
    background-repeat: repeat;
    background-size: 400px;
    opacity: 0.2;
    pointer-events: none;
    z-index: -1;
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.app-header {
    background: linear-gradient(135deg, #808080 0%, #a5a5a5 100%);
    padding: 16px 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-content .material-icons {
    font-size: 32px;
    color: #FFFFFF;
}

.header-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
}

.app-header h1 {
    font-size: 24px;
    font-weight: 500;
    color: #FFFFFF;
}

.clear-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.clear-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.clear-btn .material-icons {
    color: rgba(255, 255, 255, 0.9);
    font-size: 24px;
}

/* Tabs */
.tabs-container {
    display: flex;
    background-color: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 16px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #757575;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.tab-btn:hover {
    color: #505050;
    background-color: rgba(0, 0, 0, 0.04);
}

.tab-btn.active {
    color: #404040;
    border-bottom-color: #808080;
    background-color: #fff;
}

.tab-btn .material-icons {
    font-size: 20px;
}

/* Tab Content */
.tab-content {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.tab-content.active {
    display: flex;
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

/* Chat Section */
.chat-section {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background-color: var(--md-sys-color-background);
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
}

/* Welcome Message */
.welcome-message {
    text-align: center;
    padding: 48px 24px;
    color: var(--md-sys-color-on-surface-variant);
}

.welcome-message .material-icons {
    font-size: 64px;
    margin-bottom: 16px;
    color: var(--md-sys-color-primary);
}

.welcome-message h2 {
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 8px;
    color: var(--md-sys-color-on-surface);
}

.welcome-message p {
    font-size: 16px;
    font-weight: 300;
}

/* Message Bubbles */
.message {
    display: flex;
    gap: 12px;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    justify-content: flex-end;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message.user .message-avatar {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    order: 2;
}

.message.ai .message-avatar {
    background: linear-gradient(135deg, #808080 0%, #a5a5a5 100%);
    color: #FFFFFF;
}

.ai-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 16px;
    word-wrap: break-word;
}

.message.user .message-content {
    background-color: var(--user-message-bg);
    color: var(--md-sys-color-on-surface);
    border-bottom-right-radius: 4px;
}

.message.ai .message-content {
    background-color: var(--ai-message-bg);
    color: var(--md-sys-color-on-surface);
    border-bottom-left-radius: 4px;
}

.message-text {
    font-size: 15px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.message-time {
    font-size: 12px;
    color: var(--md-sys-color-on-surface-variant);
    margin-top: 4px;
    display: block;
}

.message-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
    font-size: 12px;
    color: var(--md-sys-color-on-surface-variant);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 12px;
}

.meta-item .material-icons {
    font-size: 16px;
    color: #757575;
}

/* Request Section (for Summarize tab) */
.request-section {
    margin-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 12px;
}

.request-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 13px;
    cursor: pointer;
    padding: 6px 0;
    transition: color 0.2s;
    font-family: 'Roboto', sans-serif;
}

.request-toggle:hover {
    color: var(--md-sys-color-on-surface);
}

.request-icon {
    font-size: 20px;
    transition: transform 0.2s;
}

.request-content {
    margin-top: 8px;
    max-height: 500px;
    overflow: auto;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 1;
}

.request-content.collapsed {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
}

.json-request {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 12px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    color: var(--md-sys-color-on-surface);
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
    line-height: 1.5;
}

/* System Message (for Summarize tab) */
.system-message {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 16px 0;
    animation: fadeIn 0.3s ease-in;
}

.system-message-content {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: none;
    border: none;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 13px;
    font-style: italic;
}

.system-message-content .material-icons {
    font-size: 18px;
    color: var(--md-sys-color-on-surface-variant);
}

.system-message-text {
    font-weight: 400;
}

.system-message-time {
    font-size: 11px;
    opacity: 0.7;
    margin-left: 4px;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #a5a5a5;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-4px);
    }
}

/* Input Section */
.input-section {
    background-color: var(--md-sys-color-surface);
    padding: 16px 24px;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}

.input-container {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--md-sys-color-surface-variant);
    border-radius: 24px;
    padding: 8px 8px 8px 20px;
}

.message-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    color: var(--md-sys-color-on-surface);
    resize: none;
    max-height: 120px;
    min-height: 24px;
    line-height: 1.5;
    padding: 8px 0;
}

.message-input::placeholder {
    color: var(--md-sys-color-on-surface-variant);
}

.send-btn {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: var(--md-sys-elevation-2);
}

.send-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.send-btn:disabled {
    background-color: var(--md-sys-color-outline-variant);
    cursor: not-allowed;
    opacity: 0.5;
}

.send-btn .material-icons {
    font-size: 20px;
}

.input-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--md-sys-color-on-surface-variant);
    margin-top: 8px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.input-hint .material-icons {
    font-size: 14px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--md-sys-color-surface-variant);
    border-top-color: var(--md-sys-color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Scrollbar Styling */
.chat-section::-webkit-scrollbar {
    width: 8px;
}

.chat-section::-webkit-scrollbar-track {
    background: var(--md-sys-color-surface-variant);
}

.chat-section::-webkit-scrollbar-thumb {
    background: var(--md-sys-color-outline);
    border-radius: 4px;
}

.chat-section::-webkit-scrollbar-thumb:hover {
    background: var(--md-sys-color-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-header {
        padding: 12px 16px;
    }

    .app-header h1 {
        font-size: 20px;
    }

    .chat-section {
        padding: 16px;
    }

    .message-content {
        max-width: 85%;
    }

    .input-section {
        padding: 12px 16px;
    }

    .welcome-message {
        padding: 32px 16px;
    }

    .welcome-message .material-icons {
        font-size: 48px;
    }

    .welcome-message h2 {
        font-size: 24px;
    }
}

/* Recipe Card Styles */
.recipe-card {
    background: linear-gradient(135deg, #f8f8f8 0%, #eeeeee 100%);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.recipe-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #d0d0d0;
}

.recipe-header .material-icons {
    font-size: 32px;
    color: #707070;
}

.recipe-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: #404040;
}

.recipe-meta {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.recipe-time,
.recipe-calories {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #505050;
    background: rgba(255, 255, 255, 0.7);
    padding: 6px 12px;
    border-radius: 20px;
}

.recipe-time .material-icons,
.recipe-calories .material-icons {
    font-size: 18px;
    color: #707070;
}

.recipe-description {
    margin: 0 0 16px 0;
    color: #404040;
    line-height: 1.6;
    font-size: 0.95rem;
}

.recipe-ingredients {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    padding: 16px;
}

.recipe-ingredients h4 {
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #505050;
    font-size: 1rem;
}

.recipe-ingredients h4 .material-icons {
    font-size: 20px;
    color: #707070;
}

.recipe-ingredients ul {
    margin: 0;
    padding-left: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}

.recipe-ingredients li {
    color: #404040;
    font-size: 0.9rem;
}

.recipe-content {
    max-width: 500px;
}

/* Header icon style */
.header-icon {
    font-size: 32px;
    color: var(--on-primary);
}

/* JSON Response Block */
.json-response {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 16px;
    border-radius: 12px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 0 16px 12px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.healthy-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.healthy-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.healthy-btn:active:not(:disabled) {
    transform: translateY(0);
}

.healthy-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.healthy-btn .material-icons {
    font-size: 20px;
}

/* Start Wizard Button */
.start-wizard-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #5C6BC0 0%, #7986CB 100%);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(92, 107, 192, 0.3);
}

.start-wizard-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(92, 107, 192, 0.4);
}

.start-wizard-btn:active:not(:disabled) {
    transform: translateY(0);
}

.start-wizard-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.start-wizard-btn .material-icons {
    font-size: 20px;
}

/* Get Tools Button */
.get-tools-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #9C27B0 0%, #BA68C8 100%);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.3);
}

.get-tools-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.4);
}

.get-tools-btn:active:not(:disabled) {
    transform: translateY(0);
}

.get-tools-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.get-tools-btn .material-icons {
    font-size: 20px;
}

/* MCP Tools List */
.mcp-tools-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.mcp-tool-item {
    background: var(--md-sys-color-surface-variant);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
}

.mcp-tool-item:hover {
    box-shadow: var(--md-sys-elevation-2);
    border-color: var(--md-sys-color-outline);
}

.mcp-tool-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.mcp-tool-header strong {
    flex: 1;
    min-width: 0;
}

.mcp-tool-header .material-icons {
    font-size: 20px;
    color: var(--md-sys-color-primary);
}

.mcp-tool-header strong {
    font-size: 16px;
    color: var(--md-sys-color-on-surface);
}

.mcp-tool-desc {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 14px;
    line-height: 1.5;
    margin: 8px 0;
}

.mcp-tool-details {
    margin-top: 12px;
}

.mcp-tool-details summary {
    cursor: pointer;
    color: var(--md-sys-color-primary);
    font-size: 14px;
    font-weight: 500;
    user-select: none;
}

.mcp-tool-details summary:hover {
    text-decoration: underline;
}

.mcp-tool-schema {
    background: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    overflow-x: auto;
    color: var(--md-sys-color-on-surface);
}

.message.ai.error {
    background: #ffebee;
    border-left: 4px solid #d32f2f;
}

.message.ai.error .message-content h3 {
    color: #d32f2f;
}

@media (max-width: 480px) {
    .recipe-card {
        padding: 16px;
    }
    
    .recipe-title {
        font-size: 1.2rem;
    }
    
    .recipe-meta {
        gap: 12px;
    }
    
    .recipe-ingredients ul {
        grid-template-columns: 1fr;
    }
}

/* ==================== COMPARE TAB STYLES ==================== */

.comparison-container {
    background: var(--md-sys-color-surface);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--md-sys-elevation-2);
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease-in;
}

.comparison-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #424242 0%, #616161 100%);
    color: white;
    font-weight: 500;
}

.comparison-header .material-icons {
    font-size: 20px;
}

.comparison-time {
    margin-left: auto;
    font-size: 12px;
    opacity: 0.9;
}

.compare-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 16px;
}

@media (max-width: 768px) {
    .compare-cards {
        grid-template-columns: 1fr;
    }
}

.compare-card {
    background: var(--md-sys-color-surface-variant);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.compare-card.success {
    border-color: #e0e0e0;
}

.compare-card.error {
    border-color: #ef5350;
    background: #ffebee;
}

.compare-card:hover {
    box-shadow: var(--md-sys-elevation-3);
}

.compare-card-header {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.model-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.model-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--md-sys-color-on-surface);
}

.model-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
}

.model-badge.new-model {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    color: white;
}

.model-badge.old-model {
    background: linear-gradient(135deg, #FF9800 0%, #FFB74D 100%);
    color: white;
}

.compare-card-body {
    padding: 16px;
    flex: 1;
}

.compare-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--md-sys-color-on-surface);
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.compare-card-footer {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.02);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.compare-card-footer .stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--md-sys-color-on-surface-variant);
}

.compare-card-footer .stat .material-icons {
    font-size: 16px;
    color: #757575;
}

/* Compare input hint update */
#tab-compare .input-hint {
    text-align: center;
}

/* ==================== AI CHAT TAB STYLES ==================== */

.settings-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #9C27B0 0%, #BA68C8 100%);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.3);
}

.settings-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.4);
}

.settings-btn:active:not(:disabled) {
    transform: translateY(0);
}

.settings-btn .material-icons {
    font-size: 20px;
}

.mcp-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #2196F3 0%, #64B5F6 100%);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.mcp-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.mcp-btn:active:not(:disabled) {
    transform: translateY(0);
}

.mcp-btn .material-icons {
    font-size: 20px;
}

.mcp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.mcp-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.mcp-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #1f1f1f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555;
    transition: 0.2s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.2s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #64B5F6;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.toggle-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
}

.toggle-status {
    font-weight: 700;
    color: #64B5F6;
    font-size: 12px;
}

/* ==================== SCHEDULER STYLES ==================== */

.scheduler-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    background: var(--md-sys-color-surface-variant);
    border-radius: 12px;
    margin: 0 16px 12px;
}

.scheduler-control-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.scheduler-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
    white-space: nowrap;
}

.scheduler-interval-input {
    padding: 8px 12px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 8px;
    font-size: 14px;
    width: 100px;
    background: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
}

.scheduler-interval-input:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 2px rgba(165, 165, 165, 0.2);
}

.scheduler-summary-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #FF9800 0%, #FFB74D 100%);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
    margin-top: 8px;
}

.scheduler-summary-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

.scheduler-summary-btn:active:not(:disabled) {
    transform: translateY(0);
}

.scheduler-summary-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.scheduler-summary-btn .material-icons {
    font-size: 20px;
}

.scheduler-push-subscribe-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #00BCD4 0%, #4DD0E1 100%);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 188, 212, 0.3);
    width: 100%;
    justify-content: center;
}

.scheduler-push-subscribe-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.4);
}

.scheduler-push-subscribe-btn:active:not(:disabled) {
    transform: translateY(0);
}

.scheduler-push-subscribe-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.scheduler-push-subscribe-btn .material-icons {
    font-size: 20px;
}

/* ==================== MODAL STYLES ==================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #1e1e1e;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 500;
    color: #ffffff;
}

.modal-title .material-icons {
    font-size: 24px;
    color: #BA68C8;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.modal-close .material-icons {
    font-size: 24px;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-description {
    margin: 0 0 16px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.5;
}

.mcp-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mcp-item {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: #252525;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.mcp-item:hover {
    border-color: rgba(100, 181, 246, 0.6);
    transform: translateY(-1px);
}

.mcp-item.disabled {
    opacity: 0.65;
}

.mcp-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(100, 181, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64B5F6;
}

.mcp-icon .material-icons {
    font-size: 24px;
}

.mcp-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mcp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.mcp-inline-toggle {
    transform: scale(0.9);
}

.mcp-name {
    font-weight: 600;
    color: #ffffff;
    font-size: 15px;
}

.mcp-desc {
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    line-height: 1.5;
}

.mcp-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mcp-tag {
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(100, 181, 246, 0.12);
    color: #90CAF9;
    font-size: 12px;
    font-weight: 600;
}

.mcp-status {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.status-available {
    background: rgba(76, 175, 80, 0.15);
    color: #A5D6A7;
}

.status-soon {
    background: rgba(255, 202, 40, 0.15);
    color: #FFD54F;
}

.mcp-enabled-pill {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.mcp-enabled-pill.on {
    background: rgba(100, 181, 246, 0.15);
    color: #90CAF9;
}

.mcp-enabled-pill.off {
    background: rgba(158, 158, 158, 0.15);
    color: #BDBDBD;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.current-settings {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.current-setting-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.current-setting-item .material-icons {
    font-size: 18px;
}

.apply-btn {
    padding: 12px 32px;
    background: linear-gradient(135deg, #9C27B0 0%, #BA68C8 100%);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.3);
}

.apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.4);
}

.apply-btn:active {
    transform: translateY(0);
}

/* Settings Sections */
.settings-section {
    margin-bottom: 24px;
}

.settings-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 12px;
}

.settings-label .material-icons {
    font-size: 20px;
    color: #BA68C8;
}

.model-select {
    width: 100%;
    padding: 12px 16px;
    background: #2b2b2b;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.model-select:hover {
    background: #323232;
    border-color: rgba(255, 255, 255, 0.24);
}

.model-select:focus {
    outline: none;
    border-color: #BA68C8;
    box-shadow: 0 0 0 2px rgba(186, 104, 200, 0.2);
}

.info-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(186, 104, 200, 0.1);
    border: 1px solid rgba(186, 104, 200, 0.3);
    border-radius: 8px;
    margin-top: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.info-box .material-icons {
    font-size: 18px;
    color: #BA68C8;
}

/* Temperature Control */
.temperature-control {
    margin-top: 8px;
}

.temperature-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.temperature-slider-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.temperature-slider {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.temperature-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #BA68C8;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.temperature-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(186, 104, 200, 0.4);
}

.temperature-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #BA68C8;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
}

.temperature-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(186, 104, 200, 0.4);
}

.temperature-value {
    min-width: 50px;
    padding: 6px 12px;
    background: rgba(186, 104, 200, 0.2);
    border: 1px solid rgba(186, 104, 200, 0.3);
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
}

/* Max tokens input */
.number-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.number-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
}

.number-input:focus {
    outline: none;
    border-color: #BA68C8;
    box-shadow: 0 0 0 2px rgba(186, 104, 200, 0.2);
    background: rgba(255, 255, 255, 0.12);
}

.input-hint-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

/* System Prompt Input */
.system-prompt-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    resize: vertical;
    min-height: 100px;
    transition: all 0.2s;
}

.system-prompt-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.system-prompt-input:focus {
    outline: none;
    border-color: #BA68C8;
    box-shadow: 0 0 0 2px rgba(186, 104, 200, 0.2);
    background: rgba(255, 255, 255, 0.12);
}

/* Presets */
.preset-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.preset-name-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    transition: all 0.2s;
}

.preset-name-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.preset-name-input:focus {
    outline: none;
    border-color: #BA68C8;
    box-shadow: 0 0 0 2px rgba(186, 104, 200, 0.2);
    background: rgba(255, 255, 255, 0.12);
}

.save-preset-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.save-preset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.save-preset-btn:active {
    transform: translateY(0);
}

.presets-group {
    margin-bottom: 20px;
}

.presets-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
}

.presets-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.preset-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.preset-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.preset-btn.active {
    background: rgba(186, 104, 200, 0.3);
    border-color: #BA68C8;
    color: #ffffff;
}

.preset-btn .material-icons {
    font-size: 18px;
}

/* Modal Scrollbar */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ==================== MCP TOOL BUTTONS ==================== */

.mcp-tool-run-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #9C27B0 0%, #BA68C8 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(156, 39, 176, 0.3);
    margin-left: auto;
}

.mcp-tool-run-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(156, 39, 176, 0.4);
    background: linear-gradient(135deg, #8E24AA 0%, #AB47BC 100%);
}

.mcp-tool-run-btn:active {
    transform: translateY(0);
}

.mcp-tool-run-btn .material-icons {
    font-size: 18px;
}

/* Modal Footer Buttons */
.btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #9C27B0 0%, #BA68C8 100%);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.4);
    background: linear-gradient(135deg, #8E24AA 0%, #AB47BC 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary .material-icons {
    font-size: 20px;
}

.btn-secondary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Form Fields */
.form-field {
    margin-bottom: 16px;
}

.form-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: #ffffff;
}

.form-field label span {
    color: #f44336;
    margin-left: 4px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: #2b2b2b;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    font-family: 'Roboto', sans-serif;
    transition: all 0.2s;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-input:focus {
    outline: none;
    border-color: #BA68C8;
    box-shadow: 0 0 0 2px rgba(186, 104, 200, 0.2);
    background: rgba(255, 255, 255, 0.12);
}

.form-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal Footer Button Layout - Updated for tool call modal */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

/* Ensure modal footer buttons are properly styled */
.modal-footer .btn-primary,
.modal-footer .btn-secondary {
    min-width: 120px;
    justify-content: center;
}
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header {
        padding: 16px;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .current-settings {
        width: 100%;
    }

    .apply-btn {
        width: 100%;
    }

    .presets-list {
        flex-direction: column;
    }

    .preset-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Storyboard Styles */
.storyboard-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.storyboard-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.storyboard-btn:active:not(:disabled) {
    transform: translateY(0);
}

.storyboard-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.storyboard-btn .material-icons {
    font-size: 20px;
}

.storyboard-item {
    background: var(--ai-message-bg);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--md-sys-elevation-2);
    animation: slideIn 0.3s ease;
}

.storyboard-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 14px;
}

.storyboard-header .material-icons {
    font-size: 20px;
    color: #667eea;
}

.storyboard-time {
    margin-left: auto;
    font-size: 12px;
    opacity: 0.7;
}

.storyboard-idea {
    background: #FFFFFF;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 3px solid #667eea;
}

.storyboard-idea strong {
    color: #667eea;
    display: block;
    margin-bottom: 4px;
}

.storyboard-plan {
    background: #FFFFFF;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 3px solid #764ba2;
}

.storyboard-plan strong {
    color: #764ba2;
    display: block;
    margin-bottom: 8px;
}

.storyboard-plan-content {
    white-space: pre-wrap;
    line-height: 1.6;
    color: var(--md-sys-color-on-surface);
}

.storyboard-image-container {
    margin-top: 16px;
}

.storyboard-image-container strong {
    display: block;
    margin-bottom: 12px;
    color: #667eea;
}

.storyboard-image {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: var(--md-sys-elevation-3);
    margin-top: 8px;
}

.storyboard-error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: #ffebee;
    border-left: 3px solid #f44336;
    border-radius: 4px;
    color: #c62828;
    margin-top: 12px;
}

.storyboard-error .material-icons {
    font-size: 20px;
    color: #f44336;
}

.storyboard-image-prompt {
    background: #e3f2fd;
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
    border-left: 3px solid #2196f3;
}

.storyboard-image-prompt strong {
    display: block;
    margin-bottom: 8px;
    color: #1976d2;
}

.storyboard-prompt-content {
    background: #FFFFFF;
    padding: 12px;
    border-radius: 4px;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    margin-top: 8px;
    border: 1px solid #90caf9;
}

.storyboard-prompt-note {
    margin-top: 12px;
    padding: 8px 12px;
    background: #fff3cd;
    border-left: 3px solid #ffc107;
    border-radius: 4px;
    font-size: 13px;
    color: #856404;
}

/* Storyboard Shots Table */
.storyboard-shots-container {
    margin-top: 16px;
    overflow-x: auto;
}

.storyboard-shots-container strong {
    display: block;
    margin-bottom: 12px;
    color: #667eea;
    font-size: 16px;
}

.storyboard-table {
    width: 100%;
    border-collapse: collapse;
    background: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--md-sys-elevation-2);
    margin-top: 8px;
}

.storyboard-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #FFFFFF;
}

.storyboard-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
}

.storyboard-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s;
}

.storyboard-table tbody tr:hover {
    background-color: #f5f5f5;
}

.storyboard-table tbody tr:last-child {
    border-bottom: none;
}

.storyboard-table td {
    padding: 16px;
    vertical-align: top;
    font-size: 14px;
    color: var(--md-sys-color-on-surface);
}

.storyboard-table .shot-number {
    font-weight: 600;
    color: #667eea;
    text-align: center;
    width: 60px;
    font-size: 16px;
}

.storyboard-table .shot-image {
    width: 200px;
    min-width: 200px;
    text-align: center;
}

.storyboard-shot-image {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 6px;
    box-shadow: var(--md-sys-elevation-2);
    object-fit: cover;
}

.storyboard-image-loading {
    padding: 40px 20px;
    text-align: center;
    color: #757575;
    font-size: 13px;
    background: #f5f5f5;
    border-radius: 6px;
    border: 2px dashed #bdbdbd;
}

.storyboard-image-loading::before {
    content: '⏳';
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
}

.storyboard-image-error {
    padding: 20px;
    text-align: center;
    color: #d32f2f;
    font-size: 12px;
    background: #ffebee;
    border-radius: 6px;
    border: 1px solid #ffcdd2;
}

.storyboard-table .shot-description {
    min-width: 200px;
    line-height: 1.5;
}

.storyboard-table .shot-angle {
    min-width: 120px;
    color: #764ba2;
    font-weight: 500;
}

.storyboard-table .shot-focus {
    min-width: 150px;
    font-style: italic;
    color: #666;
}

.storyboard-table .shot-duration {
    text-align: center;
    color: #757575;
    font-size: 13px;
    white-space: nowrap;
}

/* Responsive table */
@media (max-width: 768px) {
    .storyboard-table {
        font-size: 12px;
    }
    
    .storyboard-table th,
    .storyboard-table td {
        padding: 8px;
    }
    
    .storyboard-table .shot-image {
        width: 150px;
        min-width: 150px;
    }
    
    .storyboard-shot-image {
        max-width: 150px;
    }
}

