/**
 * Chart Analyzer Plugin Styles
 * Version: 2.3.18 - Mobile History Icon and Centered Logo
 */

.chart-analyzer-container {
    max-width: 100%;
    margin: 40px auto;
    padding: 40px 15px;
    background: rgba(26, 32, 44, 0.95);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #e1e5e9;
    position: relative;
    box-sizing: border-box;
}

.chart-analyzer-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    opacity: 0.05;
    z-index: -1;
}

.chart-analyzer-container h2 {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 30px;
    text-shadow: none;
}

/* Toggle Buttons - GREEN THEME */
.chart-analyzer-toggle-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
    gap: 10px;
    flex-wrap: wrap;
}

.chart-analyzer-toggle-btn {
    padding: 12px 25px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    color: #a0aec0;
    font-size: 14px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-analyzer-toggle-btn:hover {
    background: rgba(34, 197, 94, 0.1);
    transform: translateY(-2px);
    border-color: rgba(34, 197, 94, 0.3);
}

.chart-analyzer-toggle-btn.active {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.3);
}

/* Analysis Modes */
.chart-analyzer-mode {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.chart-analyzer-mode.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Sections */
.chart-analyzer-section {
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 15px;
    background: rgba(45, 55, 72, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.chart-analyzer-section label {
    font-size: 14px;
    font-weight: 600;
    display: block;
    margin: 15px 0 8px;
    color: #cbd5e0;
}

.chart-analyzer-section input,
.chart-analyzer-section select,
.chart-analyzer-section textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(45, 55, 72, 0.6);
    color: #e1e5e9;
    font-size: 15px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    font-family: inherit;
}

.chart-analyzer-section input:focus,
.chart-analyzer-section select:focus,
.chart-analyzer-section textarea:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
    background: rgba(45, 55, 72, 0.8);
}

/* --- START: UPDATED Catalyst Scanner Watchlist Styles --- */
.catalyst-tag-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(45, 55, 72, 0.6);
    cursor: text;
    min-height: 58px;
}
.catalyst-tag {
    display: inline-flex;
    align-items: center;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #e1e5e9;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}
.catalyst-tag:hover {
    transform: translateY(-1px);
    background: rgba(34, 197, 94, 0.25);
    border-color: rgba(34, 197, 94, 0.6);
}
.delete-tag {
    background: transparent;
    border: none;
    color: #a0aec0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    cursor: pointer;
    font-size: 16px;
    line-height: 20px;
    padding: 0;
    transition: all 0.2s ease;
}
.delete-tag:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    transform: scale(1.1);
}
.delete-tag:focus {
    outline: none;
    box-shadow: none;
}
#catalyst-watchlist-input {
    flex-grow: 1;
    border: none;
    background: transparent;
    padding: 5px;
    color: #e1e5e9;
    min-width: 150px;
    font-size: 15px;
}
#catalyst-watchlist-input:focus {
    box-shadow: none;
}
.catalyst-watchlist-info {
    font-size: 12px;
    color: #a0aec0;
    margin-top: 8px;
    text-align: right;
}
/* --- END: UPDATED Catalyst Scanner Watchlist Styles --- */

.catalyst-results-container {
    margin-top: 25px;
}

