/* =============================================================================
   STYLE-NIENVAN.CSS - Niên Vận (Annual Luck) Section Styles
   =============================================================================
   Contains: Nâng Cao Niên Vận Logs, V2.0 Seasonal & Vượt Cấp,
             TKDX Critical Styles, Disaster Warnings
   
   LOAD ORDER: After core.css, style-nguyencuc.css, style-daivan.css
   ============================================================================= */

/* =============================================================================
   Nâng Cao NIÊN VẬN LOG STYLES
   ============================================================================= */

/* Phạm Thái Tuế COLLAPSED - Critical disaster warning */
.log-pham_thai_tue_collapsed {
    background: linear-gradient(90deg, rgba(139, 0, 0, 0.35), rgba(139, 0, 0, 0.15)) !important;
    border-left: 4px solid #DC143C !important;
    padding: 12px 14px !important;
    margin: 8px 0 !important;
    color: #FF6B6B !important;
    font-weight: bold !important;
    animation: disaster-pulse 1.5s infinite;
}

@keyframes disaster-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(220, 20, 60, 0.4);
    }

    50% {
        box-shadow: 0 0 12px 3px rgba(255, 0, 0, 0.35);
    }
}

/* Hợp Hóa thành công - Gold highlight */
.log-hop_hoa_stage1 {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.25), rgba(212, 175, 55, 0.1)) !important;
    border-left: 4px solid var(--accent-gold) !important;
    color: var(--accent-gold) !important;
    font-weight: bold !important;
}

/* Hợp Bất Hóa - Muted (trói buộc) */
.log-hop_bat_hoa_stage1 {
    background: rgba(100, 100, 100, 0.15) !important;
    border-left: 4px solid #888 !important;
    color: #AAA !important;
    font-style: italic !important;
}

/* Xung Bại - Dark red (DV broken) */
.log-xung_stage1_broken {
    background: linear-gradient(90deg, rgba(139, 0, 0, 0.25), rgba(139, 0, 0, 0.1)) !important;
    border-left: 4px solid #8B0000 !important;
    color: #FF6B6B !important;
    font-weight: bold !important;
}

/* Xung Damaged - Orange */
.log-xung_stage1_damaged {
    background: rgba(255, 140, 0, 0.15) !important;
    border-left: 4px solid #FF8C00 !important;
    color: #FFB74D !important;
}

/* Vượt Cấp warning */
.log-vuot_cap_warning {
    background: linear-gradient(90deg, rgba(255, 140, 0, 0.2), transparent) !important;
    border-left: 4px solid #FF8C00 !important;
    color: #FFD700 !important;
    font-weight: bold !important;
}

/* Disaster Flag UI indicator */
.disaster-warning {
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.15), rgba(139, 0, 0, 0.1));
    border: 2px solid #DC143C;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    animation: disaster-pulse 2s infinite;
}

.disaster-warning h4 {
    color: #FF6B6B;
    margin-bottom: 10px;
}

.disaster-warning .disaster-detail {
    color: #FFB4B4;
    font-size: 0.9rem;
}

/* =============================================================================
   Nâng Cao V2.0 LOG STYLES - Seasonal & Vượt Cấp
   ============================================================================= */

/* Step 0 Header - Seasonal Modifiers */
.log-step0_header {
    background: linear-gradient(90deg, rgba(0, 128, 0, 0.2), transparent) !important;
    border-left: 4px solid #32CD32 !important;
    color: #90EE90 !important;
    font-weight: bold !important;
    padding: 8px 12px !important;
}

/* Seasonal Modifier adjustments */
.log-seasonal_modifier {
    background: rgba(0, 128, 128, 0.15) !important;
    border-left: 3px solid #20B2AA !important;
    color: #7FFFD4 !important;
    font-size: 0.9rem !important;
    padding-left: 24px !important;
}

/* Vượt Cấp detail */
.log-vuot_cap_detail {
    background: rgba(255, 165, 0, 0.1) !important;
    border-left: 3px solid #FFA500 !important;
    color: #FFD700 !important;
    font-size: 0.9rem !important;
    padding-left: 24px !important;
}

