/* -------------------------------------
   ARTICLE RICH DESIGN (WAFU-POP)
   Applies to generic content elements inside .container or .unified-container
-------------------------------------- */

/* 1. Typography & General Content Box */
body:not(.dark-theme) .container p,
body:not(.dark-theme) .unified-container p {
    line-height: 1.8;
    margin-bottom: 1.5em;
    font-size: 1.05rem;
    color: #444;
}

/* 2. Beautiful Blockquotes (Quotes) */
body:not(.dark-theme) .container blockquote,
body:not(.dark-theme) .unified-container blockquote {
    background: linear-gradient(to right, #fff5f8, white);
    border-left: 6px solid #ffb6c1;
    border-radius: 0 12px 12px 0;
    padding: 15px 20px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(232, 62, 140, 0.05);
    font-style: italic;
    color: #555;
    position: relative;
}

body:not(.dark-theme) .container blockquote::before,
body:not(.dark-theme) .unified-container blockquote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: rgba(232, 62, 140, 0.1);
    font-family: serif;
    line-height: 1;
}

/* 3. Enhanced Lists (ul, ol) */
body:not(.dark-theme) .container ul:not(.breadcrumb-nav-new):not(.nav-links-desktop):not(summary ul),
body:not(.dark-theme) .unified-container ul:not(.breadcrumb-nav-new):not(.nav-links-desktop):not(summary ul) {
    background: #ffffff;
    background-color: white;
    border-radius: 16px;
    padding: 15px 20px 15px 35px;
    margin: 15px 0;
    box-shadow: 0 6px 20px rgba(0,0,0,0.03);
    list-style-type: none; /* Remove default bullets */
}

body:not(.dark-theme) .container ul:not(.breadcrumb-nav-new):not(.nav-links-desktop) li,
body:not(.dark-theme) .unified-container ul:not(.breadcrumb-nav-new):not(.nav-links-desktop) li {
    margin-bottom: 12px;
    position: relative;
    line-height: 1.7;
}