.catalyst-results-container h3 {
    text-align: center;
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.catalyst-results-list {
    display: grid;
    gap: 15px;
}

.catalyst-result-item {
    background: rgba(45, 55, 72, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 15px 20px;
}

.catalyst-result-item:hover {
    transform: translateY(-2px);
    border-color: #22c55e;
}

.catalyst-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.catalyst-symbol {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.catalyst-score-label {
    font-size: 0.9rem;
    color: #a0aec0;
}

.catalyst-score-bar-container {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    height: 20px;
    position: relative;
    margin-bottom: 10px;
}

.catalyst-score-bar {
    height: 100%;
    border-radius: 20px;
    transition: width 0.5s ease-in-out;
}

.catalyst-score-bar.low { background: #f59e0b; }
.catalyst-score-bar.medium { background: #10b981; }
.catalyst-score-bar.high { background: #22c55e; }

.catalyst-score-value {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-weight: 600;
    font-size: 12px;
}

.catalyst-reason {
    font-size: 14px;
    color: #cbd5e0;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

.catalyst-news-snippet {
    font-size: 13px;
    color: #a0aec0;
    background: rgba(0,0,0,0.2);
    padding: 8px 12px;
    border-radius: 8px;
    margin: 0 0 15px 0;
    font-style: italic;
}

.analyze-catalyst-btn {
    width: 100%;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.analyze-catalyst-btn:hover {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
}

.catalyst-no-results {
    text-align: center;
    color: #a0aec0;
    font-style: italic;
    padding: 20px;
}

.catalyst-controls {
    display: flex;
    justify-content: center;
    margin: 25px 0 15px 0;
}

.catalyst-view-toggle {
    display: inline-flex;
    background: rgba(45, 55, 72, 0.4);
    border-radius: 10px;
    padding: 5px;
}

.view-btn {
    padding: 8px 20px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: transparent;
    color: #a0aec0;
    font-size: 13px;
}

.view-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.catalyst-heatmap-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.catalyst-heat-box {
    background: rgba(45, 55, 72, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}

.catalyst-heat-box:hover {
    transform: translateY(-5px);
    border-color: #fff;
}

.heat-box-symbol {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.heat-box-score {
    font-size: 1rem;
    font-weight: 500;
    color: #a0aec0;
}

.catalyst-heat-box.heat-low {
    border-left: 5px solid #f59e0b;
}
.catalyst-heat-box.heat-medium {
    border-left: 5px solid #10b981;
}
.catalyst-heat-box.heat-high {
    border-left: 5px solid #22c55e;
    background: rgba(34, 197, 94, 0.1);
}
.catalyst-heat-box.heat-high .heat-box-symbol,
.catalyst-heat-box.heat-high .heat-box-score {
    color: #4ade80;
}


.chart-analyzer-section input[type="file"] {
    padding: 12px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    background: rgba(45, 55, 72, 0.3);
    cursor: pointer;
}

.chart-analyzer-section input[type="file"]:hover {
    border-color: #22c55e;
    background: rgba(45, 55, 72, 0.5);
}

#chart-analyzer-image-preview {
    margin-top: 15px;
    text-align: center;
}

#chart-analyzer-image-preview img {
    max-width: 100%;
    max-height: 250px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Indicator Checkbox Styles */
.chart-analyzer-indicators {
    margin-top: 20px;
}
.chart-analyzer-indicators label {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
}
.indicator-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
}
.indicator-options label {
    display: flex;
    align-items: center;
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}
.indicator-options input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* Buttons - GREEN THEME */
.chart-analyzer-btn,
.chart-analyzer-pms-styles #pms-register-form .pms-form-submit input[type="submit"],
.chart-analyzer-pms-styles #pms-login-form .pms-form-submit input[type="submit"],
.chart-analyzer-pms-styles #pms-recover-password-form .pms-form-submit input[type="submit"],
.chart-analyzer-pms-styles #pms-account-form input[type="submit"],
.chart-analyzer-pms-styles .pms-account-subscription-actions a {
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: #fff !important;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    box-sizing: border-box;
}

.chart-analyzer-btn:hover,
.chart-analyzer-pms-styles #pms-register-form .pms-form-submit input[type="submit"]:hover,
.chart-analyzer-pms-styles #pms-login-form .pms-form-submit input[type="submit"]:hover,
.chart-analyzer-pms-styles #pms-recover-password-form .pms-form-submit input[type="submit"]:hover,
.chart-analyzer-pms-styles #pms-account-form input[type="submit"]:hover,
.chart-analyzer-pms-styles .pms-account-subscription-actions a:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.4);
}

.chart-analyzer-btn:disabled,
.chart-analyzer-pms-styles #pms-register-form .pms-form-submit input[type="submit"]:disabled,
.chart-analyzer-pms-styles #pms-login-form .pms-form-submit input[type="submit"]:disabled,
.chart-analyzer-pms-styles #pms-recover-password-form .pms-form-submit input[type="submit"]:disabled,
.chart-analyzer-pms-styles #pms-account-form input[type="submit"]:disabled {
    background: #555;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.chart-analyzer-btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Loading Spinner */
.chart-analyzer-loading-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.chart-analyzer-btn:disabled .chart-analyzer-loading-spinner {
    display: block;
}

/* Symbol Suggestions */
.chart-analyzer-symbol-container {
    position: relative;
}

.chart-analyzer-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(26, 32, 44, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.chart-analyzer-suggestions div {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chart-analyzer-suggestions div:hover {
    background: rgba(34, 197, 94, 0.2);
}

.chart-analyzer-suggestions div:last-child {
    border-bottom: none;
}

/* Analysis Results - IMPROVED MOBILE LAYOUT */
.chart-analyzer-analysis {
    margin-top: 30px;
    padding: 0;
    background: transparent;
    border: none;
    max-height: none;
    overflow-y: visible;
}

.chart-analyzer-analysis.empty {
    text-align: center;
    color: #718096;
    font-style: italic;
    padding: 60px 30px;
    background: rgba(26, 32, 44, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
}

.chart-analyzer-analysis.empty::before {
    content: '';
    display: block;
    width: 150px;
    height: 50px;
    background-image: url('https://chartsenseai.com/wp-content/uploads/2025/09/LOGO-CHARTSENSEAI-WHITE-.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin: 0 auto 20px auto;
    opacity: 0.5;
}

.chart-analyzer-analysis.empty::after {
    content: "Analysis results will appear here\ASelect a method above and click analyze";
    white-space: pre;
}

.chart-analyzer-analysis-header {
    padding: 20px;
    margin-bottom: 25px;
    background: rgba(45, 55, 72, 0.4);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.chart-analyzer-analysis-header h3 {
    margin: 0 0 10px;
    font-size: 20px;
    color: #fff;
}
.chart-analyzer-analysis-header .metadata {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #a0aec0;
    flex-wrap: wrap;
    align-items: center;
}
.chart-analyzer-analysis-header .metadata strong {
    color: #cbd5e0;
}
.chart-analyzer-analysis-header .recommendation {
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    color: #fff;
}
.chart-analyzer-analysis-header .rec-buy {
    background-color: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #4ade80;
}
.chart-analyzer-analysis-header .rec-sell {
    background-color: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #f87171;
}
.chart-analyzer-analysis-header .rec-hold {
    background-color: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.5);
    color: #fbbf24;
}
.chart-analyzer-analysis-header .price-change strong {
    color: #a0aec0;
}

.chart-analyzer-panels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.chart-analyzer-panel {
    background: rgba(45, 55, 72, 0.4);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    min-width: 0; /* Prevents overflow */
    word-wrap: break-word;
}

.chart-analyzer-panel:hover {
    transform: translateY(-5px);
    border-color: rgba(34, 197, 94, 0.5);
}

.chart-analyzer-panel-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-analyzer-panel-content {
    font-size: 14px;
    line-height: 1.6;
    color: #cbd5e0;
    flex-grow: 1;
    overflow-wrap: break-word;
    word-break: break-word;
}

.chart-analyzer-panel-content p {
    margin: 0 0 10px;
}
.chart-analyzer-panel-content p:last-child {
    margin-bottom: 0;
}

.chart-analyzer-panel-content ul {
    margin: 10px 0 10px 0;
    padding: 0;
    list-style-type: none;
}

.chart-analyzer-panel-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: bold;
}

.chart-analyzer-panel-content strong {
    color: #fff;
    font-weight: 600;
}

.chart-analyzer-panel-content em {
    color: #a0aec0;
    font-style: normal;
}

/* Chart Visualization Panel */
.chart-visualization-panel {
    grid-column: 1 / -1;
    min-height: 400px;
    position: relative; /* Needed for positioning the button */
}

/* --- START: LIVE NOW BUTTON --- */
.live-now-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.live-now-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(34, 197, 94, 0.4);
}
/* --- END: LIVE NOW BUTTON --- */

.chart-visualization-panel .chart-analyzer-panel-content {
    position: relative;
}
.chart-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.live-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #4ade80;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* Technical Summary Panel */
.technical-summary-panel {
    grid-column: 1 / -1;
    background: rgba(26, 32, 44, 0.9);
}

.technical-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
}

.technical-summary-grid div, .summary-grid div {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    background: rgba(45, 55, 72, 0.5);
    border-radius: 8px;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.technical-summary-grid strong, .summary-grid strong {
    color: #a0aec0;
    font-weight: 500;
    font-size: 13px;
}

.technical-summary-grid span, .summary-grid span {
    color: #fff;
    font-weight: 600;
    font-size: 13px;
}

.trend-bullish { color: #4ade80 !important; }
.trend-bearish { color: #f87171 !important; }
.trend-sideways { color: #fbbf24 !important; }

/* Error Messages & CTA Buttons */
.chart-analyzer-error,
.pms-error {
    padding: 25px;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 15px;
    color: #fca5a5;
    margin: 15px 0;
    font-size: 15px;
    line-height: 1.6;
    text-align: center;
}

.chart-analyzer-error.is-cta {
    background: rgba(45, 55, 72, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e1e5e9;
}

.chart-analyzer-error.is-cta h3 {
    color: #fff;
    font-size: 1.5rem;
    margin: 0 0 10px;
}

.chart-analyzer-error.is-cta p {
    color: #a0aec0;
    margin: 0;
}

.chart-analyzer-cta-buttons {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.chart-analyzer-cta-buttons .chart-analyzer-btn {
    margin-top: 0;
    width: auto;
    flex-grow: 1;
    max-width: 220px;
}

.chart-analyzer-cta-buttons .login-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-analyzer-cta-buttons .login-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    transform: translateY(-2px);
}


.chart-analyzer-success,
p.pms-success {
    padding: 15px 20px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    color: #86efac;
    margin: 15px 0;
    font-size: 14px;
}

/* === Collapsible Sidebar Layout === */
.desktop-only {
    display: flex;
}
.mobile-only {
    display: none;
}

.chart-analyzer-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 25px;
    align-items: flex-start;
    transition: grid-template-columns 0.3s ease-in-out;
}

.chart-analyzer-layout.no-sidebar {
    display: block;
}

.chart-analyzer-layout.sidebar-collapsed {
    grid-template-columns: 40px 1fr;
}

.chart-analyzer-sidebar {
    position: sticky;
    top: 40px;
    height: calc(100vh - 80px);
    overflow-y: auto;
    background: rgba(26, 32, 44, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease-in-out;
    overflow-x: hidden;
    z-index: 1001;
}

.sidebar-collapsed .chart-analyzer-sidebar {
    padding: 0;
    display: flex;
    justify-content: center;
}

.sidebar-collapsed .chart-analyzer-sidebar > *:not(.chart-analyzer-history-header) {
    display: none;
}

.sidebar-collapsed .chart-analyzer-history-header {
    border: none;
    margin: 0;
    padding: 20px 0;
}
.sidebar-collapsed .chart-analyzer-history-header h3 {
    display: none;
}

.chart-analyzer-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#chart-analyzer-toggle-history-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #a0aec0;
    cursor: pointer;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
}
#chart-analyzer-toggle-history-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
#chart-analyzer-toggle-history-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease-in-out;
    pointer-events: none;
}

.sidebar-collapsed #chart-analyzer-toggle-history-btn svg {
    transform: rotate(180deg);
}

.chart-analyzer-sidebar .chart-analyzer-history-header h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    transition: all 0.3s ease-in-out;
    white-space: nowrap;
}

#chart-analyzer-clear-history-btn {
    width: 100%;
    margin-top: 15px;
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#chart-analyzer-clear-history-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.chart-analyzer-history-item {
    position: relative;
    padding: 15px;
    margin-bottom: 10px;
    background: rgba(45, 55, 72, 0.4);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
}

.chart-analyzer-history-item:hover {
    background: rgba(45, 55, 72, 0.7);
    border-color: #22c55e;
}

.chart-analyzer-history-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    opacity: 0.5;
    transition: all 0.2s ease;
}

.chart-analyzer-history-item:hover .chart-analyzer-history-delete {
    opacity: 1;
}

.chart-analyzer-history-delete:hover {
    background: #ef4444;
    color: #fff;
    transform: scale(1.1);
}

.chart-analyzer-history-symbol {
    font-weight: 600;
    color: #22c55e;
}

.chart-analyzer-history-preview {
    color: #cbd5e0;
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Modal Overlay Styles */
.chart-analyzer-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    padding-top: 60px;
}

.modal-content {
    background-color: #2D3748;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 80%;
    border-radius: 15px;
    position: relative;
}

.close-modal-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal-btn:hover,
.close-modal-btn:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}


/* Mobile Menu & Sliding Panel Styles */
#chart-analyzer-mobile-menu-btn {
    position: absolute;
    top: 20px;
    left: 15px;
    z-index: 1002;
    background: rgba(45, 55, 72, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e1e5e9;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    padding: 0;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.chart-analyzer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-sidebar-visible .chart-analyzer-overlay {
    opacity: 1;
    visibility: visible;
}


/* RESPONSIVE DESIGN */
@media (min-width: 1025px) {
    .chart-analyzer-main-content {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
        align-items: start;
    }
    .chart-analyzer-main-content > * {
        grid-column: 1 / -1;
    }
}


@media (max-width: 1024px) {
    .desktop-only {
        display: none !important;
    }
    .mobile-only,
    #chart-analyzer-mobile-menu-btn {
        display: flex;
    }

    .chart-analyzer-layout,
    .chart-analyzer-layout.sidebar-collapsed {
        display: block;
        grid-template-columns: 1fr;
    }

    .chart-analyzer-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 280px;
        max-height: 100vh;
        border-radius: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }

    .mobile-sidebar-visible .chart-analyzer-sidebar {
        transform: translateX(0);
    }
    
    .chart-analyzer-main-content {
        position: relative;
    }

    /* Center logo on mobile */
    .chart-analyzer-main-content .logo {
        display: block;
        margin-left: auto;
        margin-right: auto;
    }
    
    .user-menu-container {
        top: 20px;
        right: 15px;
    }
}

@media (max-width: 768px) {
    .chart-analyzer-container {
        margin: 15px;
        padding: 20px;
    }
    .chart-analyzer-btn-group.live-scan-group {
        flex-direction: column; /* Stack vertically */
        align-items: stretch;  /* Make items full width */
        gap: 10px;             /* Vertical gap BETWEEN buttons */
    }

    /* Ensure buttons take full width when stacked */
    .chart-analyzer-btn-group.live-scan-group .chart-analyzer-btn {
        flex-basis: auto;
        min-width: unset;
        width: 100%;
        margin-bottom: 5px; /* Add small space below each button */
    }
    .chart-analyzer-btn-group.live-scan-group .chart-analyzer-btn:last-of-type {
         margin-bottom: 0; /* Remove margin from last button */
    }


    /* Position the icon centered, below the buttons */
    .live-scan-group .scan-type-tooltip {
         margin-left: 0;     /* Remove horizontal margin */
         margin-top: 15px;   /* Add significant space ABOVE the icon */
         align-self: center; /* Center the icon horizontally */
    }
    
    .chart-analyzer-container h2 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    .chart-analyzer-toggle-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .chart-analyzer-toggle-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .chart-analyzer-section {
        padding: 15px;
    }
    
    .chart-analyzer-panels-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .dashboard-grid {
        justify-items: center; /* Centers the content of each item */
    }

    .dashboard-panel {
        padding: 15px;
        margin-bottom: 0;
        width: 100%;
        max-width: 400px; /* Optional: adds a max-width to keep panels from getting too wide on tablets */
    }
    
    .chart-analyzer-panel-title {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .chart-analyzer-panel-content {
        font-size: 16px; /* Increased from 13px */
        line-height: 1.6; /* Added for better spacing */
    }
    
    .chart-visualization-panel {
        min-height: 300px;
    }
    
    .chart-container {
        height: 250px !important;
    }
    
    .technical-summary-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .fng-gauge {
        width: 150px;
        height: 75px;
    }
    
    .fng-gauge-bar {
        width: 150px;
        height: 150px;
        border-width: 15px;
    }
    
    .fng-gauge-needle {
        left: 74px;
        height: 67px;
    }

    .user-menu-container {
        top: 20px;
        right: 15px;
    }
.key-levels-grid {
        grid-template-columns: 1fr; /* This stacks the items vertically */
    }

    .metric-box .value {
        font-size: 2.2rem; /* This makes the price number larger */
    }
    .key-levels-grid {
        grid-template-columns: 1fr !important; /* This overrides the inline style to stack the items */
    }

    .key-levels-grid .metric-box .value {
        font-size: 2.2rem !important; /* This overrides the inline font-size to make it larger */
    }
}

@media (max-width: 480px) {
    .chart-analyzer-container {
        margin: 10px;
        padding: 15px;
    }
    
    .chart-analyzer-container h2 {
        font-size: 1.6rem;
    }
    
    .chart-analyzer-section {
        padding: 12px;
    }
    
    .chart-analyzer-section input,
    .chart-analyzer-section select {
        font-size: 14px;
        padding: 12px 14px;
    }
    
    .chart-analyzer-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .chart-analyzer-panel {
        padding: 12px;
    }
    
    .chart-analyzer-panel-title {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .chart-analyzer-panel-content {
        font-size: 14px; /* Increased from 12px */
    }
    
    .chart-container {
        height: 200px !important;
    }
    
    .technical-summary-grid div {
        flex-direction: column;
        text-align: center;
        gap: 3px;
    }
    
    .fng-gauge {
        width: 150px;
        height: 75px;
    }
    
    .fng-gauge-bar {
        width: 150px;
        height: 150px;
        border-width: 15px;
    }
    
    .fng-gauge-needle {
        left: 74px;
        height: 67px;
    }
}

/* Dark theme compatibility */
body.dark .chart-analyzer-container,
.wp-admin.dark .chart-analyzer-container {
    background: rgba(17, 24, 39, 0.95);
}

body.dark .chart-analyzer-section,
.wp-admin.dark .chart-analyzer-section {
    background: rgba(31, 41, 55, 0.4);
}

/* Print styles */
@media print {
    .chart-analyzer-toggle-buttons,
    .chart-analyzer-section,
    .chart-analyzer-btn {
        display: none;
    }
    
    .chart-analyzer-analysis {
        background: white;
        color: black;
        box-shadow: none;
        border: 1px solid #ccc;
        max-height: none;
        overflow: visible;
    }
    
    .chart-analyzer-analysis h3,
    .chart-analyzer-analysis strong {
        color: black;
    }
    
.chart-analyzer-analysis p,
.chart-analyzer-analysis li {
    color: #333;
}
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 10px;
}

/* Advanced Indicators Panel */
.advanced-indicators-panel {
    grid-column: 1 / -1;
    background: rgba(26, 32, 44, 0.9);
}

.advanced-indicators-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.advanced-indicators-grid > div {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    background: rgba(45, 55, 72, 0.5);
    border-radius: 8px;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.advanced-indicators-grid strong {
    flex-grow: 1;
    font-weight: 500;
    color: #a0aec0;
}

.advanced-indicators-grid span {
    font-size: 14px;
    color: #fff;
    font-weight: 600;
}

/* Paid Member Subscriptions Form Styling */
.chart-analyzer-pms-styles .pms-form, 
.chart-analyzer-pms-styles #pms-register-form, 
.chart-analyzer-pms-styles #pms-login-form, 
.chart-analyzer-pms-styles #pms-recover-password-form, 
.chart-analyzer-pms-styles #pms-account-form {
    max-width: 100%;
    margin: 40px auto;
    padding: 40px 15px;
    background: rgba(26, 32, 44, 0.95);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #e1e5e9;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.chart-analyzer-pms-styles .pms-form p, 
.chart-analyzer-pms-styles .pms-form .pms-field, 
.chart-analyzer-pms-styles .pms-form .pms-form-field {
    margin-bottom: 20px;
}

.chart-analyzer-pms-styles .pms-form label {
    font-size: 14px;
    font-weight: 600;
    display: block;
    margin: 15px 0 8px;
    color: #cbd5e0;
}

.chart-analyzer-pms-styles .pms-form input[type="text"],
.chart-analyzer-pms-styles .pms-form input[type="email"],
.chart-analyzer-pms-styles .pms-form input[type="password"],
.chart-analyzer-pms-styles .pms-form input[type="number"],
.chart-analyzer-pms-styles .pms-form select,
.chart-analyzer-pms-styles .pms-form textarea {
    width: 100% !important;
    padding: 14px 16px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(45, 55, 72, 0.6) !important;
    color: #e1e5e9 !important;
    font-size: 15px !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(5px) !important;
    box-shadow: none !important;
    height: auto !important;
}

.chart-analyzer-pms-styles .pms-form input[type="text"]:focus,
.chart-analyzer-pms-styles .pms-form input[type="email"]:focus,
.chart-analyzer-pms-styles .pms-form input[type="password"]:focus,
.chart-analyzer-pms-styles .pms-form input[type="number"]:focus,
.chart-analyzer-pms-styles .pms-form select:focus,
.chart-analyzer-pms-styles .pms-form textarea:focus {
    outline: none !important;
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1) !important;
    background: rgba(45, 55, 72, 0.8) !important;
}

.chart-analyzer-pms-styles .pms-subscription-plan {
    background: rgba(45, 55, 72, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.chart-analyzer-pms-styles .pms-subscription-plan:hover {
    border-color: rgba(34, 197, 94, 0.5);
    background: rgba(45, 55, 72, 0.6);
}

.chart-analyzer-pms-styles .pms-subscription-plan input[type="radio"] {
    margin-right: 10px;
}

.chart-analyzer-pms-styles .pms-subscription-plan-name {
    font-weight: 600;
    color: #fff;
}

.chart-analyzer-pms-styles .pms-subscription-plan-price {
    color: #22c55e;
    font-weight: bold;
}

.chart-analyzer-pms-styles .pms-subscription-plan-description {
    color: #a0aec0;
    font-size: 13px;
    margin-top: 5px;
}

.chart-analyzer-pms-styles .pms-form a {
    color: #22c55e;
    text-decoration: none;
}
.chart-analyzer-pms-styles .pms-form a:hover {
    text-decoration: underline;
}

/* === PMS ACCOUNT PAGE FIXES === */
.chart-analyzer-pms-styles #pms-account-form h3,
.chart-analyzer-pms-styles #pms-account-form h4 {
    text-align: left;
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-analyzer-pms-styles #pms-account-form table {
    width: 100%;
    color: #e1e5e9;
    border: none;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.chart-analyzer-pms-styles #pms-account-form table th, 
.chart-analyzer-pms-styles #pms-account-form table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
    background: transparent;
}

.chart-analyzer-pms-styles #pms-account-form table th {
    color: #a0aec0;
    font-weight: 600;
}

.chart-analyzer-pms-styles #pms-account-form table thead th {
    background-color: rgba(45, 55, 72, 0.3);
}

.chart-analyzer-pms-styles #pms-account-form table tbody tr:last-child th,
.chart-analyzer-pms-styles #pms-account-form table tbody tr:last-child td {
    border-bottom: none;
}

.chart-analyzer-pms-styles #pms-account-form table tbody tr:hover {
    background: rgba(45, 55, 72, 0.2);
}

.chart-analyzer-pms-styles .pms-account-subscription-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chart-analyzer-pms-styles .pms-account-subscription-actions a {
    margin: 0;
    width: auto;
    padding: 10px 20px;
    font-size: 13px;
}

.chart-analyzer-pms-styles .pms-account-subscription-actions a.pms-account-subscription-action-renew,
.chart-analyzer-pms-styles .pms-account-subscription-actions a.pms-account-subscription-action-upgrade {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}
.chart-analyzer-pms-styles .pms-account-subscription-actions a.pms-account-subscription-action-cancel,
.chart-analyzer-pms-styles .pms-account-subscription-actions a.pms-account-subscription-action-abandon {
    background: linear-gradient(135deg, #f87171, #ef4444);
}
.chart-analyzer-pms-styles .pms-account-subscription-actions a.pms-account-subscription-action-retry-payment {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.chart-analyzer-pms-styles .pms-edit-profile-form, 
.chart-analyzer-pms-styles .pms-form-edit-profile {
    padding: 25px;
    margin-top: 30px;
    border-radius: 15px;
    background: rgba(45, 55, 72, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.credits-remaining {
    font-size: 12px;
    margin-left: 10px;
    opacity: 0.7;
}

.chart-analyzer-credit-balance {
    background: rgba(45, 55, 72, 0.4);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.chart-analyzer-credit-balance h3 {
    margin: 0 0 10px;
    color: #fff;
}

.chart-analyzer-credit-balance p {
    font-size: 24px;
    font-weight: bold;
    color: #22c55e;
    margin: 0;
}
.chart-analyzer-dashboard-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 40px;
    background: rgba(26, 32, 44, 0.95);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #e1e5e9;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
}

.dashboard-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px;
}

.dashboard-header p {
    font-size: 1rem;
    color: #a0aec0;
    margin: 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.dashboard-panel {
    background: rgba(45, 55, 72, 0.4);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
}

.panel-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.subscription-details p {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    margin: 0 0 15px;
    color: #cbd5e0;
}
.subscription-details p strong {
    color: #a0aec0;
    font-weight: 500;
}
.subscription-details .status-active {
    color: #4ade80;
    font-weight: 600;
}

.credits-panel .panel-content {
    text-align: center;
    align-items: center;
}
.credit-balance-prominent {
    font-size: 6rem;
    font-weight: 700;
    color: #22c55e;
    line-height: 1;
    margin-bottom: 10px;
}
.credit-balance-label {
    color: #a0aec0;
    margin-bottom: 25px;
}

.dashboard-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: #fff !important;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}
.dashboard-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #a0aec0;
    transform: translateY(-2px);
}
.dashboard-btn.upgrade-btn {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none;
}
.dashboard-btn.upgrade-btn:hover {
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.4);
}

.history-panel {
    grid-column: 1 / -1; /* Make history panel full width */
}

.dashboard-history-list .chart-analyzer-history-item {
    background: rgba(26, 32, 44, 0.6);
}

/* === Custom layout styles for button and counter */
/* Container for the button and counter */
.chart-analyzer-btn-group {
    display: flex;
    align-items: center;
    gap: 15px; /* Spacing between the button and the counter */
    margin-top: 20px;
    flex-wrap: wrap; /* Allows items to wrap on small screens */
}

/* Style for the save button */
#save-watchlist-btn {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.5);
    color: #93c5fd;
    flex-grow: 1;
    max-width: 180px;
}

#save-watchlist-btn:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: #60a5fa;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: none;
}


/* Style the new credit counter display */
.credits-display {
    font-size: 14px;
    font-weight: 500;
    color: #fff; /* Sets the text color to white */
    white-space: nowrap;
}

.credits-display span {
    font-size: 18px;
    font-weight: 700;
    color: #22c55e;
    margin-right: 5px;
}

/* AI Persona Display Styles */
#chart-analyzer-persona-display {
    background: rgba(45, 55, 72, 0.6);
    border-color: #22c55e;
    text-align: center;
    margin-bottom: 25px;
    display: none; /* Hidden by default, JS will show it */
}

#chart-analyzer-persona-display .chart-analyzer-panel-title {
    font-size: 1.2rem;
    border-bottom: none;
    padding-bottom: 5px;
    margin-bottom: 5px;
}

#chart-analyzer-persona-display .chart-analyzer-panel-content {
    font-size: 0.9rem;
    color: #a0aec0;
}