/* Vượt Cấp CONCLUSION - Stand out with gold */
.log-vuot_cap_conclusion {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.2), rgba(255, 215, 0, 0.1)) !important;
    border-left: 4px solid var(--accent-gold) !important;
    border-radius: 4px !important;
    padding: 10px 14px !important;
    margin: 8px 0 !important;
    color: var(--accent-gold) !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
}

/* =============================================================================
   V2.0 INTERACTION GROUP STYLES
   ============================================================================= */

/* Group Seasonal - Step 0 */
.interaction-group.group-seasonal {
    border-left: 4px solid #32CD32;
    background: linear-gradient(135deg, rgba(50, 205, 50, 0.08), transparent);
}

.interaction-group.group-seasonal .group-header {
    color: #90EE90;
    background: rgba(50, 205, 50, 0.15);
}

/* Group Vượt Cấp - Step 0.5 */
.interaction-group.group-vuotcap {
    border-left: 4px solid #FFA500;
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.08), transparent);
}

.interaction-group.group-vuotcap .group-header {
    color: #FFD700;
    background: rgba(255, 165, 0, 0.15);
}

/* Group Hình - Punishments */
.interaction-group.group-hinh {
    border-left: 4px solid #9932CC;
    background: linear-gradient(135deg, rgba(153, 50, 204, 0.08), transparent);
}

.interaction-group.group-hinh .group-header {
    color: #DA70D6;
    background: rgba(153, 50, 204, 0.15);
}

/* =============================================================================
   V2.1 THIÊN KHẮC ĐỊA XUNG (Heaven & Earth Clash) CRITICAL STYLES
   ============================================================================= */

/* Group TKDX - CRITICAL Warning */
.interaction-group.group-tkdx {
    border-left: 4px solid #DC143C;
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.15), rgba(139, 0, 0, 0.08));
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.2);
    animation: tkdx-warning-pulse 2s infinite;
}

.interaction-group.group-tkdx .group-header {
    color: #FF6B6B;
    background: linear-gradient(90deg, rgba(220, 20, 60, 0.3), rgba(139, 0, 0, 0.15));
    font-weight: bold;
    font-size: 1rem;
}

@keyframes tkdx-warning-pulse {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(255, 0, 0, 0.2);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 0, 0, 0.4);
    }
}

/* TKDX Log item styles */
.log-tkdx_critical {
    background: linear-gradient(90deg, rgba(220, 20, 60, 0.3), rgba(139, 0, 0, 0.15)) !important;
    border-left: 4px solid #DC143C !important;
    padding: 12px 14px !important;
    margin: 8px 0 !important;
    color: #FF6B6B !important;
    font-weight: bold !important;
    font-size: 1rem !important;
}

.log-tkdx_warning {
    background: rgba(220, 20, 60, 0.15) !important;
    border-left: 3px solid #FF6B6B !important;
    color: #FFB4B4 !important;
    padding: 8px 12px !important;
    padding-left: 24px !important;
    font-weight: 600 !important;
}

.log-tkdx_action {
    background: rgba(33, 150, 243, 0.15) !important;
    border-left: 3px solid #64B5F6 !important;
    color: #90CAF9 !important;
    padding: 8px 12px !important;
    padding-left: 24px !important;
    font-style: italic !important;
}

/* =============================================================================
   V2.2 PHẢN KHẮC TAM HỘI STYLES (Nâng Cao: Suy Thần xung Vượng Thần)
   ============================================================================= */

/* Step 0.4 Header - Phản Khắc Check */
.log-step04_header {
    background: linear-gradient(90deg, rgba(255, 69, 0, 0.25), rgba(255, 140, 0, 0.15)) !important;
    border-left: 4px solid #FF4500 !important;
    color: #FF6347 !important;
    font-weight: bold !important;
    padding: 8px 12px !important;
}

