/* Custom CSS for TradingAgents Dash UI */

body {
    background-color: #0F172A;
    color: #F1F5F9;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.dash-markdown {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Card styling */
.card {
    border-radius: 10px;
    border: 1px solid #334155;
    background-color: #1E293B;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Button styling */
.btn-primary {
    background-color: #3B82F6;
    border-color: #3B82F6;
}

.btn-primary:hover {
    background-color: #2563EB;
    border-color: #2563EB;
}

/* Navigation buttons */
.btn-link {
    padding: 0.25rem 0.5rem;
    margin: 0 0.25rem;
    text-decoration: none;
}

.btn-link:hover {
    text-decoration: none;
}

/* Status colors */
.text-pending {
    color: #94A3B8;
}

.text-in-progress {
    color: #F59E0B;
}

.text-completed {
    color: #10B981;
}

.text-error {
    color: #EF4444;
}

/* Table styling */
.table {
    color: #F1F5F9;
    border-color: #334155;
}

.table thead th {
    border-bottom: 2px solid #334155;
}

.table td, .table th {
    border-top: 1px solid #334155;
}

/* Input styling */
.form-control {
    background-color: #1E293B;
    border-color: #334155;
    color: #F1F5F9;
}

.form-control:focus {
    background-color: #1E293B;
    border-color: #3B82F6;
    color: #F1F5F9;
}

/* Tabs styling */
.nav-tabs {
    border-bottom: 1px solid #334155;
}

.nav-tabs .nav-link {
    color: #64748B;
    border: none;
}

.nav-tabs .nav-link.active {
    color: #F1F5F9;
    background-color: transparent;
    border-bottom: 2px solid #3B82F6;
}

.tab-content {
    padding: 1rem 0;
}

/* Chart container */
.chart-container {
    height: 1000px;
    width: 100%;
}

/* Progress indicators */
.progress {
    background-color: #334155;
}

.progress-bar {
    background-color: #3B82F6;
}

/* Researcher Debate styling */
.researcher-debate {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1E293B;
    border-radius: 10px;
    padding: 15px;
    margin-top: 10px;
}

.debate-header {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-weight: bold;
    border-bottom: 1px solid #334155;
    margin-bottom: 15px;
}

.bull-header {
    color: #10B981;
    padding-left: 20px;
    font-size: 1.1rem;
}

.bear-header {
    color: #EF4444;
    padding-right: 20px;
    font-size: 1.1rem;
}

.debate-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px 0;
}

.message-row {
    display: flex;
    width: 100%;
    margin-bottom: 12px;
}

.bull-message, .bear-message {
    max-width: 80%;
    padding: 12px 15px;
    border-radius: 10px;
    white-space: pre-wrap;
    line-height: 1.5;
}

.bull-message {
    background-color: rgba(16, 185, 129, 0.1);
    border-left: 4px solid #10B981;
    margin-right: auto;
    color: #F1F5F9;
}

.bear-message {
    background-color: rgba(239, 68, 68, 0.1);
    border-right: 4px solid #EF4444;
    margin-left: auto;
    text-align: right;
    color: #F1F5F9;
}

.message-spacer {
    flex: 1;
    min-width: 20px;
}

/* Enhanced Alpaca account section styling */
.enhanced-alpaca-section {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.enhanced-account-summary {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
    border: 1px solid #334155;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.enhanced-summary-item {
    background: rgba(59, 130, 246, 0.05);
    border-radius: 10px;
    padding: 15px;
    margin: 5px;
    border: 1px solid rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
}

.enhanced-summary-item:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.summary-item {
    text-align: center;
}

.summary-label {
    font-size: 0.9rem;
    color: #94A3B8;
    font-weight: 600;
    margin-bottom: 5px;
}

.summary-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: #3B82F6;
}

.summary-value.positive {
    color: #10B981;
}

.summary-value.negative {
    color: #EF4444;
}

/* Enhanced Table Styling */
.enhanced-table-container {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #334155;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.enhanced-table-container.error-state {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    border-color: rgba(239, 68, 68, 0.3);
}

.enhanced-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: transparent;
    font-size: 0.9rem;
}