/* Mobile-specific styling */
@media (max-width: 768px) {
    .chart-analyzer-btn-group {
        flex-direction: column; /* Stacks the items vertically on mobile */
        align-items: stretch;
        gap: 0;
    }
    .dashboard-grid {
        display: flex;
        flex-direction: column;
        align-items: center; /* This will center the items horizontally */
        gap: 20px;
        margin: 0 auto; /* This will center the entire grid container */
    }

    .dashboard-panel {
        padding: 15px;
        margin-bottom: 0;
        width: 100%;
        max-width: 400px; /* Optional: adds a max-width to keep panels from getting too wide on tablets */
    }

    .credits-display {
        text-align: center;
        justify-content: center;
        margin-top: 10px;
    }
    .chart-analyzer-btn {
        width: 100%; /* Makes the button full-width on mobile */
    }

     #save-watchlist-btn {
        max-width: 100%;
        margin-top: 10px;
    }
}
/* AR Mode Selection Modal Specific Styles */
#ar-mode-selection-modal .modal-content {
    max-width: 500px;
}

#ar-mode-selection-modal .chart-analyzer-cta-buttons {
    flex-direction: column;
    gap: 15px;
}

#ar-mode-selection-modal .chart-analyzer-btn {
    width: 100%;
    margin: 0;
}
.chart-analyzer-analysis-header .metadata {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #a0aec0;
    flex-wrap: wrap;
    align-items: center;
}
.chart-analyzer-analysis-header .metadata strong {
    color: #cbd5e0;
}