/* Phản Khắc CRITICAL - Fire gradient animation */
.log-phan_khac_critical {
    background: linear-gradient(90deg, rgba(255, 0, 0, 0.3), rgba(255, 69, 0, 0.2)) !important;
    border-left: 4px solid #FF4500 !important;
    padding: 12px 14px !important;
    margin: 8px 0 !important;
    color: #FF6347 !important;
    font-weight: bold !important;
    font-size: 1rem !important;
    animation: fire-pulse 2s infinite;
}

@keyframes fire-pulse {

    0%,
    100% {
        box-shadow: 0 0 8px rgba(255, 69, 0, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    }
}

/* Phản Khắc detail log */
.log-phan_khac_detail {
    background: rgba(255, 140, 0, 0.15) !important;
    border-left: 3px solid #FF8C00 !important;
    color: #FFB74D !important;
    padding: 8px 12px !important;
    padding-left: 24px !important;
}

/* Phản Khắc result log */
.log-phan_khac_result {
    background: rgba(255, 69, 0, 0.12) !important;
    border-left: 3px solid #FF4500 !important;
    color: #FFA07A !important;
    padding: 6px 12px !important;
    padding-left: 24px !important;
}

/* Phản Khắc warning */
.log-phan_khac_warning {
    background: rgba(255, 0, 0, 0.15) !important;
    border-left: 3px solid #FF0000 !important;
    color: #FF6B6B !important;
    padding: 8px 12px !important;
    padding-left: 24px !important;
    font-weight: 600 !important;
}

/* Phản Khắc conclusion - Đại Hung */
.log-phan_khac_conclusion {
    background: linear-gradient(90deg, rgba(139, 0, 0, 0.35), rgba(220, 20, 60, 0.2)) !important;
    border-left: 4px solid #DC143C !important;
    padding: 12px 14px !important;
    margin: 8px 0 !important;
    color: #FF6B6B !important;
    font-weight: bold !important;
    font-size: 0.95rem !important;
    animation: disaster-pulse 1.5s infinite;
}

/* Tam Hội protection (non-Phản Khắc case) */
.log-tam_hoi_protection {
    background: rgba(33, 150, 243, 0.15) !important;
    border-left: 3px solid #2196F3 !important;
    color: #64B5F6 !important;
    padding: 8px 12px !important;
}

/* =============================================================================
   REFERENCE LOG STYLES (v2.2: Reference to Natal Chart formations)
   ============================================================================= */

/* Tam Hội Reference - Not recalculating, just referencing */
.log-tam_hoi_reference {
    background: linear-gradient(90deg, rgba(33, 150, 243, 0.08), transparent);
    border-left: 3px solid #42A5F5;
    padding: 6px 12px;
    margin: 4px 0;
    color: #64B5F6;
    font-style: italic;
}

/* Tam Hợp Reference */
.log-tam_hop_reference {
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.08), transparent);
    border-left: 3px solid #66BB6A;
    padding: 6px 12px;
    margin: 4px 0;
    color: #81C784;
    font-style: italic;
}

/* =============================================================================
   PHẢN KHẮC TAM HỘI STYLES (Nâng Cao: Suy Thần xung Vượng Thần)
   ============================================================================= */

/* Phản Khắc Critical - Main warning */
.log-phan_khac_critical {
    background: linear-gradient(90deg, rgba(244, 67, 54, 0.25), rgba(156, 39, 176, 0.15));
    border-left: 5px solid #E91E63;
    padding: 10px 14px;
    margin: 8px 0;
    color: #F48FB1;
    font-weight: bold;
    font-size: 1.05em;
}

/* Phản Khắc Detail - Force comparison */
.log-phan_khac_detail {
    background: linear-gradient(90deg, rgba(156, 39, 176, 0.12), transparent);
    border-left: 3px solid #AB47BC;
    padding: 6px 12px;
    margin: 4px 0;
    color: #CE93D8;
}

/* Phản Khắc Result - Score changes */
.log-phan_khac_result {
    background: rgba(255, 152, 0, 0.08);
    border-left: 3px solid #FF9800;
    padding: 6px 12px;
    margin: 4px 0;
    color: #FFB74D;
}