/* Custom Sakura-like Bullet Points */
body:not(.dark-theme) .container ul:not(.breadcrumb-nav-new):not(.nav-links-desktop) li::before,
body:not(.dark-theme) .unified-container ul:not(.breadcrumb-nav-new):not(.nav-links-desktop) li::before {
    content: "✿";
    position: absolute;
    left: -22px;
    color: var(--wafu-accent, #e83e8c);
    font-size: 1.2rem;
    line-height: 1.5;
}

/* Ordered Lists */
body:not(.dark-theme) .container ol,
body:not(.dark-theme) .unified-container ol {
    background: #ffffff;
    background-color: white;
    border-radius: 16px;
    padding: 20px 25px 20px 45px;
    margin: 15px 0;
    box-shadow: 0 6px 20px rgba(0,0,0,0.03);
}

body:not(.dark-theme) .container ol li,
body:not(.dark-theme) .unified-container ol li {
    margin-bottom: 12px;
    line-height: 1.7;
    padding-left: 5px;
}

body:not(.dark-theme) .container ol li::marker,
body:not(.dark-theme) .unified-container ol li::marker {
    color: #0369a1; /* Vibrant blue */
    font-weight: 900;
    font-family: 'Outfit', sans-serif;
}

/* 4. Beautiful Tables */
body:not(.dark-theme) .container table:not(.vocab-table):not(.data-table):not(.music-table),
body:not(.dark-theme) .unified-container table:not(.vocab-table):not(.data-table):not(.music-table) {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

body:not(.dark-theme) .container table:not(.vocab-table):not(.data-table):not(.music-table) th,
body:not(.dark-theme) .unified-container table:not(.vocab-table):not(.data-table):not(.music-table) th {
    background: linear-gradient(135deg, var(--wafu-primary, #ffd1dc) 0%, #ffc0cb 100%);
    color: var(--wafu-heading, #222);
    font-weight: 800;
    padding: 16px 20px;
    text-align: left;
    border-bottom: 2px solid #ffb6c1;
}

body:not(.dark-theme) .container table:not(.vocab-table):not(.data-table):not(.music-table) td,
body:not(.dark-theme) .unified-container table:not(.vocab-table):not(.data-table):not(.music-table) td {
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
}

body:not(.dark-theme) .container table:not(.vocab-table):not(.data-table):not(.music-table) tr:last-child td,
body:not(.dark-theme) .unified-container table:not(.vocab-table):not(.data-table):not(.music-table) tr:last-child td {
    border-bottom: none;
}

/* Zebra Striping */
body:not(.dark-theme) .container table:not(.vocab-table):not(.data-table):not(.music-table) tr:nth-child(even),
body:not(.dark-theme) .unified-container table:not(.vocab-table):not(.data-table):not(.music-table) tr:nth-child(even) {
    background-color: #fdfdfd;
}

body:not(.dark-theme) .container table:not(.vocab-table):not(.data-table):not(.music-table) tr:hover td,
body:not(.dark-theme) .unified-container table:not(.vocab-table):not(.data-table):not(.music-table) tr:hover td {
    background-color: #fff5f8;
    transition: background-color 0.2s ease;
}

/* 5. Cute Horizontal Rules (hr) */
body:not(.dark-theme) .container hr,
body:not(.dark-theme) .unified-container hr {
    border: none;
    border-top: 2px dashed #ffe4e1;
    margin: 40px 0;
    position: relative;
    overflow: visible;
}

body:not(.dark-theme) .container hr::after,
body:not(.dark-theme) .unified-container hr::after {
    content: "🌸";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 0 10px;
    font-size: 1.2rem;
}

/* 6. Image enhancement inside articles */
body:not(.dark-theme) .container img,
body:not(.dark-theme) .unified-container img {
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    margin: 20px auto;
    display: block;
    max-width: 100%;
}

/* 7. Code/Pre formatting for tech articles */
body:not(.dark-theme) .container pre,
body:not(.dark-theme) .unified-container pre {
    background-color: #282a36;
    color: #f8f8f2;
    padding: 15px 20px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 15px 0;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

body:not(.dark-theme) .container code,
body:not(.dark-theme) .unified-container code {
    background: #fff0f5;
    color: #d63384;
    padding: 3px 6px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.9em;
}
body:not(.dark-theme) .container pre code,
body:not(.dark-theme) .unified-container pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* -------------------------------------
   MASSIVE WAFU-POP UPGRADE FOR TABLES, BOXES, AND HEADINGS
   Overrides global-ui.css for all articles
-------------------------------------- */

/* 8. Gorgeous Headings */
body:not(.dark-theme) h2:not(summary h2) {
    background: linear-gradient(to right, white, #fff0f5) !important;
    color: var(--wafu-heading, #cb1b45) !important;
    border-left: 8px solid var(--wafu-heading, #cb1b45) !important;
    border-bottom: 4px solid #b31b39 !important;
    padding: 15px 20px !important;
    margin-top: 30px !important;
    margin-bottom: 20px !important;
    border-radius: 14px 14px 0 14px !important;
    font-weight: 900 !important;
    box-shadow: 0 8px 20px rgba(203, 27, 69, 0.25) !important;
    position: relative !important;
    overflow: hidden !important;
}
body:not(.dark-theme) h2::before {
    content: '🌸' !important;
    position: absolute !important;
    right: -10px !important;
    bottom: -20px !important;
    font-size: 4rem !important;
    opacity: 0.15 !important;
    pointer-events: none !important;
}

body:not(.dark-theme) h3:not(summary h3) {
    background: linear-gradient(135deg, white, #f7f2ef) !important;
    color: var(--wafu-text, #333) !important;
    border-left: 5px solid var(--wafu-accent, #e83e8c) !important;
    padding: 12px 18px !important;
    border-radius: 12px !important;
    margin-top: 25px !important;
    margin-bottom: 15px !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.06) !important;
}

body:not(.dark-theme) h4:not(summary h4) {
    font-size: 1.3rem !important;
    color: #444 !important;
    border-bottom: 3px dashed #ffb6c1 !important;
    padding-bottom: 10px !important;
    margin-top: 20px !important;
    margin-bottom: 15px !important;
    position: relative !important;
    padding-left: 28px !important;
}
body:not(.dark-theme) h4:not(summary h4)::before {
    content: '✿' !important;
    position: absolute !important;
    left: 0 !important;
    top: -2px !important;
    color: var(--wafu-accent, #cb1b45) !important;
    font-size: 1.4rem !important;
}

/* Restore romaji colors */
body:not(.dark-theme) .romaji-text, body:not(.dark-theme) .romaji {
    color: #e83e8c !important;
    font-weight: 500 !important;
}

/* 9. Premium Boxes (Analysis, Quote, Insight) */
body:not(.dark-theme) .analysis-box,
body:not(.dark-theme) .quote-card,
body:not(.dark-theme) .solid-panel,
body:not(.dark-theme) .insight-box,
body:not(.dark-theme) .solid-panel {
    background: #ffffff !important;
    border: 2px solid #ffe4e1 !important;
    border-radius: 16px !important;
    padding: 20px 25px !important;
    margin: 15px 0 !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.04) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    position: relative !important;
    color: #333 !important;
}

body:not(.dark-theme) .insight-box *,
body:not(.dark-theme) .solid-panel *,
body:not(.dark-theme) .dialogue-box * {
    color: #333 !important;
}
body:not(.dark-theme) .analysis-box:hover,
body:not(.dark-theme) .quote-card:hover,
body:not(.dark-theme) .solid-panel:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 18px 40px rgba(232, 62, 140, 0.15) !important;
    border-color: var(--wafu-accent, #cb1b45) !important;
}

/* 10. Stunning Tables (.data-table, .vocab-table, .music-table) */
body:not(.dark-theme) .data-table,
body:not(.dark-theme) .vocab-table,
body:not(.dark-theme) .music-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    margin: 20px 0 !important;
    background-color: #333 !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 10px 35px rgba(0,0,0,0.06) !important;
    border: 2px solid #ffe4e1 !important;
}

body:not(.dark-theme) .data-table th,
body:not(.dark-theme) .vocab-table th,
body:not(.dark-theme) .music-table th {
    background: linear-gradient(135deg, var(--wafu-fuji, #9b95c9) 0%, #b39ddb 100%) !important;
    color: #333 !important;
    font-weight: 900 !important;
    padding: 20px 25px !important;
    text-align: left !important;
    font-size: 1.15rem !important;
    letter-spacing: 1px !important;
    border-bottom: 3px solid rgba(0,0,0,0.1) !important;
    border-right: 1px solid rgba(255,255,255,0.2) !important;
}
body:not(.dark-theme) .data-table th:last-child,
body:not(.dark-theme) .vocab-table th:last-child,
body:not(.dark-theme) .music-table th:last-child {
    border-right: none !important;
}

body:not(.dark-theme) .data-table td,
body:not(.dark-theme) .vocab-table td,
body:not(.dark-theme) .music-table td {
    padding: 18px 25px !important;
    border-bottom: 1px solid #f0f0f0 !important;
    color: #444 !important;
    line-height: 1.6 !important;
    border-right: 1px solid #f0f0f0 !important;
    font-size: 1.05rem !important;
}
body:not(.dark-theme) .data-table td:last-child,
body:not(.dark-theme) .vocab-table td:last-child,
body:not(.dark-theme) .music-table td:last-child {
    border-right: none !important;
}

body:not(.dark-theme) .data-table tr:last-child td,
body:not(.dark-theme) .vocab-table tr:last-child td,
body:not(.dark-theme) .music-table tr:last-child td {
    border-bottom: none !important;
}

/* Zebra Striping */
body:not(.dark-theme) .data-table tr:nth-child(even) td,
body:not(.dark-theme) .vocab-table tr:nth-child(even) td,
body:not(.dark-theme) .music-table tr:nth-child(even) td {
    background-color: #fafafa !important;
}

body:not(.dark-theme) .data-table tr:hover td,
body:not(.dark-theme) .vocab-table tr:hover td,
body:not(.dark-theme) .music-table tr:hover td {
    background-color: #fff0f5 !important;
    color: var(--wafu-text, #222) !important;
    transition: background-color 0.2s ease !important;
}