/* NEW: Style for the recommendation text */
.chart-analyzer-analysis-header .recommendation-text {
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    color: #fff;
    white-space: nowrap;
}

.chart-analyzer-analysis-header .rec-buy {
    background-color: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #4ade80;
}
.chart-analyzer-analysis-header .rec-sell {
    background-color: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #f87171;
}
.chart-analyzer-analysis-header .rec-hold {
    background-color: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.5);
    color: #fbbf24;
}

/* NEW: Styles for the star rating container */
.confidence-rating-container {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.confidence-label {
    font-weight: 600;
    color: #fff;
}

.confidence-stars {
    color: #FFD700; /* Gold color for the stars */
    font-size: 1.1em;
}

.chart-analyzer-analysis-header .price-change strong {
    color: #a0aec0;
}

/* --- New User Menu Styles --- */
.user-menu-container {
    position: absolute;
    top: 50px;
    right: 20px;
    z-index: 10;
}

.user-menu-btn {
    background: rgba(45, 55, 72, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e1e5e9;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-menu-btn:hover {
    background: rgba(45, 55, 72, 1);
    border-color: #22c55e;
}

.user-menu-btn svg {
    width: 20px;
    height: 20px;
}

.user-menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(26, 32, 44, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 0;
    min-width: 150px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1003;
    animation: fadeIn 0.2s ease-in-out;
}

.user-menu-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.user-menu-dropdown li a {
    display: block;
    padding: 10px 20px;
    color: #cbd5e0;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.user-menu-dropdown li a:hover {
    background: rgba(34, 197, 94, 0.2);
    color: #fff;
}

/* Fix for mobile responsiveness */
@media (max-width: 1024px) {
    .user-menu-container {
        top: 20px;
        right: 15px;
    }
}
@media (max-width: 768px) {
    #chart-analyzer-mobile-menu-btn {
        top: 20px;
        left: 15px;
    }

    .user-menu-container {
        top: 20px;
        right: 15px;
    }
}
@media (max-width: 768px) {
    .chart-analyzer-panel-content {
        font-size: 16px; /* Increased from 13px */
        line-height: 1.6; /* Added for better spacing */
    }
}
@media (max-width: 480px) {
    .chart-analyzer-panel-content {
        font-size: 14px; /* Increased from 12px */
    }
}


/* --- START: NEW STYLES FOR INFO ICON & TOOLTIP --- */
.section-description {
    text-align: center; 
    margin-bottom: 25px; 
    color: #a0aec0;
}

.info-tooltip-icon {
    display: inline-block;
    position: relative;
    width: 18px;
    height: 18px;
    background-color: #4a5568;
    color: #e2e8f0;
    border-radius: 50%;
    text-align: center;
    font-size: 12px;
    line-height: 18px;
    cursor: help;
    margin-left: 8px;
    font-weight: bold;
    font-style: italic;
    top: -1px;
}

.info-tooltip-icon .tooltip-text {
    visibility: hidden;
    width: 250px;
    background-color: #1a202c;
    color: #cbd5e0;
    text-align: left;
    border-radius: 8px;
    padding: 12px;
    position: absolute;
    z-index: 1;
    bottom: 150%;
    left: 50%;
    margin-left: -125px;
    opacity: 0;
    transition: opacity 0.3s;
    border: 1px solid #4a5568;
    font-size: 13px;
    line-height: 1.5;
    font-weight: normal;
    font-style: normal;
}

.info-tooltip-icon:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.info-tooltip-icon .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1a202c transparent transparent transparent;
}
/* --- END: NEW STYLES FOR INFO ICON & TOOLTIP --- */

/* --- START: NARRATIVE PANEL WIDTH FIX --- */
.narrative-panel {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
/* --- END: NARRATIVE PANEL WIDTH FIX --- */

/* --- START: API KEYS PANEL STYLES (DASHBOARD) --- */
.api-keys-panel .panel-content {
    align-items: center;
}

#api-key-form {
    width: 100%;
    max-width: 500px;
    margin-top: 20px;
}

.api-status {
    width: 100%;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
}

.api-status.is-connected {
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.api-status.is-disconnected {
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

.api-form-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.api-form-buttons .dashboard-btn {
    margin-top: 0;
}

.dashboard-btn.delete-btn {
    background: linear-gradient(135deg, #f87171, #ef4444);
    border: none;
}
.dashboard-btn.delete-btn:hover {
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.4);
}
/* --- END: API KEYS PANEL STYLES --- */


/* --- START: AI PSYCHOLOGIST STYLES (ANALYZER) --- */
#chart-analyzer-psychologist-form .upload-options {
    text-align: center;
    margin-bottom: 20px;
}

#chart-analyzer-psychologist-form .upload-options p {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 15px;
}

#chart-analyzer-psychologist-form .upload-options label {
    display: inline-block;
    margin: 5px 15px;
    font-size: 14px;
    color: #cbd5e0;
    cursor: pointer;
}