/* Phản Khắc Warning - Day Master impact */
.log-phan_khac_warning {
    background: rgba(244, 67, 54, 0.12);
    border-left: 3px solid #F44336;
    padding: 6px 12px;
    margin: 4px 0;
    color: #EF5350;
    font-weight: bold;
}

/* Phản Khắc Conclusion - Final verdict */
.log-phan_khac_conclusion {
    background: linear-gradient(90deg, rgba(183, 28, 28, 0.2), rgba(121, 85, 72, 0.1));
    border-left: 5px solid #B71C1C;
    padding: 10px 14px;
    margin: 8px 0;
    color: #FFAB91;
    font-weight: bold;
}

/* =============================================================================
   YEAR SELECTOR FEATURE - For seamless year analysis
   ============================================================================= */

/* Page navigation with year selector */
.year-selector-nav {
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

/* Navigation buttons row */
.page-nav-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    width: 100%;
    flex-wrap: wrap;
}

/* Year selector container */
.year-selector-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px 20px;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.15), rgba(156, 39, 176, 0.1));
    border: 1px solid rgba(33, 150, 243, 0.3);
    border-radius: 10px;
    width: 100%;
    max-width: 600px;
}

/* Label for year selector */
.year-selector-label {
    color: #64B5F6;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

/* Year dropdown select */
.year-selector {
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
    min-width: 280px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.year-selector:hover {
    border-color: #2196F3;
    background: rgba(33, 150, 243, 0.15);
}

.year-selector:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.25);
}

.year-selector option {
    background: #1e2a38;
    color: #fff;
    padding: 10px;
}

/* Analyze button */
.year-analyze-btn {
    font-size: 0.9rem;
    padding: 10px 20px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.year-analyze-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .year-selector-container {
        flex-direction: column;
        padding: 12px 15px;
        gap: 10px;
    }

    .year-selector {
        width: 100%;
        min-width: unset;
    }

    .year-analyze-btn {
        width: 100%;
    }
}

/* =============================================================================
   BIẾN TÍNH (QUANTITY CHANGES QUALITY) STYLES
   ============================================================================= */
.log-bien_tinh {
    background: linear-gradient(90deg, rgba(255, 152, 0, 0.15), rgba(255, 193, 7, 0.05));
    border-left: 4px solid #FF9800;
    padding: 10px 14px;
    margin: 8px 0;
    color: #FFCC80;
    border-radius: 0 4px 4px 0;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.log-bien_tinh:hover {
    background: linear-gradient(90deg, rgba(255, 152, 0, 0.25), rgba(255, 193, 7, 0.15));
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.1);
}

.log-bien_tinh strong {
    color: #FFD54F;
    display: block;
    margin-bottom: 4px;
    font-size: 1rem;
}

/* Mobile optimizations for insights */
@media (max-width: 480px) {
    .log-bien_tinh {
        padding: 12px;
        font-size: 0.9rem;
    }

    .insight-item {
        margin-bottom: 12px !important;
    }

    .luck-prediction-box {
        gap: 8px !important;
    }

    .luck-item {
        flex: 1 1 40%;
        /* 2 items per row */
        min-width: 120px;
    }
}

/* =============================================================================
   MOBILE UI ENHANCEMENTS (V2.3)
   ============================================================================= */

/* 1. COLLAPSIBLE LOGS (Smart Accordion) */
.interaction-group details {
    width: 100%;
}

.interaction-group summary {
    cursor: pointer;
    list-style: none;
    /* Hide default triangle */
    outline: none;
    position: relative;
    padding-right: 30px;
    /* Space for arrow */
}

.interaction-group summary::-webkit-details-marker {
    display: none;
}

