/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 0;
    margin-bottom: 30px;
    color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.hero-section .row {
    align-items: center;
}

.page-title {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: white;
}

.page-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
}

.btn-hero-action {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #2c3e50;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    border: 3px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    animation: pulse 2s infinite;
    position: relative;
    overflow: hidden;
}

.btn-hero-action::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 8px 30px rgba(255, 215, 0, 0.6);
        transform: scale(1.02);
    }
}

@keyframes shine {
    0% {
        left: -50%;
    }
    100% {
        left: 150%;
    }
}

.btn-hero-action:hover {
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
    color: #2c3e50;
    border-color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 35px rgba(255, 215, 0, 0.7);
    text-decoration: none;
    animation: none;
}

.btn-hero-action i {
    margin-right: 8px;
    position: relative;
    z-index: 1;
}

/* Stats Dashboard */
.stats-dashboard {
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    border-left: 4px solid;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.stat-card.stat-clickable {
    cursor: pointer;
    position: relative;
}

.stat-card.stat-clickable:hover {
    opacity: 0.9;
}

.stat-card.active-filter {
    border-left-width: 6px;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.stat-card.active-filter::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #28a745;
}

.stat-desc {
    display: block;
    font-size: 11px;
    color: #95a5a6;
    margin-top: 5px;
    font-style: italic;
}

.stat-card.stat-primary {
    border-left-color: #667eea;
}

.stat-card.stat-success {
    border-left-color: #28a745;
}

.stat-card.stat-warning {
    border-left-color: #ffc107;
}

.stat-card.stat-info {
    border-left-color: #17a2b8;
}

.stat-card.stat-danger {
    border-left-color: #dc3545;
}

.stat-icon {
    font-size: 48px;
    margin-right: 20px;
    opacity: 0.2;
}

.stat-primary .stat-icon { color: #667eea; }
.stat-success .stat-icon { color: #28a745; }
.stat-warning .stat-icon { color: #ffc107; }
.stat-info .stat-icon { color: #17a2b8; }
.stat-danger .stat-icon { color: #dc3545; }

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-link {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s;
}

.stat-link:hover {
    color: #17a2b8;
}

/* Control Panel */
.control-panel {
    background: white;
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.control-item {
    display: flex;
    align-items: center;
}

.control-item label {
    margin: 0 15px 0 0;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
}

.page-size-selector,
.sort-selector {
    width: 150px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 8px 15px;
    font-weight: 600;
    display: inline-block;
}

.sort-dir-btn {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 8px 15px;
    font-weight: 600;
    transition: all 0.3s;
}

.sort-dir-btn:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.result-info {
    padding: 10px 0;
    color: #7f8c8d;
    font-size: 14px;
}

/* Value-add Metrics Dashboard */
.value-metrics-dashboard {
    margin-bottom: 30px;
}

.metrics-section-header {
    background: #fff;
    border-radius: 14px;
    padding: 22px 26px;
    margin-bottom: 18px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
}

.metrics-section-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: #243447;
    margin: 0 0 6px;
}

.metrics-section-header p {
    color: #6c757d;
    margin: 0;
}

.metrics-section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.metrics-section-header .metrics-warming-note {
    flex: 1 1 100%;
}

.value-metrics-guide {
    margin-bottom: 18px;
}

.value-metrics-guide-inner {
    background: #f8f9fc;
    border: 1px solid #e6ecf5;
    border-radius: 14px;
    padding: 20px 22px;
}

.value-metrics-guide-title {
    font-size: 17px;
    font-weight: 800;
    color: #243447;
    margin: 0 0 10px;
}

.value-metrics-guide-lead {
    color: #495057;
    font-size: 14px;
    line-height: 1.65;
    margin-bottom: 16px;
}

.guide-block {
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    height: 100%;
    border: 1px solid #eef1f5;
}

.guide-block h4 {
    font-size: 15px;
    font-weight: 800;
    color: #243447;
    margin: 0 0 10px;
}

.guide-block ul {
    margin: 0;
    padding-left: 18px;
    color: #495057;
    font-size: 13px;
    line-height: 1.6;
}

.guide-block li + li {
    margin-top: 6px;
}

.guide-status-legend {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e6ecf5;
    font-size: 13px;
    color: #6c757d;
    line-height: 1.6;
}

.guide-status-legend span {
    display: inline-block;
    margin-right: 4px;
}

.metric-help-icon {
    color: #667eea;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
    vertical-align: middle;
}

.metric-help-icon:hover,
.metric-help-icon:focus {
    color: #764ba2;
}

.metric-help-tooltip .tooltip-inner {
    max-width: 280px;
    text-align: left;
    font-size: 12px;
    line-height: 1.5;
}

.day-trading-faq-section {
    margin: 36px 0 24px;
    scroll-margin-top: 80px;
}

.day-trading-faq-card {
    background: #fff;
    border-radius: 14px;
    padding: 24px 26px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.day-trading-faq-heading {
    font-size: 22px;
    font-weight: 800;
    color: #243447;
    margin: 0 0 8px;
}

.day-trading-faq-intro {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 18px;
}

.day-trading-faq-accordion .accordion-button {
    font-weight: 700;
    color: #243447;
    font-size: 15px;
}

.day-trading-faq-accordion .accordion-button:not(.collapsed) {
    background: #f5f7fb;
    color: #667eea;
}

.day-trading-faq-accordion .accordion-body {
    color: #495057;
    font-size: 14px;
    line-height: 1.65;
}

.day-trading-faq-accordion .accordion-body ul {
    padding-left: 20px;
    margin-bottom: 0;
}

.day-trading-faq-accordion .accordion-body li + li {
    margin-top: 6px;
}

.metrics-warming-note {
    max-width: 420px;
    color: #856404;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
}

.value-metric-card {
    background: #fff;
    border-radius: 14px;
    padding: 22px;
    min-height: 190px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-top: 5px solid #667eea;
    position: relative;
    overflow: hidden;
}

/* Decorative blob must stay behind text/pills (::after is painted after in-flow content otherwise) */
.value-metric-card > * {
    position: relative;
    z-index: 1;
}

.value-metric-card::after {
    content: '';
    position: absolute;
    right: -35px;
    top: -35px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    opacity: 0.12;
    background: currentColor;
    z-index: 0;
    pointer-events: none;
}

.value-metric-card.metric-heat { color: #dc3545; border-top-color: #dc3545; }
.value-metric-card.metric-breadth { color: #17a2b8; border-top-color: #17a2b8; }
.value-metric-card.metric-win { color: #28a745; border-top-color: #28a745; }
.value-metric-card.metric-ai { color: #667eea; border-top-color: #667eea; }

.value-metric-label {
    color: #6c757d;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    margin-bottom: 8px;
}

.metric-source-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eef2ff;
    color: #667eea;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
}

.value-metric-main {
    color: #243447;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 8px;
}

.value-metric-sub {
    color: #6c757d;
    font-size: 13px;
    min-height: 20px;
}

.value-metric-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

/* Explicit pill class so styles survive global span resets / stacking issues */
.value-metric-pill,
.value-metric-details span {
    display: inline-block;
    background: #f5f7fb;
    color: #495057;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    vertical-align: middle;
}

.metric-insight-row {
    margin-top: 2px;
}

.metric-panel {
    background: #fff;
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    height: calc(100% - 20px);
}

.metric-panel-title {
    color: #243447;
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 18px;
}

.winrate-row {
    display: grid;
    grid-template-columns: 48px 1fr 70px 90px 110px;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eef1f5;
}

.winrate-row:last-child {
    border-bottom: 0;
}

.winrate-row-pending .winrate-value,
.winrate-row-pending .winrate-sample,
.winrate-row-pending .winrate-return {
    color: #adb5bd;
    font-weight: 600;
}

.winrate-window {
    color: #243447;
    font-weight: 800;
}

.winrate-bar {
    height: 10px;
    background: #edf1f7;
    border-radius: 999px;
    overflow: hidden;
}

.winrate-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 999px;
}

.winrate-value {
    color: #28a745;
    font-weight: 800;
}

.winrate-sample,
.winrate-return {
    color: #6c757d;
    font-size: 13px;
}

.metric-footnote {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f5f7fb;
    color: #6c757d;
    font-size: 12px;
    line-height: 1.5;
}

.category-leader-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eef1f5;
}

.category-leader-item:last-child {
    border-bottom: 0;
}

.category-rank {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #243447;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.category-leader-name {
    color: #243447;
    font-weight: 800;
    margin-bottom: 4px;
}

.category-leader-meta {
    color: #6c757d;
    font-size: 13px;
}

.metric-empty-state {
    background: #f8f9fa;
    border-radius: 10px;
    color: #6c757d;
    padding: 18px;
    line-height: 1.6;
}

.ai-performance-strip {
    background: #fff;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ai-performance-pill {
    background: #f5f7fb;
    border-radius: 999px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 12px;
}

.ai-performance-pill strong {
    color: #243447;
}

.pill-label {
    color: #667eea;
    font-weight: 800;
}

.result-info i {
    margin-right: 8px;
    color: #667eea;
}

/* Stock Grid */
.stock-grid {
    margin-bottom: 30px;
}

/* Pagination */
.pagination-wrapper {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.pagination-modern {
    display: inline-flex;
    gap: 5px;
}

.pagination-modern li a,
.pagination-modern li span {
    border-radius: 8px;
    padding: 10px 18px;
    border: 2px solid #e0e0e0;
    color: #2c3e50;
    font-weight: 600;
    transition: all 0.3s;
}

.pagination-modern li.active a,
.pagination-modern li.active span {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

.pagination-modern li a:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.pagination-modern li.disabled a,
.pagination-modern li.disabled span {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .page-title {
        font-size: 24px;
    }
    
    .page-subtitle {
        font-size: 14px;
    }
    
    .hero-section .col-md-10,
    .hero-section .col-md-2 {
        text-align: center !important;
    }
    
    .hero-section .col-md-2 {
        margin-top: 15px;
    }
    
    .btn-hero-action {
        display: block;
        margin: 0 auto;
        width: fit-content;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .stat-icon {
        font-size: 36px;
        margin-right: 15px;
    }
    
    .control-panel .row {
        flex-direction: column;
    }
    
    .control-panel .text-right {
        text-align: left !important;
        margin-top: 15px;
    }
}

/* Subscription Modal Styles */
.subscription-modal .gradient-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.subscription-modal .close {
    color: white;
    opacity: 1;
    text-shadow: none;
}

.subscription-content {
    padding: 20px 10px;
}

.channel-info {
    text-align: center;
    margin-bottom: 30px;
}

.channel-name {
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 15px;
}

.channel-description {
    font-size: 15px;
    color: #6c757d;
    line-height: 1.6;
}

.features-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.features-section h4 {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
}

.features-intro {
    font-size: 16px;
    color: #495057;
    margin-bottom: 10px;
}

.features-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    font-size: 14px;
}

.feature-item i {
    color: #28a745;
    font-size: 18px;
}

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

.pricing-plans {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.pricing-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
}

.pricing-card.featured {
    border-color: #667eea;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
    transform: scale(1.05);
}

.pricing-badge {
    display: inline-block;
    padding: 5px 15px;
    background: #e9ecef;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 15px;
}

.pricing-badge.popular {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.pricing-amount {
    margin: 15px 0;
}

.pricing-amount .currency {
    font-size: 20px;
    color: #6c757d;
}

.pricing-amount .price {
    font-size: 48px;
    font-weight: 700;
    color: #2c3e50;
}

.pricing-amount .period {
    font-size: 16px;
    color: #6c757d;
}

.pricing-description {
    font-size: 14px;
    color: #6c757d;
    margin: 10px 0;
}

.savings-badge {
    display: inline-block;
    padding: 6px 12px;
    background: #ffc107;
    color: #000;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-top: 10px;
}

.footer-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    width: 100%;
}

.footer-actions .btn {
    flex: 1;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
}

.btn-subscribe {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-subscribe:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

@media (max-width: 768px) {
    .features-list {
        grid-template-columns: 1fr;
    }
    
    .pricing-plans {
        grid-template-columns: 1fr;
    }
    
    .pricing-card.featured {
        transform: scale(1);
    }
    
    .channel-name {
        font-size: 24px;
    }
    
    .pricing-amount .price {
        font-size: 36px;
    }
}

/* AI Modal Styles */
.ai-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
    padding: 25px 30px;
}

.ai-modal-title-section {
    flex: 1;
}

.ai-modal .modal-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
}

.ai-modal-stock-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.stock-code-large {
    font-size: 18px;
    font-weight: 700;
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 6px;
}

.stock-name-large {
    font-size: 16px;
    opacity: 0.95;
}

.ai-modal .close {
    color: white;
    opacity: 0.9;
    font-size: 32px;
    font-weight: 300;
}

.ai-modal .close:hover {
    opacity: 1;
}

.ai-modal-body {
    padding: 20px;
}

.ai-signal-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 15px;
}

.ai-signal-badge-large {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 50px;
    color: white;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    margin-bottom: 12px;
}

.ai-signal-badge-large i {
    font-size: 24px;
}

.ai-confidence-section {
    margin-top: 12px;
}

.confidence-label {
    font-size: 14px;
    color: #495057;
    font-weight: 600;
    margin-bottom: 10px;
}

.confidence-bar-large {
    position: relative;
    width: 100%;
    height: 30px;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.confidence-fill {
    height: 100%;
    border-radius: 15px;
    transition: width 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 15px;
}

.confidence-value {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-weight: 700;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.ai-remarks-section {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 15px;
}

.ai-remarks-section h5 {
    color: #495057;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-remarks-section h5 i {
    color: #ffc107;
    font-size: 18px;
}

.ai-remarks-content {
    font-size: 14px;
    line-height: 1.6;
    color: #2c3e50;
}

/* Collapsible AI Sections */
.ai-section {
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.ai-section-header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid #dee2e6;
}

.ai-section-header:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.ai-section-header .section-emoji {
    font-size: 20px;
    margin-right: 10px;
}

.ai-section-header .section-title {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
}

.ai-section-header .section-toggle-icon {
    font-size: 16px;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.ai-section-content {
    padding: 12px 15px;
    background: white;
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.ai-section-content.collapsed {
    max-height: 0;
    padding: 0 15px;
}

.ai-section-content p {
    margin-bottom: 6px;
    line-height: 1.6;
}

.ai-section-content .highlight {
    color: #667eea;
    font-weight: 600;
}

.ai-section-content .ai-list {
    list-style: none;
    padding-left: 0;
    margin: 5px 0;
}

.ai-section-content .ai-list li {
    padding: 4px 0 4px 25px;
    position: relative;
    line-height: 1.5;
}

.ai-section-content .ai-list li:before {
    content: '▸';
    position: absolute;
    left: 8px;
    color: #667eea;
    font-weight: bold;
}

.ai-meta-section {
    display: flex;
    gap: 20px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 12px;
}

.ai-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6c757d;
}

.ai-meta-item i {
    color: #667eea;
    font-size: 14px;
}

.ai-disclaimer {
    padding: 12px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    font-size: 12px;
    color: #856404;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.ai-disclaimer i {
    color: #ffc107;
    font-size: 16px;
    margin-top: 1px;
}

.ai-modal .modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 15px 20px;
}

/* Category Analysis Modal */
.modal-modern .card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0;
}

.modal-modern .card-header {
    border-radius: 8px 8px 0 0;
    padding: 15px 20px;
}

.modal-modern .card-body {
    padding: 20px;
}

.modal-modern .table-modern {
    margin-bottom: 0;
}

.modal-modern .table-modern th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 13px;
    padding: 12px 10px;
    border-bottom: 2px solid #dee2e6;
}

.modal-modern .table-modern td {
    padding: 10px;
    vertical-align: middle;
    font-size: 13px;
}

.modal-modern .badge {
    padding: 4px 8px;
    font-size: 11px;
}

/* ============================================
   Stock Card Styles (_analysis_item.php)
   ============================================ */

/* Stock Card Wrapper & Base */
.stock-card-wrapper {
    padding: 10px;
    margin-bottom: 20px;
}

.stock-card {
    background: white;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border: 2px solid #f0f0f0;
}

.stock-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

/* Stock Card Header */
.stock-card .card-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.stock-card .stock-info {
    flex: 1;
}

.stock-card .stock-code {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stock-card .stock-name {
    font-size: 14px;
    opacity: 0.95;
}

.stock-card .stock-link {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.stock-card .stock-link:hover {
    opacity: 0.8;
    color: white;
}

.stock-card .badges {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stock-card .badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-ipo {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    color: white;
    animation: pulse-ipo 2s ease-in-out infinite;
}

@keyframes pulse-ipo {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.badge-selected {
    background: #ffc107;
    color: #000;
}

.badge-top {
    background: #ff4757;
    color: white;
}

.badge-ai {
    color: white;
    font-weight: 700;
    animation: pulse-ai 3s ease-in-out infinite;
}

.badge-short-sell {
    background: linear-gradient(135deg, #8e44ad 0%, #c0392b 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(142, 68, 173, 0.3);
    animation: pulse-short 2.5s ease-in-out infinite;
}

@keyframes pulse-short {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(142, 68, 173, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 3px 12px rgba(192, 57, 43, 0.4);
        transform: scale(1.03);
    }
}

@keyframes pulse-ai {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 4px rgba(255, 255, 255, 0);
    }
}

/* Price Section */
.stock-card .price-section {
    padding: 25px 20px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
}

.stock-card .current-price {
    display: flex;
    flex-direction: column;
}

.stock-card .price-label {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 5px;
}

.stock-card .price-value {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
}

.stock-card .price-change {
    font-size: 20px;
    font-weight: 700;
    padding: 8px 15px;
    border-radius: 8px;
}

.stock-card .price-change.profit {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.stock-card .price-change.loss {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

/* Metrics Grid */
.stock-card .metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 20px;
}

.stock-card .metric-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: background 0.3s;
}

.stock-card .metric-item:hover {
    background: #e9ecef;
}

.stock-card .metric-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 10px;
    color: #667eea;
    font-size: 18px;
}

.stock-card .metric-details {
    flex: 1;
}

.stock-card .metric-label {
    font-size: 11px;
    color: #6c757d;
    margin-bottom: 2px;
}

.stock-card .metric-value {
    font-size: 15px;
    font-weight: 700;
    color: #2c3e50;
}

/* Category Section */
.stock-card .category-section {
    padding: 15px 20px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.stock-card .category-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #495057;
}

.stock-card .category-name {
    font-weight: 600;
}

.stock-card .category-ranking {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.btn-view-category {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 6px 12px;
    margin-left: 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-view-category:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

.btn-view-category:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.stock-card .ranking-score {
    text-align: right;
}

.stock-card .score-label {
    font-size: 11px;
    color: #6c757d;
}

.stock-card .score-value {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
}

/* AI Advice Section */
.stock-card .ai-advice-section {
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.stock-card .ai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stock-card .ai-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #495057;
}

.stock-card .ai-title i {
    font-size: 18px;
    color: #667eea;
}

.stock-card .ai-timestamp {
    font-size: 11px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stock-card .ai-signal-display {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stock-card .ai-signal-main {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.stock-card .signal-indicator {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.stock-card .signal-info {
    flex: 1;
}

.stock-card .signal-label {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.stock-card .confidence-bar-container {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.stock-card .confidence-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.stock-card .confidence-text {
    font-size: 12px;
    color: #6c757d;
    font-weight: 600;
}

.stock-card .ai-remarks-preview {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
    color: #495057;
    line-height: 1.6;
    margin-bottom: 10px;
    border-left: 3px solid #667eea;
}

.stock-card .ai-remarks-preview i {
    color: #ffc107;
    margin-right: 6px;
}

.btn-view-full-ai {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-view-full-ai:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Stock Detail Button */
.btn-stock-detail {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.btn-stock-detail:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
    color: white !important;
    text-decoration: none;
}

/* Card Footer */
.stock-card .card-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: #6c757d;
}

.stock-card .footer-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stock-card .footer-item.footer-action {
    margin-left: auto;
}

/* Stock Card Responsive Styles */
@media (max-width: 768px) {
    .metrics-section-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px;
    }

    .metrics-section-actions {
        width: 100%;
    }

    .metrics-section-actions .btn {
        flex: 1 1 auto;
    }

    .day-trading-faq-card {
        padding: 18px 16px;
    }

    .value-metric-card {
        min-height: auto;
    }

    .winrate-row {
        grid-template-columns: 42px 1fr 64px;
        gap: 8px;
    }

    .winrate-sample,
    .winrate-return {
        grid-column: 2 / span 2;
    }

    .stock-card .stock-code {
        font-size: 20px;
    }
    
    .stock-card .price-value {
        font-size: 24px;
    }
    
    .stock-card .price-change {
        font-size: 16px;
    }
    
    /* Keep 2 columns on mobile to save vertical space */
    .stock-card .metrics-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 15px;
    }
    
    .stock-card .metric-item {
        padding: 10px 8px;
    }
    
    .stock-card .metric-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .stock-card .metric-label {
        font-size: 10px;
    }
    
    .stock-card .metric-value {
        font-size: 13px;
    }
    
    .stock-card .card-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stock-card .footer-item.footer-action {
        margin-left: 0;
        width: 100%;
    }
    
    .btn-stock-detail {
        width: 100%;
        justify-content: center;
    }
}