#chart-analyzer-psychologist-form .upload-options label.disabled {
    color: #718096;
    cursor: not-allowed;
    opacity: 0.6;
}

.psychologist-report-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.psychologist-panel .psychologist-title {
    font-size: 1.5rem;
    text-align: center;
    border-bottom: none;
    padding-bottom: 0;
    color: #22c55e;
}

.psychologist-panel .chart-analyzer-panel-content {
    font-size: 1rem;
    line-height: 1.7;
}

.psychologist-panel .chart-analyzer-panel-content p {
    margin-bottom: 1em;
}

.psychologist-panel .chart-analyzer-panel-content ul {
    list-style-type: none;
    padding-left: 5px;
    margin-top: 1em;
}

.psychologist-panel .chart-analyzer-panel-content li {
    padding-left: 25px;
    margin-bottom: 0.25em;
    position: relative;
}

/* --- END: AI PSYCHOLOGIST STYLES --- */


/* --- SURGICAL ADDITION START --- */
/* Progress Bar Styles */
.progress-bar-container {
    height: 10px;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    margin-top: 15px;
    overflow: hidden;
    display: none; /* Initially hidden */
}

.progress-bar-fill {
    height: 100%;
    width: 0%; /* Start empty */
    background: linear-gradient(90deg, #22c55e, #16a34a); /* Solid fill */
    box-shadow: 0 0 10px #22c55e;
    transition: width 0.5s ease-out; /* Smoothly animate the width */
}
/* REMOVED the .is-animating class and @keyframes animation */

.waiting-tips {
    display: none;
    text-align: center;
    margin-top: 15px;
    color: #4ade80; /* Matrix/Terminal Green */
    font-family: 'Courier New', Courier, monospace; /* Monospace font for "Tech" feel */
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.4); /* Dark background */
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid rgba(74, 222, 128, 0.2); /* Subtle green border */
    animation: pulseText 2s infinite; /* Breathing effect */
    box-shadow: 0 0 15px rgba(74, 222, 128, 0.1); /* Faint green glow */
}