.interaction-group summary::after {
    content: '▼';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8em;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

.interaction-group details[open] summary::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Critical groups always open styling tweak */
.interaction-group.group-tkdx summary::after,
.interaction-group.group-phamthaitue summary::after {
    color: #FF6B6B;
    font-weight: bold;
}

/* 2. RESPONSIVE TABLES (Scrollable Container) */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Custom Scrollbar for top scrolling */
.table-responsive::-webkit-scrollbar {
    height: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(33, 150, 243, 0.5);
    border-radius: 4px;
}

/* 3. STICKY HEADERS & CONTROLS */
.sticky-controls {
    position: sticky;
    top: 60px;
    /* Below main nav if any */
    z-index: 90;
    backdrop-filter: blur(10px);
    background: rgba(20, 30, 48, 0.85);
    /* Matches dark theme base */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 0;
    margin: -10px -15px 15px -15px;
    /* Negative margin to stretch full width */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

@media (max-width: 600px) {
    .sticky-controls {
        top: 0;
        /* Sticky at very top on mobile */
        padding: 5px 10px;
    }

    .year-selector-container {
        padding: 8px;
        /* Compact padding */
    }
}

/* =============================================================================
   ACTIVATION TIMELINE STYLES (Dự Báo Ứng Kỳ)
   Mobile-First Design, GPU-accelerated animations
   ============================================================================= */

/* Card wrapper */
.activation-card {
    border: 1px solid rgba(255, 193, 7, 0.2);
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.05), rgba(33, 150, 243, 0.03));
}

.activation-card .card-header h3 {
    color: #FFD54F;
    font-size: 1.1rem;
    margin: 0;
}

.activation-card .card-header .subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    margin-top: 4px;
}

/* Main timeline container */
.activation-timeline-container {
    padding: 0;
}

/* Scenario header */
.scenario-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.12), rgba(255, 152, 0, 0.08));
    border-radius: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.scenario-icon {
    font-size: 1.3rem;
}

.scenario-name {
    color: #FFD54F;
    font-weight: 600;
    font-size: 1rem;
    flex: 1;
    min-width: 0;
}

.scenario-env {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.scenario-env-war {
    background: rgba(244, 67, 54, 0.2);
    color: #EF5350;
}

.scenario-env-peace {
    background: rgba(76, 175, 80, 0.2);
    color: #81C784;
}

.scenario-env-ambush {
    background: rgba(255, 152, 0, 0.2);
    color: #FFB74D;
}

.scenario-env-storm {
    background: rgba(156, 39, 176, 0.2);
    color: #CE93D8;
}

.scenario-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 16px;
    padding: 0 4px;
}

/* Timeline grid — MOBILE FIRST: 2 columns */
.timeline-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

/* Individual year card */
.timeline-year-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 44px;
    /* Touch target minimum */
    text-align: center;
}

.timeline-year-card:active {
    transform: scale(0.97);
}

.year-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.year-name {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

.year-number {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

.year-element {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.7rem;
}

/* Trigger badges */
.year-triggers {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    margin-top: 4px;
}

.trigger-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
}

/* Type-based colors */
.timeline-danger {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.15), rgba(139, 0, 0, 0.08));
    border-color: rgba(244, 67, 54, 0.3);
}

.timeline-danger .year-name {
    color: #EF5350;
}

.timeline-danger .trigger-badge {
    background: rgba(244, 67, 54, 0.2);
    color: #FF8A80;
}

.timeline-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15), rgba(255, 152, 0, 0.08));
    border-color: rgba(255, 193, 7, 0.3);
}

.timeline-warning .year-name {
    color: #FFD54F;
}

.timeline-warning .trigger-badge {
    background: rgba(255, 193, 7, 0.2);
    color: #FFE082;
}

.timeline-opportunity {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(56, 142, 60, 0.08));
    border-color: rgba(76, 175, 80, 0.3);
}

.timeline-opportunity .year-name {
    color: #81C784;
}

.timeline-opportunity .trigger-badge {
    background: rgba(76, 175, 80, 0.2);
    color: #A5D6A7;
}

.timeline-safe {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.08), rgba(30, 136, 229, 0.04));
    border-color: rgba(33, 150, 243, 0.15);
}

.timeline-safe .year-name {
    color: #64B5F6;
}