.table-header {
    background: linear-gradient(135deg, #334155 0%, #1E293B 100%);
    color: #F1F5F9;
    font-weight: 600;
    padding: 15px 12px;
    text-align: left;
    border: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-header:first-child {
    border-top-left-radius: 8px;
}

.table-header:last-child {
    border-top-right-radius: 8px;
}

.table-row-hover {
    background-color: rgba(30, 41, 59, 0.5);
    border-bottom: 1px solid rgba(51, 65, 85, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.table-row-hover:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.05) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

.table-row-hover:last-child {
    border-bottom: none;
}

.table-row-hover td {
    padding: 15px 12px;
    border: none;
    vertical-align: middle;
}

.symbol-cell {
    width: 25%;
}

.value-cell, .pnl-cell {
    width: 20%;
}

.action-cell {
    width: 15%;
    text-align: center;
}

.side-cell, .filled-cell, .price-cell, .status-cell {
    width: 20%;
}

.symbol-text {
    color: #3B82F6;
    font-weight: 600;
    font-size: 1rem;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(51, 65, 85, 0.5);
}

/* Liquidate Button Styling */
.liquidate-btn {
    transition: all 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-width: 2px;
}

.liquidate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Markdown Table Styling - ChatGPT-like appearance */
.dash-markdown table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background-color: transparent;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dash-markdown table thead {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
}

.dash-markdown table thead th {
    color: #FFFFFF;
    font-weight: 600;
    padding: 16px 20px;
    text-align: left;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.dash-markdown table thead th:first-child {
    border-top-left-radius: 10px;
}

.dash-markdown table thead th:last-child {
    border-top-right-radius: 10px;
}

.dash-markdown table tbody tr {
    background-color: rgba(30, 41, 59, 0.3);
    border-bottom: 1px solid rgba(51, 65, 85, 0.2);
    transition: all 0.3s ease;
}

.dash-markdown table tbody tr:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.03) 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.dash-markdown table tbody tr:nth-child(even) {
    background-color: rgba(30, 41, 59, 0.2);
}

.dash-markdown table tbody tr:nth-child(even):hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.03) 100%);
}

.dash-markdown table tbody td {
    padding: 14px 20px;
    color: #F1F5F9;
    font-size: 0.9rem;
    line-height: 1.5;
    border: none;
    vertical-align: middle;
}

.dash-markdown table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 10px;
}

.dash-markdown table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
}

/* Special styling for different types of table cells */
.dash-markdown table td:contains("BUY"),
.dash-markdown table td:contains("LONG"),
.dash-markdown table td:contains("Bullish") {
    color: #10B981;
    font-weight: 600;
}

.dash-markdown table td:contains("SELL"),
.dash-markdown table td:contains("SHORT"),
.dash-markdown table td:contains("Bearish") {
    color: #EF4444;
    font-weight: 600;
}

.dash-markdown table td:contains("HOLD"),
.dash-markdown table td:contains("NEUTRAL"),
.dash-markdown table td:contains("Neutral") {
    color: #F59E0B;
    font-weight: 600;
}