@keyframes pulseText {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

/* Add more space below each paragraph */
.chart-analyzer-panel-content p {
    margin: 0 0 1.25em; /* Increased from 10px */
}

/* Ensure lists have proper spacing and indentation */
.chart-analyzer-panel-content ul {
    margin: 0 0 1.25em 0; /* Standardized bottom margin */
    padding-left: 5px; /* Base indentation */
    list-style-type: none;
}

/* Add space below each bullet point and indent the text */
.chart-analyzer-panel-content li {
    position: relative;
    padding-left: 20px; /* Indent text away from the bullet */
    margin-bottom: 0.25em; /* Space between each list item */
}

/* Position the custom bullet correctly with the new padding */
.chart-analyzer-panel-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0; /* Align bullet with the top of the text line */
    color: #22c55e;
    font-weight: bold;
}

/* --- END: SPACING FIX --- */
/* --- START: TRADE PLAN SIGNAL COLORS --- */

/* Green for Buy/Long signals */
.signal-buy {
    color: #4ade80; /* Bright Green */
    font-weight: 700;
}

/* Red for Sell/Short signals */
.signal-sell {
    color: #f87171; /* Bright Red */
    font-weight: 700;
}

/* Yellow for Hold/Wait signals */
.signal-hold {
    color: #fbbf24; /* Amber/Yellow */
    font-weight: 700;
}

/* --- END: SIGNAL COLORS --- */

/* --- SURGICAL ADDITION START --- */
.conviction-panel {
    max-width: 800px;
    margin: 20px auto;
    text-align: center;
}

.conviction-score-container {
    margin-bottom: 25px;
}

.conviction-score-gauge {
    width: 200px;
    height: 100px;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
}