/* Danger summary block */
.danger-summary {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.1), rgba(139, 0, 0, 0.05));
    border: 1px solid rgba(244, 67, 54, 0.2);
    border-radius: 10px;
    padding: 14px;
    margin-top: 8px;
}

.summary-title {
    color: #EF5350;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.summary-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.danger-year-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 12px;
    background: rgba(244, 67, 54, 0.06);
    border-radius: 6px;
    border-left: 3px solid #EF5350;
}

.dy-name {
    color: #EF5350;
    font-weight: 600;
    font-size: 0.85rem;
}

.dy-warning {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Empty state */
.activation-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    padding: 20px;
    font-style: italic;
}

/* Desktop: 5 columns for 10 year cards */
@media (min-width: 768px) {
    .timeline-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
    }

    .timeline-year-card {
        padding: 14px 10px;
    }

    .timeline-year-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .scenario-header {
        flex-wrap: nowrap;
    }

    .danger-year-item {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .dy-name {
        white-space: nowrap;
        min-width: 140px;
    }
}

/* Small mobile adjustments */
@media (max-width: 375px) {
    .timeline-year-card {
        padding: 10px 6px;
    }

    .year-name {
        font-size: 0.8rem;
    }

    .trigger-badge {
        font-size: 0.6rem;
    }

    .scenario-name {
        font-size: 0.9rem;
    }
}

/* =============================================================================
   SPRINT 9: TUẾVẬN ĐỒNG KHÍ / KẾT ĐẢNG — MULTIPLIER EFFECT LOG STYLES
   ============================================================================= */

/* Multiplier Effect State header — cam gradient */
.log-multiplier_effect_state {
    background: linear-gradient(90deg, rgba(255, 107, 53, 0.2), rgba(255, 140, 0, 0.1)) !important;
    border-left: 4px solid #FF6B35 !important;
    padding: 12px 14px !important;
    margin: 8px 0 !important;
    color: #FFB347 !important;
    font-weight: bold !important;
    font-size: 0.95rem !important;
    border-radius: 4px;
}

/* Multiplier Effect Event sub-items (evt_0, evt_1, evt_2...) */
.log-multiplier_effect_evt_0,
.log-multiplier_effect_evt_1,
.log-multiplier_effect_evt_2,
.log-multiplier_effect_evt_3 {
    background: rgba(255, 140, 0, 0.08) !important;
    border-left: 3px solid rgba(255, 107, 53, 0.4) !important;
    padding: 5px 12px 5px 22px !important;
    color: #FFCC99 !important;
    font-size: 0.88rem !important;
}

/* Cross Layer Rooting state log */
.log-cross_layer_rooting_state {
    background: rgba(33, 150, 243, 0.1) !important;
    border-left: 3px solid #2196F3 !important;
    color: #64B5F6 !important;
    padding: 7px 12px !important;
    font-style: italic !important;
}

/* Hidden Interaction (Ám Hợp) state log */
.log-hidden_interaction_state {
    background: rgba(156, 39, 176, 0.1) !important;
    border-left: 3px solid #9C27B0 !important;
    color: #CE93D8 !important;
    padding: 7px 12px !important;
}

/* tqkq logs (Thương Quan Kiến Quan) */
.log-tqkq_critical {
    background: linear-gradient(90deg, rgba(244, 67, 54, 0.2), rgba(183, 28, 28, 0.1)) !important;
    border-left: 4px solid #F44336 !important;
    color: #FFAB91 !important;
    font-weight: bold !important;
    padding: 10px 14px !important;
}

/* Mobile compact for Sprint 9 log items */
@media (max-width: 480px) {
    .log-multiplier_effect_state {
        font-size: 0.85rem !important;
        padding: 9px 10px !important;
    }

    .log-multiplier_effect_evt_0,
    .log-multiplier_effect_evt_1,
    .log-multiplier_effect_evt_2,
    .log-multiplier_effect_evt_3 {
        font-size: 0.8rem !important;
        padding-left: 14px !important;
    }
}

/* =============================================================================
   SPRINT 11: DAILY LUCK WIDGET — Vận Hôm Nay
   ============================================================================= */

