// Kizuki Quest Book — FTB Quests theme override.
//
// WHY THIS FILE EXISTS
//
// FTB Quests' stock background is LIGHT, which is why the chapter banners (all
// near-black) read as dark rectangles pasted onto a pale page. The stock value is
//
//     background: ftblibrary:textures/gui/background_squares.png; color=#DCFFFFFF
//
// and that texture is not light at all — its centre pixel is RGB(59,65,74), a
// dark slate. The `color=#DCFFFFFF` modifier is a 220/255-alpha WHITE overlay
// drawn on top of it, which is what produces the pale default. Dropping that
// overlay to a near-black one keeps the square pattern but inverts the overall
// value, so the banners sit on a dark field and stop reading as stickers.
//
// HOW THE OVERRIDE WORKS
//
// ThemeLoader.loadTheme() calls
//     resourceManager.getResourceStack(new ResourceLocation("ftbquests", "ftb_quests_theme.txt"))
// and then parses EVERY file in that stack into ONE map, in priority order, with
// later files overwriting earlier ones key by key. So this file does not replace
// FTB's - it merges into it. Anything not named here keeps FTB's default, which
// is why this is a short file and not a full copy of ftb_quests_theme.txt.
// Restating everything would freeze the defaults and make future FTB updates
// invisible.
//
// Resource packs sit above mod resources in Minecraft's resource manager, so
// shipping this in our pack is what guarantees it is parsed last and wins. That
// is the reason it lives in the resource pack rather than the mod jar: two mods
// providing the same path resolve by mod load order, which is not something to
// rely on. The banner PNGs still ship in both places - they are referenced by
// path, not merged, so the jar copy is deterministic - but the theme only needs
// one deterministic home.
//
// The banner edge feather in chapter-art.mjs is deliberately independent of this
// file: it fades the art's alpha so it blends against ANY panel background,
// including FTB's stock light one. Turn this theme off and the banners still
// have no hard edge.
//
// Syntax notes, verified against ftb-library's Icon.getIcon(String):
//   - a bare `#AARRGGBB` parses as a Color4I and fills the whole rect
//   - a `namespace:path` parses as a texture
//   - modifiers are `;`-separated `key=value`; `color=` overlays, `tint=`
//     multiplies
//   - `{{name}}` refers to another property in this same file
// Colours are AARRGGBB, alpha first.

[*]
// The single biggest change: the page behind the whole quest web.
//
// FTBQuestsTheme.drawGui() is exactly
//     ThemeProperties.BACKGROUND.get().draw(graphics, x, y, w, h);
// so whatever sits on this property is stretched across the ENTIRE quest view
// - behind the sidebar, the web and every chapter banner. That is the full
// page, and it is the slot the hand-drawn night sky goes in.
//
// TILE_SIZE IS DELIBERATELY ABSENT, and this is the part worth reading twice.
// FTB's stock value is `tile_size=64`, and `tile_size` means REPEAT, not size.
// ImageIcon.draw() branches on it:
//   tileSize <= 0 -> drawTexturedRect(..., 0, 0, 1, 1): the texture is
//                    STRETCHED to fill the rect. This is what we want.
//   tileSize  > 0 -> a QUADS buffer with setUv(x / tileSize, y / tileSize),
//                    i.e. UVs running past 1.0 and relying on GL_REPEAT, with
//                    a period of `tileSize` SCREEN pixels.
// Adding any tile_size value would repeat the 1920px-wide skyfield about
// thirty times across a 1080p window and read as wallpaper.
//
// The stock `color=#DCFFFFFF` overlay is gone too, and deliberately: it was a
// 220/255-alpha WHITE wash that existed to lighten the dark slate underneath.
// Against our own sky it would flatten the stars to nothing. The image is
// authored dark enough to stand on its own; see build/knyq/background.mjs for
// the value budget that keeps quest text and icons readable on top of it.
background:          kizukimod:textures/knyui/kny_nightsky.png

// Side panels. Both default to {{context_menu}}, which inherits {{background}}
// and then lays a light #B4B4B4 over it - so they need restating rather than
// inheriting, or they stay pale against the new dark field.
panel:               #F00C0E15
quest_view_background: #F00C0E15
context_menu:        hollow_rectangle:{{widget_border}}; round_edges + #F00C0E15; color=#C00C0E15; padding=1

// The quest web sits on {{widget_background}}, which was 0x44 black - almost
// invisible against a dark page, so widget edges vanished. Bump the alpha.
widget_background:   #66000000
scroll_bar_background: #66000000

// Selected-chapter highlight in the sidebar. The stock value is a cool grey
// (#60999999); warm gold picks up the Prologue group's colour and reads as
// "you are here" without shouting.
selected_chapter_highlight_1: #38E0A92C
selected_chapter_highlight_2: #18E0A92C

// Text. #5555FF tasks and #AAAAAA titles were both too dim to read on a dark
// field.
text_color:          #FFFFFF
hover_text_color:    #FFFFA0
disabled_text_color: #8A8A8A
quest_view_title:    #E8E2D4
tasks_text_color:    #8FA4FF
rewards_text_color:  #FFC44D

// Quest state rings. Completed was #C856FF56; slightly stronger so a cleared
// quest still reads against the dark backdrop.
quest_completed_color: #D85AFF5E