.conviction-score-fill {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: conic-gradient(#f87171, #fbbf24, #4ade80);
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 1s ease-out;
}

.conviction-score-cover {
    width: 160px;
    height: 160px;
    background: #1a202c; /* Match your panel background */
    border-radius: 50%;
    position: absolute;
    top: 40px;
    left: 20px;
}

.conviction-score-value {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
}

.conviction-score-label {
    /* FIX: Changed margin-top to a positive value */
    margin-top: 5px;
    font-size: 1rem;
    color: #a0aec0;
}

.conviction-state {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 25px;
    border: 1px solid;
}
/* --- SURGICAL ADDITION END --- */
/* --- START: REMOVE ALL ITALICS FROM ANALYSIS PANELS --- */
.chart-analyzer-panel-content,
.chart-analyzer-panel-content *,
.psychologist-panel .chart-analyzer-panel-content * {
    font-style: normal !important;
}
/* --- END: REMOVE ALL ITALICS FROM ANALYSIS PANELS --- */
/* --- New Secondary CTA Container (Account/Logout) --- */
.chart-analyzer-secondary-cta {
    margin-top: 15px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.chart-analyzer-secondary-cta .chart-analyzer-btn {
    margin-top: 0;
    width: auto;
    flex-grow: 1;
    max-width: 200px;
    /* Secondary Button Styling */
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a0aec0 !important; 
    box-shadow: none;
}

.chart-analyzer-secondary-cta .chart-analyzer-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #22c55e;
    transform: translateY(-2px);
    box-shadow: none;
    color: #fff !important;
}

/* Ensure the primary button is full width above these if necessary */
.chart-analyzer-cta-buttons .chart-analyzer-btn {
    width: 100%; /* Ensure main CTA button fills its container */
    max-width: 400px; /* Limit max width for main CTA */
}

@media (max-width: 480px) {
    .chart-analyzer-secondary-cta {
        flex-direction: column;
        gap: 10px;
    }
    .chart-analyzer-secondary-cta .chart-analyzer-btn {
        max-width: 100%;
    }
}
/* --- New Summary Panel Styles --- */
.analysis-results-container {
    max-width: 600px;
    margin: 20px auto;
}

.summary-panel {
    background: rgba(45, 55, 72, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(10px);
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.summary-header h4 {
    margin: 0;
    font-size: 1.2rem;
    color: #fff;
}

.signal-tag {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.signal-tag.signal-bullish {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.signal-tag.signal-bearish {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.signal-tag.signal-neutral {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.summary-panel label {
    display: block;
    font-size: 0.8rem;
    color: #a0aec0;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 600;
}

.confidence-section {
    margin-bottom: 20px;
}

.confidence-meter {
    width: 100%;
    height: 24px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.confidence-meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #f87171, #fbbf24, #4ade80);
    border-radius: 12px;
    transition: width 0.5s ease-out;
}

.confidence-meter span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.key-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.metric-box {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.metric-box label {
    margin-bottom: 5px;
}

.metric-box span {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.metric-box.metric-stop span {
    color: #f87171;
}

.metric-box.metric-target span {
    color: #4ade80;
}

.patterns-section {
    margin-bottom: 20px;
}

.pattern-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pattern-tag {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.summary-text-section p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #cbd5e0;
    margin: 0;
}

.view-toggle-container {
    margin-top: 25px;
}

#view-details-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#view-details-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.detailed-panels-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}
.analysis-results-container {
    max-width: 1000px;
    margin: 20px auto;
}

.quantum-core-panel {
    background: #111827; /* Very dark blue-gray */
    border: 1px solid rgba(129, 140, 153, 0.2);
    border-radius: 24px;
    padding: 40px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.quantum-core-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: 
        radial-gradient(rgba(129, 140, 153, 0.1) 1px, transparent 1px),
        radial-gradient(rgba(129, 140, 153, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    background-position: 0 0, 15px 15px;
    opacity: 0.5;
    z-index: -1;
    border-radius: 24px;
}

.quantum-core-header {
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    padding-bottom: 15px; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    gap: 5px; 
}
.core-signal {
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
}
.signal-bullish .core-signal { color: #4ade80; }
.signal-bearish .core-signal { color: #f87171; }
.signal-neutral .core-signal { color: #60a5fa; }

.core-persona {
    /* font-size, color, font-weight */
    /* REMOVE order: 2; flex-shrink: 0; */
    margin-top: 5px; /* Add a little space above persona if kept */
}
.core-label {
    text-align: center;
    margin-top: 0; 
    margin-bottom: 30px; 
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- The Core Orb --- */
.quantum-core {
    --confidence-level: 50; 
    --size: 180px;
    width: var(--size);
    height: var(--size);
    position: relative;
    margin: 20px auto 10px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.core-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0.4;
    filter: blur(40px);
    animation: pulse 3s infinite ease-in-out;
}
.signal-bullish .core-glow { background: #4ade80; }
.signal-bearish .core-glow { background: #f87171; }
.signal-neutral .core-glow { background: #60a5fa; }

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.4; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(0.9); opacity: 0.4; }
}

.core-orb {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.3), rgba(255,255,255,0) 70%), #111827;
    border: 1px solid rgba(255,255,255,0.1);
}

.core-text {
    position: absolute;
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 15px rgba(0,0,0,0.5);
}

/* --- Metric Shards --- */
.metric-shards {
    display: grid;
     grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-shard {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(129, 140, 153, 0.2);
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0% 100%); /* Angled shard shape */
}

.metric-shard:hover {
    background: rgba(30, 41, 59, 1);
    transform: translateY(-5px);
    border-color: #9ca3af;
}

.metric-shard label {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 8px;
}

.metric-shard .value {
    font-size: 1.75rem;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.shard-entry .value { color: #e5e7eb; }
.shard-stop .value { color: #f87171; }
shard-target .value {
    color: #4ade80;
    font-size: 1.5rem;      /* Slightly smaller font to fit two lines */
    font-weight: 700;       /* Explicitly set the bold font weight */
    line-height: 1.4;       /* Add space between the two target prices */
}

/* --- Details Section --- */
.key-levels-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.metric-box {
    text-align: center;
    padding: 15px;
    border-radius: 12px;
}

.metric-box-support {
    background: rgba(34, 197, 94, 0.1);
}
.metric-box-support label {
    color: #4ade80;
}
.metric-box-support .value {
    font-size: 1.5rem;
    color: #4ade80;
}

.metric-box-resistance {
    background: rgba(239, 68, 68, 0.1);
}
.metric-box-resistance label {
    color: #f87171;
}
.metric-box-resistance .value {
    font-size: 1.5rem;
    color: #f87171;
}
.quantum-details {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid rgba(129, 140, 153, 0.2);
}

.quantum-section { margin-bottom: 20px; }
.quantum-section:last-child { margin-bottom: 0; }
.quantum-section label {
    font-size: 0.9rem;
    color: #d1d5db;
    margin-bottom: 12px;
}

.pattern-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.pattern-tag {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #93c5fd;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.quantum-details p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #d1d5db;
    margin: 0;
}

.view-toggle-container {
    margin-top: 30px;
}
#view-details-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
#view-details-btn:hover { background: rgba(255, 255, 255, 0.1); 
}
.metric-shard.shard-target .value-reward-2 {
    display: block;
    font-size: 1.2rem; /* Slightly smaller for TP2 */
    color: #a0aec0; /* More subtle color */
    margin-top: 5px;
}

.quantum-core-container {
    position: relative;
}
.confidence-breakdown {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 50%;
    left: calc(50% + 100px); /* Adjusted closer to orb */
    transform: translateY(-50%);
    background: #1e293b;
    border: 1px solid rgba(129, 140, 153, 0.3);
    border-radius: 8px;
    padding: 10px 15px;
    width: 200px;
    transition: all 0.2s ease-in-out;
    z-index: 999; /* Increased from 10 to 999 */
    pointer-events: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5); /* Added shadow for depth */
}
.quantum-core-container:hover .confidence-breakdown {
    visibility: visible;
    opacity: 1;
}
.confidence-breakdown div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 5px;
}
.confidence-breakdown div span:first-child {
    text-transform: capitalize;
}
.breakdown-bar {
    width: 100px;
    height: 8px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 4px;
}
.breakdown-bar div {
    height: 100%;
    background: #60a5fa;
    border-radius: 4px;
}

/* Standby Mode for No Trade */
.standby-mode .core-signal { color: #9ca3af !important; }
.standby-mode .core-glow { background: #475569 !important; animation: none; opacity: 0.2; }
.standby-mode .core-orb { background: #334155; }
.standby-mode .core-text { display: none; }


/* Strategy Scorecard Panel */
.strategy-scorecard-panel {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(129, 140, 153, 0.1);
}
.strategy-scorecard-panel table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.strategy-scorecard-panel th, .strategy-scorecard-panel td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(129, 140, 153, 0.2);
}
.strategy-scorecard-panel th {
    color: #9ca3af;
    font-weight: 600;
}
.strategy-scorecard-panel tr:last-child td { border-bottom: none; }
.strategy-scorecard-panel td { color: #e5e7eb; 
}
/* Fallback for the old summary panel in case it appears */
.summary-panel { display: none; 
/* --- FIX: Target Price Color in Summary Panel --- */
.shard-target .value-reward,
.shard-target .value-reward-2 {
    color: #4ade80 !important; /* Bright Green for profit targets */
}
/* --- STYLING FOR N/A VALUES --- */
.metric-shard .value-na {
    color: #e5e7eb !important; /* Use the neutral white color */
}
/* --- STYLING FOR STACKED ENTRY PRICE --- */
.shard-entry .value {
    font-size: 1.2rem;    /* Adjust font size to fit two lines */
    line-height: 1.4;     /* Adjust line height for stacked numbers */
}
.quantum-core-panel .asset-info-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    background: rgba(30, 41, 59, 0.5) !important; /* Added !important for override */
    border: 1px solid rgba(129, 140, 153, 0.2) !important;
    padding: 15px 20px !important;
    border-radius: 12px !important;
    margin-top: 30px;  /* Added margin-top */
    margin-bottom: 30px !important;
}

.quantum-core-panel .asset-info-panel div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.quantum-core-panel .asset-info-panel strong {
    color: #9ca3af;
    font-weight: 500;
}

.quantum-core-panel .asset-info-panel span {
    color: #e5e7eb;
    font-weight: 600;
}
#disclaimer-modal .modal-content {
    max-width: 300px;
    background-color: #1a202c; /* Darker background */
}

#disclaimer-modal h3 {
    text-align: center;
    font-size: 1.5rem;
    color: #fbbf24; /* Amber color for attention */
    margin-bottom: 15px;
}

#disclaimer-modal p {
    font-size: 1rem;
    line-height: 1.6;
    color: #cbd5e0;
    text-align: center;
    margin-bottom: 25px;
}

.disclaimer-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.disclaimer-remember {
    display: flex;
    align-items: center;
}

.disclaimer-remember input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
}

.disclaimer-remember label {
    font-size: 0.9rem;
    color: #a0aec0;
    cursor: pointer;
}

#disclaimer-accept-btn {
    width: 100%;
    margin-top: 10px;
}
#chart-analyzer-drop-zone.dragover {
    border-color: #22c55e;
    background-color: rgba(34, 197, 94, 0.1);
}
.support-resistance-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}

.support-level, .resistance-level {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 10px 15px;
    text-align: center;
}

.support-level strong, .resistance-level strong {
    color: #9ca3af;
    font-weight: 500;
    margin-right: 8px;
}

.support-level span {
    color: #f87171;
    font-weight: 700;
}

.resistance-level span {
    color: #4ade80;
    font-weight: 700;
}
@media (max-width: 480px) {
    .quantum-core-panel {
        padding: 20px; 
    }

    .quantum-details .metric-box {
        padding: 10px;
    }

    .quantum-details .metric-box .value {
        font-size: 1.3rem !important; 
        word-break: break-all; 
    }
}
.chart-analyzer-btn.mobile-disabled {
    background: #2d3748; 
    color: #718096;      
    cursor: not-allowed;
    opacity: 0.6;        à
    pointer-events: none;
    box-shadow: none;
    transform: none;
}

.chart-analyzer-btn.mobile-disabled:hover {
    background: #2d3748; 
    transform: none;
}
.chart-analyzer-btn-group.live-scan-group {
    display: flex;
    flex-direction: row; /* Default: side-by-side */
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px; /* Add margin above the button group */
}
.chart-analyzer-btn-group.live-scan-group .chart-analyzer-btn {
   flex-basis: calc(45% - 10px); /* Adjust % as needed for desktop */
   flex-grow: 1;
   min-width: 180px;
}
.live-scan-group .scan-type-tooltip {
    margin-left: 5px; /* Default spacing for desktop */
}
.chart-analyzer-btn.scan-btn {
    flex: 1;
    display: flex; /* Use flex for internal alignment */
    justify-content: center;
    align-items: center;
    padding: 12px;
}

.chart-analyzer-btn.scan-btn .chart-analyzer-btn-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.chart-analyzer-btn.scan-btn .button-text {
    font-size: 16px;
    font-weight: 600;
}

.chart-analyzer-btn.scan-btn .scan-model-label {
    font-size: 12px;
    font-style: italic;
    opacity: 0.8;
}

.chart-analyzer-btn.regular-scan {
    background-color: #3182ce; /* Blue */
    border-color: #2b6cb0;
}
.chart-analyzer-btn.regular-scan:hover {
    background-color: #2b6cb0;
}

.chart-analyzer-btn.premium-scan {
    background-color: #805ad5; /* Purple */
    border-color: #553c9a;
}
.chart-analyzer-btn.premium-scan:hover {
    background-color: #553c9a;
}
.core-scan-type {
    /* font-size, padding, border-radius, font-weight, text-transform, letter-spacing, border, white-space */
    /* Background/color/border styles remain */
    /* REMOVE order: 1; margin: 0 auto; */
}

.scan-type-regular {
    background-color: rgba(49, 130, 206, 0.15); /* Slightly darker blue tint */
    color: #63b3ed; /* Lighter blue text */
    border-color: rgba(66, 153, 225, 0.5); /* Semi-transparent blue border */
}

.scan-type-premium {
    background-color: rgba(128, 90, 213, 0.15); /* Slightly darker purple tint */
    color: #b794f4; /* Lighter purple text */
    border-color: rgba(159, 122, 234, 0.5); /* Semi-transparent purple border */
}

.core-signal {
    margin-bottom: 0;
}
#sensei-qa-container {
    /* Base styles applied inline in JS */
    /* Add transitions if desired */
    transition: all 0.3s ease-in-out;
}

#sensei-qa-panel h4 {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
    margin-bottom: 15px; /* Add space below header */
}

/* Style the answer area */
#sensei-answer-area {
    /* Base styles applied inline in JS */
    /* Add nice scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: #4a5568 #1a202c; /* thumb track */
}
/* Webkit Scrollbar */
#sensei-answer-area::-webkit-scrollbar {
    width: 8px;
}
#sensei-answer-area::-webkit-scrollbar-track {
    background: rgba(26, 32, 44, 0.5); /* Slightly lighter track */
    border-radius: 4px;
}
#sensei-answer-area::-webkit-scrollbar-thumb {
    background-color: #4a5568; /* Scrollbar handle color */
    border-radius: 4px;
    border: 2px solid rgba(26, 32, 44, 0.5); /* Creates padding around thumb */
}
#sensei-answer-area::-webkit-scrollbar-thumb:hover {
    background-color: #718096; 
}


#sensei-answer-area .sensei-qa-pair {
    /* Base styles applied inline in JS */
}

#sensei-answer-area .sensei-qa-pair:last-child {
    border-bottom: none; 
    padding-bottom: 0;
    margin-bottom: 0;
}