.daily-luck-widget {
    background: linear-gradient(135deg, rgba(40, 44, 65, 0.95), rgba(30, 34, 58, 0.9));
    border: 1px solid rgba(255, 200, 100, 0.3);
    border-radius: 16px;
    padding: 16px 18px;
    margin: 12px 0 18px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.daily-luck-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #FF9800, #FFC107, #FF9800);
    background-size: 200% 100%;
    animation: dlw-pulse 3s ease infinite;
}

@keyframes dlw-pulse {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.dlw-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.dlw-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1rem;
    color: #FFC107;
    letter-spacing: 0.5px;
}

.dlw-icon {
    font-size: 1.3rem;
}

.dlw-date {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.dlw-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dlw-pillar {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.dlw-pillar-label {
    color: rgba(255, 255, 255, 0.45);
}

.dlw-pillar-value {
    font-weight: 600;
    color: #E0E0E0;
    font-size: 0.95rem;
}

.dlw-pillar-el {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
}

.dlw-score {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 2px solid currentColor;
    background: rgba(255, 255, 255, 0.05);
    align-self: flex-start;
}

.dlw-emoji {
    font-size: 1.5rem;
}

.dlw-level {
    font-size: 1.1rem;
    font-weight: 700;
}

.dlw-advice {
    font-size: 0.87rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.55;
    font-style: italic;
}

.dlw-gods {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 0.8rem;
}

.dlw-gods-label {
    color: rgba(255, 255, 255, 0.45);
}

.dlw-gods-sep {
    color: rgba(255, 255, 255, 0.2);
    margin: 0 2px;
}

.dlw-el-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
}

.dlw-el-badge.good {
    background: rgba(76, 175, 80, 0.2);
    color: #A5D6A7;
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.dlw-el-badge.bad {
    background: rgba(244, 67, 54, 0.15);
    color: #FFCDD2;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

/* Mobile compact */
@media (max-width: 480px) {
    .daily-luck-widget {
        padding: 12px 14px;
        margin: 8px 0 14px 0;
    }

    .dlw-title {
        font-size: 0.9rem;
    }

    .dlw-level {
        font-size: 1rem;
    }

    .dlw-advice {
        font-size: 0.82rem;
    }

    .dlw-score {
        padding: 8px 12px;
    }
}

/* =============================================================================
   WEEKLY LUCK WIDGET (7-Day Forecast) - Sprint 19
   ============================================================================= */
.weekly-luck-widget {
    background: linear-gradient(135deg, rgba(20, 25, 40, 0.9), rgba(15, 20, 30, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    margin: 25px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.wlw-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.wlw-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #FFF;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wlw-icon {
    font-size: 1.4rem;
}

.wlw-banner {
    background: rgba(255, 152, 0, 0.1);
    border-left: 3px solid #FF9800;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #FFB74D;
}

.wlw-dt-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
}

.wlw-separator {
    color: rgba(255, 255, 255, 0.2);
}

/* Horizontally scrollable container for the 7 cards */
.wlw-days-scroll-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 15px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.wlw-days-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.wlw-days-scroll-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.wlw-days-scroll-container::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* Individual Day Card */
.wlw-day-card {
    min-width: 140px;
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-top: 4px solid #9E9E9E;
    border-right: 1px solid rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    border-left: 1px solid rgba(255, 255, 255, 0.02);
    transition: transform 0.2s ease, background 0.2s;
    cursor: default;
}

.wlw-day-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.06);
}

.wlw-day-card.wlw-today {
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

.wlw-date-top {
    font-size: 1.1rem;
    font-weight: 700;
    color: #FFF;
    margin-bottom: 2px;
}

.wlw-date-sub {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 12px;
}

.wlw-pillar-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #FFB703;
    margin-bottom: 4px;
}

.wlw-pillar-el {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 12px;
}

.wlw-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    width: 100%;
}

.wlw-emoji {
    font-size: 1.5rem;
}

.wlw-label {
    font-size: 0.85rem;
    font-weight: 600;
}