/* ==========================================================================
   AUTHENTIC MATRIX CORE DESIGN STYLESHEET (style.css)
   ========================================================================== */

:root {
    --bg-dark: #0d1117;
    --panel-bg: #161b22;
    --border-color: #30363d;
    --gold-solid: #d4af37;
    --gold-gradient: linear-gradient(135deg, #bf953f 0%, #fcf6ba 25%, #b38728 50%, #fbf5b7 75%, #aa771c 100%);
    --text-primary: #ffffff;
    --text-muted: #8b949e;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body.dark-mode {
    background-color: #06080c;
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Authentic Dark Blurred Crop Background Presentation */
body.dark-mode::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('AppIconTopTens.jpg');
    background-size: cover;
    background-position: center;
    filter: brightness(0.15) blur(40px);
    z-index: -1;
    pointer-events: none;
}

/* Header Alignment: Logo, Back Button, Title, Burger, Avatar */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background-color: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-header-logo {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.header-back-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.header-back-btn:hover {
    color: var(--gold-solid);
}

.header-dynamic-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gold-solid);
    letter-spacing: 1px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* Settings Burger Trigger */
.settings-burger-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 18px;
    height: 12px;
}

.burger-bar {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
}

/* Avatar Badge Node */
.header-avatar-node {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #21262d;
    border: 1px solid var(--gold-solid);
    color: var(--gold-solid);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

/* Centralized Matrix Base Module Grid Card Container */
.app-container {
    max-width: 1000px;
    margin: 4rem auto;
    padding: 0 1.5rem;
}

.central-matrix-wrapper {
    background-color: rgba(22, 27, 34, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(0,0,0,0.6);
}

.matrix-gold-banner {
    background: var(--gold-gradient);
    color: #000000;
    text-align: center;
    padding: 0.9rem;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* The Correct 3-Column Horizontal Layout Engine Grid */
.list-rows-matrix {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    padding: 2.5rem;
}

/* Category Card Layout */
.category-matrix-card {
    background-color: #0d1117;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 2rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
}

.category-matrix-card:hover {
    transform: translateY(-2px);
    border-color: var(--gold-solid);
    background-color: #161b22;
}

.card-icon-frame {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    display: block;
}

.card-title-string {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.card-item-counter {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Side Access Vault Drawers */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 1000;
}
.drawer-overlay.hidden { display: none !important; }

.drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 360px;
    height: 100%;
    background-color: var(--bg-dark);
    border-left: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.drawer-header-row { display: flex; justify-content: space-between; align-items: center; }
.drawer-gold-title { color: var(--gold-solid); font-size: 1.1rem; font-weight: 700; }
.btn-close-drawer { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; }
.drawer-divider { border: 0; height: 1px; background-color: var(--border-color); margin: 1rem 0; }
.drawer-section-heading { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.75rem; }

.drawer-profile-card { display: flex; align-items: center; background-color: var(--panel-bg); padding: 0.75rem; border-radius: 6px; }
.drawer-avatar-fallback { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--gold-solid); color: var(--gold-solid); display: flex; align-items: center; justify-content: center; font-weight: 700; margin-right: 0.75rem; }
.drawer-username-label { font-size: 0.9rem; font-weight: 600; }
.profile-status-badge { font-size: 0.7rem; font-weight: bold; margin-top: 0.15rem; }
.unverified-tier { color: #cf6679; }

.drawer-explanatory-prose { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.75rem; line-height: 1.4; }
.drawer-input-group-row { display: flex; gap: 0.5rem; }
.drawer-text-field { flex: 1; background-color: #06080c; border: 1px solid var(--border-color); color: #fff; padding: 0.5rem; border-radius: 4px; font-size: 0.85rem; }
.btn-drawer-action-primary { background-color: var(--gold-solid); color: #000; border: none; padding: 0.5rem 1rem; border-radius: 4px; font-weight: 600; cursor: pointer; }

.btn-drawer-action-danger { background: none; border: 1px solid #cf6679; color: #cf6679; padding: 0.6rem; border-radius: 4px; font-weight: 600; cursor: pointer; margin-top: auto; }
.btn-drawer-action-danger:hover { background-color: #cf6679; color: #fff; }

.hidden { display: none !important; }