#sensei-ask-form textarea {
    resize: vertical; 
    min-height: 60px; 
}


#restart-sensei-session-btn {
     /* Base styles applied inline in JS */
     /* Hover effects inherited from .dashboard-btn */
}
/* 1. Container Styling */
.comparison-section {
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  background: #f8f9fa; /* Light background for contrast */
  border-radius: 12px;
}

.comparison-section h2 {
  text-align: center;
  margin-bottom: 5px;
  color: #333;
}

.subtitle {
  text-align: center;
  color: #666;
  margin-top: 0;
  margin-bottom: 30px;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* 2. Table Structure */
.comparison-table {
  width: 100%;
  border-collapse: collapse; /* Removes gaps between cells */
  background: white;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  border-radius: 8px;
  overflow: hidden; /* Ensures borders curve with radius */
}

/* 3. Header Styling */
.comparison-table th {
  padding: 20px;
  text-transform: uppercase;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  color: white;
  border-bottom: 4px solid rgba(0,0,0,0.1);
}

.comparison-table th span {
  display: block;
  font-size: 0.7em;
  opacity: 0.9;
  font-weight: normal;
  text-transform: none;
  margin-top: 5px;
}

/* Specific Column Colors matching your emojis */
th.ai-col {
  background: #2563eb; /* Strong Blue */
  width: 50%;
}

th.human-col {
  background: #d97706; /* Amber/Orange */
  width: 50%;
}

/* 4. Section Rows (Speed, Data, etc.) */
.section-row td {
  background: #eef2f6;
  color: #334155;
  font-weight: 800;
  text-align: center;
  padding: 12px;
  font-size: 0.85rem;
  letter-spacing: 1px;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

/* 5. Content Cells */
.comparison-table td {
  padding: 20px;
  vertical-align: top;
  border-bottom: 1px solid #eee;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #444;
}

/* 6. List Styling */
.comparison-table ul {
  list-style: none; /* Remove default bullets */
  padding: 0;
  margin: 0;
}

.comparison-table li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}

/* Custom bullets based on column */
.ai-col ul li::before {
  content: "✓";
  color: #2563eb;
  position: absolute;
  left: 0;
  font-weight: bold;
}

.human-col ul li::before {
  content: "•";
  color: #d97706;
  position: absolute;
  left: 0;
  font-weight: bold;
  font-size: 1.2em;
  line-height: 1rem;
}

/* 7. Responsive Design (Mobile) */
@media (max-width: 600px) {
  .comparison-table th span { display: none; } /* Hide subtext on small screens */
  .comparison-table td { padding: 15px 10px; font-size: 0.85rem; }
}