/* =============================================================================
   STYLE-NIENVAN.CSS - Niên Vận (Annual Luck) Section Styles
   =============================================================================
   Contains: Khúc Vỹ 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
   ============================================================================= */

/* =============================================================================
   KHÚC VỸ 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;
}

/* =============================================================================
   KHÚC VỸ 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 (Khúc Vỹ: 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 (Khúc Vỹ: 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%;
    }
}