/* Responsive table styling */
@media (max-width: 768px) {
    .dash-markdown table {
        font-size: 0.8rem;
    }
    
    .dash-markdown table thead th,
    .dash-markdown table tbody td {
        padding: 10px 12px;
    }
    
    .dash-markdown table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Code blocks in markdown for better formatting */
.dash-markdown pre {
    background-color: rgba(15, 23, 42, 0.6);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 16px;
    margin: 1rem 0;
    overflow-x: auto;
    color: #E2E8F0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
}

.dash-markdown code {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

/* Enhanced markdown headers */
.dash-markdown h1,
.dash-markdown h2,
.dash-markdown h3,
.dash-markdown h4,
.dash-markdown h5,
.dash-markdown h6 {
    color: #F1F5F9;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.dash-markdown h1 {
    font-size: 2rem;
    border-bottom: 2px solid #3B82F6;
    padding-bottom: 0.5rem;
}

.dash-markdown h2 {
    font-size: 1.6rem;
    color: #3B82F6;
}

.dash-markdown h3 {
    font-size: 1.3rem;
    color: #60A5FA;
}

.dash-markdown h4 {
    font-size: 1.1rem;
    color: #93C5FD;
}

/* Lists styling */
.dash-markdown ul,
.dash-markdown ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.dash-markdown li {
    margin: 0.5rem 0;
    line-height: 1.6;
    color: #E2E8F0;
}

/* Blockquotes */
.dash-markdown blockquote {
    border-left: 4px solid #3B82F6;
    background-color: rgba(59, 130, 246, 0.05);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
    color: #E2E8F0;
    font-style: italic;
}

/* Strong text and emphasis */
.dash-markdown strong {
    color: #F1F5F9;
    font-weight: 700;
}

.dash-markdown em {
    color: #CBD5E1;
    font-style: italic;
}

/* Horizontal rules */
.dash-markdown hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, #334155, transparent);
    margin: 2rem 0;
}

/* Table container wrapper for better spacing */
.dash-markdown {
    max-width: 100%;
    overflow-x: auto;
}

/* Enhanced Reports Panel Styling */
.reports-panel-card {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    border: 1px solid #334155;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.report-title {
    color: #F1F5F9;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.report-title i {
    color: #3B82F6;
}

.report-divider {
    background: linear-gradient(90deg, transparent, #334155, transparent);
    border: none;
    height: 1px;
    margin: 1rem 0;
}

.pagination-row {
    background-color: rgba(15, 23, 42, 0.3);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid rgba(51, 65, 85, 0.3);
}

.current-symbol-container {
    color: #94A3B8;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.current-symbol-container i {
    color: #3B82F6;
}

.symbol-display {
    color: #3B82F6;
    font-weight: 700;
    font-size: 1.4rem;
}

/* Enhanced Tabs Styling */
.enhanced-tabs .nav-tabs {
    background: linear-gradient(135deg, #334155 0%, #1E293B 100%);
    border-radius: 8px 8px 0 0;
    border-bottom: 2px solid #3B82F6;
    padding: 0.25rem 0.5rem 0 0.5rem;
}

.enhanced-tabs .nav-tabs .nav-link {
    color: #94A3B8;
    border: none;
    background: transparent;
    border-radius: 6px 6px 0 0;
    padding: 0.75rem 1rem;
    margin-right: 0.25rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.enhanced-tabs .nav-tabs .nav-link:hover {
    color: #E2E8F0;
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.enhanced-tabs .nav-tabs .nav-link.active {
    color: #FFFFFF;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* Tab content containers */
[id$="-tab-content"] {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    border-radius: 0 0 8px 8px;
    padding: 1.5rem;
    min-height: 1000px;
    border: 1px solid rgba(51, 65, 85, 0.3);
    border-top: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Enhanced markdown content within tabs */
[id$="-tab-content"] .enhanced-markdown-content {
    background: transparent;
    border: none;
    padding: 0;
    min-height: auto;
    color: #E2E8F0;
    line-height: 1.6;
}

/* Loading messages in tab content */
[id$="-tab-content"] .loading-message {
    color: #3B82F6;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
}

[id$="-tab-content"] .loading-description {
    color: #94A3B8;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    text-align: center;
    font-style: italic;
}

/* Debate content wrapper styling */
[id$="-tab-content"] .debate-content-wrapper {
    background: transparent;
    padding: 0;
    min-height: 850px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Mobile responsiveness for tab content */
@media (max-width: 768px) {
    [id$="-tab-content"] {
        padding: 1rem;
        min-height: 300px;
    }
    
    .enhanced-tabs .nav-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
}

.dash-markdown {
    max-width: 100%;
    overflow-x: auto;
}

/* Enhanced Reports Panel Styling */
.reports-panel-card {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    border: 1px solid #334155;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.report-title {
    color: #F1F5F9;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.report-title i {
    color: #3B82F6;
}

.report-divider {
    background: linear-gradient(90deg, transparent, #334155, transparent);
    border: none;
    height: 1px;
    margin: 1rem 0;
}

.pagination-row {
    background-color: rgba(15, 23, 42, 0.3);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid rgba(51, 65, 85, 0.3);
}

.current-symbol-container {
    color: #94A3B8;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.current-symbol-container i {
    color: #3B82F6;
}

.symbol-display {
    color: #3B82F6;
    font-weight: 700;
    font-size: 1.4rem;
}

/* Symbol Pagination Styling */
.symbol-pagination-container {
    background-color: rgba(15, 23, 42, 0.3);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid rgba(51, 65, 85, 0.3);
}

.symbol-pagination-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.symbol-btn {
    transition: all 0.15s ease !important;
    min-width: 60px;
    font-weight: 500;
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
    border: 1px solid #475569;
    color: #E2E8F0;
    transform: translateY(0);
    margin: 0 2px;
    border-radius: 6px !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.symbol-btn:hover {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
    border-color: #2563EB !important;
    color: white !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3) !important;
}

/* IMMEDIATE CLICK FEEDBACK - This fires instantly! */
.symbol-btn:active {
    background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%) !important;
    border-color: #1E40AF !important;
    color: white !important;
    transform: translateY(0) scale(0.95) !important;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.4) !important;
    transition: all 0.05s ease !important;
}

/* SELECTED STATE - This updates after callback */
.symbol-btn.active {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
    border-color: #059669 !important;
    color: white !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3) !important;
}

/* SELECTED STATE HOVER */
.symbol-btn.active:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    border-color: #047857 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.4) !important;
}

/* SELECTED STATE CLICK */
.symbol-btn.active:active {
    background: linear-gradient(135deg, #047857 0%, #065F46 100%) !important;
    border-color: #065F46 !important;
    transform: translateY(0) scale(0.98) !important;
    transition: all 0.05s ease !important;
}

/* Touch device support for immediate feedback */
@media (hover: none) and (pointer: coarse) {
    .symbol-btn:active {
        background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%) !important;
        border-color: #1E40AF !important;
        color: white !important;
        transform: scale(0.95) !important;
        transition: all 0.1s ease !important;
    }
    
    .symbol-btn.active:active {
        background: linear-gradient(135deg, #047857 0%, #065F46 100%) !important;
        border-color: #065F46 !important;
        transform: scale(0.95) !important;
    }
    
    /* Larger touch targets on mobile */
    .symbol-btn {
        min-height: 44px;
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* Symbol Button Group Styling */
.btn-group .symbol-btn:not(:last-child) {
    margin-right: 2px;
}

.btn-group .symbol-btn:not(:first-child) {
    margin-left: 2px;
}

/* Button group container */
.symbol-pagination-wrapper .btn-group {
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Focus states for accessibility */
.symbol-btn:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

.symbol-btn.active:focus {
    outline: 2px solid #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Navigation Info */
.symbol-pagination-wrapper .text-muted {
    font-size: 0.85rem;
    color: #64748B !important;
    font-weight: 500;
}

.symbol-pagination-wrapper .text-muted i {
    color: #3B82F6;
    margin-right: 0.5rem;
}

/* Responsive Symbol Pagination */
@media (max-width: 768px) {
    .symbol-btn {
        min-width: 50px !important;
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem !important;
        margin: 0 1px !important;
    }
    
    .symbol-pagination-wrapper .btn-group {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination-row {
        padding: 8px;
    }
}

/* Enhanced Tabs Styling */
.enhanced-tabs .nav-tabs {
    border-bottom: 1px solid #334155;
    background-color: rgba(15, 23, 42, 0.5);
    border-radius: 8px 8px 0 0;
    padding: 0.5rem;
}

.enhanced-tabs .nav-tabs .nav-link {
    color: #94A3B8;
    border: none;
    border-radius: 6px;
    margin: 0 2px;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background-color: transparent;
}

.enhanced-tabs .nav-tabs .nav-link:hover {
    color: #E2E8F0;
    background-color: rgba(59, 130, 246, 0.1);
    border-color: transparent;
}

.enhanced-tabs .nav-tabs .nav-link.active {
    color: #FFFFFF;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Loading States for Symbol Pagination */
.symbol-pagination-container .text-muted {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #64748B;
    font-style: italic;
}

/* Animation for Symbol Button Clicks */
@keyframes symbolClick {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.symbol-btn:active {
    animation: symbolClick 0.15s ease;
}

/* Enhanced Visual Feedback */
.symbol-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

/* Gradient Background for Active State */
.symbol-btn.active {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Debate iframe styling */
.debate-iframe {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;
}

.debate-iframe:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Enhanced styling for debate content containers */
[id$="debate-tab-content"] {
    padding: 0 !important;
    background: #1E293B !important;
    border: 1px solid #334155;
}

[id$="debate-tab-content"] .debate-content-wrapper {
    min-height: 850px;
}

/* Mobile responsiveness for debates */
@media (max-width: 768px) {
    .debate-iframe {
        height: 1000px !important;
    }
    
    [id$="debate-tab-content"] {
        padding: 0.5rem !important;
    }
}

/* Prompt Modal and Button Styling */
.show-prompt-btn {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.5rem !important;
    opacity: 0.8;
    transition: all 0.2s ease;
    border-radius: 4px !important;
}

.show-prompt-btn:hover {
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.report-header {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(51, 65, 85, 0.3);
    margin-bottom: 1rem;
}

.report-header-title {
    color: #E2E8F0;
    font-weight: 600;
    margin: 0;
}

.report-header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.prompt-modal .modal-content {
    background-color: #1E293B;
    border: 1px solid #334155;
    border-radius: 12px;
}

.prompt-modal-header {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    border-bottom: 1px solid #334155;
    border-radius: 12px 12px 0 0;
}

.prompt-modal-header h4 {
    color: #E2E8F0;
    margin: 0;
}

.prompt-modal-body {
    background-color: #1E293B;
    color: #E2E8F0;
}

.prompt-content {
    background: #0F172A !important;
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
    padding: 1.5rem !important;
    font-family: 'Consolas', 'Monaco', 'Lucida Console', monospace !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #E2E8F0 !important;
    white-space: pre-wrap !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    scrollbar-width: thin;
    scrollbar-color: #334155 #1E293B;
}

.prompt-content::-webkit-scrollbar {
    width: 8px;
}

.prompt-content::-webkit-scrollbar-track {
    background: #1E293B;
    border-radius: 4px;
}

.prompt-content::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

.prompt-content::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

.prompt-modal .modal-footer {
    background-color: #1E293B;
    border-top: 1px solid #334155;
    border-radius: 0 0 12px 12px;
}

.prompt-modal .btn-outline-primary {
    border-color: #3B82F6;
    color: #3B82F6;
}

.prompt-modal .btn-outline-primary:hover {
    background-color: #3B82F6;
    border-color: #3B82F6;
    color: #FFFFFF;
}

.prompt-modal .btn-secondary {
    background-color: #64748B;
    border-color: #64748B;
    color: #FFFFFF;
}

.prompt-modal .btn-secondary:hover {
    background-color: #475569;
    border-color: #475569;
}

/* Animation for prompt buttons */
@keyframes promptButtonPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.show-prompt-btn:active {
    animation: promptButtonPulse 0.15s ease;
}

/* Responsive design for prompt modal */
@media (max-width: 768px) {
    .prompt-modal .modal-dialog {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
    }
    
    .report-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .report-header-actions {
        justify-content: center;
    }
    
    .prompt-content {
        font-size: 12px !important;
        max-height: 300px !important;
    }
}

/* Tool Outputs Modal Styling */
.show-tool-outputs-btn {
    transition: all 0.2s ease-in-out;
    border-radius: 6px;
    font-weight: 500;
    letter-spacing: 0.025em;
}

.show-tool-outputs-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.report-debug-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
}

.tool-outputs-modal .modal-content {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    border: 1px solid #374151;
}

.tool-outputs-modal-header {
    background: linear-gradient(135deg, #374151 0%, #1F2937 100%);
    border-bottom: 1px solid #4B5563;
}

.tool-outputs-modal-header h4 {
    color: #FCD34D;
    font-weight: 600;
}

.tool-outputs-modal-body {
    max-height: 70vh;
    background: #0F172A;
}

.tool-outputs-content {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    line-height: 1.6;
    background: #111827 !important;
    border: 1px solid #374151 !important;
    border-radius: 8px !important;
    padding: 1.5rem !important;
    color: #F8FAFC !important;
    max-height: 500px;
    overflow-y: auto;
}

.tool-outputs-content h1 {
    color: #FCD34D !important;
    border-bottom: 2px solid #4B5563;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.tool-outputs-content h2 {
    color: #34D399 !important;
    border-bottom: 1px solid #374151;
    padding-bottom: 0.3rem;
    margin-bottom: 0.8rem;
    margin-top: 1.5rem;
    font-size: 1.2rem;
}

.tool-outputs-content h3 {
    color: #60A5FA !important;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.tool-outputs-content p {
    color: #E5E7EB !important;
    margin-bottom: 0.5rem;
}

.tool-outputs-content strong {
    color: #F3F4F6 !important;
    font-weight: 600;
}

.tool-outputs-content code {
    background: #1E293B !important; /* slightly lighter than pre */
    color: #93C5FD !important;      /* soft blue text */
    border: 1px solid #334155;
}

/* ---------- Better code block readability in Tool Outputs ---------- */
.tool-outputs-content pre {
    background: #0F172A !important;   /* darker background */
    border: 1px solid #334155 !important;
    color: #F1F5F9 !important;       /* lighter text */
    border-radius: 6px;
    padding: 1rem !important;
    overflow-x: auto;
    font-size: 13px;
}

.tool-outputs-content pre code {
    background: #afbddf !important;   /* darker background */
    color: #0F172A !important;
}

.tool-outputs-content::-webkit-scrollbar {
    width: 8px;
}

.tool-outputs-content::-webkit-scrollbar-track {
    background: #1F2937;
    border-radius: 4px;
}

.tool-outputs-content::-webkit-scrollbar-thumb {
    background: #4B5563;
    border-radius: 4px;
}

.tool-outputs-content::-webkit-scrollbar-thumb:hover {
    background: #6B7280;
}

.tool-outputs-modal .modal-footer {
    background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
    border-top: 1px solid #374151;
}

.tool-outputs-modal .btn-outline-warning {
    border-color: #F59E0B;
    color: #F59E0B;
}

.tool-outputs-modal .btn-outline-warning:hover {
    background-color: #F59E0B;
    color: #1F2937;
}

.tool-outputs-modal .btn-outline-primary {
    border-color: #3B82F6;
    color: #3B82F6;
}

.tool-outputs-modal .btn-outline-primary:hover {
    background-color: #3B82F6;
    color: #FFFFFF;
}

.tool-outputs-modal .btn-outline-success {
    border-color: #10B981;
    color: #10B981;
}

.tool-outputs-modal .btn-outline-success:hover {
    background-color: #10B981;
    color: #FFFFFF;
}

.tool-outputs-modal .btn-secondary {
    background-color: #4B5563;
    border-color: #4B5563;
    color: #F9FAFB;
}

.tool-outputs-modal .btn-secondary:hover {
    background-color: #374151;
    border-color: #374151;
}

@keyframes toolOutputButtonPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.show-tool-outputs-btn:active {
    animation: toolOutputButtonPulse 0.2s ease-in-out;
}

@media (max-width: 768px) {
    .tool-outputs-modal .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .report-debug-buttons {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .tool-outputs-content {
        font-size: 12px;
        max-height: 300px;
    }
}

