/* =========================================================
   TGM Game Architectural Registry Stylesheet
   ========================================================= */

.registry-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 10px 20px 40px 20px;
}

/* --- Hero & Positioning --- */
.registry-hero {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 30px auto;
}

.registry-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(1, 245, 187, 0.1);
    border: 1px solid rgba(1, 245, 187, 0.35);
    color: var(--tgm-bright-cyan, #01F5BB);
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.registry-hero h1 {
    font-size: 2.75rem;
    font-weight: 900;
    color: #FFFFFF;
    margin: 0 0 10px 0;
    line-height: 1.15;
    letter-spacing: -1.2px;
}

.registry-hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* --- KPI Metric Bar --- */
.registry-kpi-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.registry-kpi-card {
    background: var(--content-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 18px 20px;
    text-align: center;
    transition: border-color 0.2s ease;
}

.registry-kpi-card:hover {
    border-color: rgba(1, 245, 187, 0.4);
}

.kpi-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--tgm-bright-cyan, #01F5BB);
    font-family: monospace;
    line-height: 1.1;
    margin-bottom: 6px;
}

.kpi-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

/* --- Studio Declaration Callout Banner (NO "CLAIM") --- */
.studio-declaration-banner {
    background: linear-gradient(135deg, rgba(20, 24, 38, 0.95) 0%, rgba(13, 16, 26, 0.98) 100%);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-left: 5px solid #f59e0b;
    border-radius: 12px;
    padding: 20px 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 35px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.declaration-info h3 {
    margin: 0 0 6px 0;
    font-size: 1.15rem;
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.declaration-info p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.declaration-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.declaration-btn-pub {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid #f59e0b;
    color: #f59e0b;
    padding: 9px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.declaration-btn-pub:hover {
    background: #f59e0b;
    color: #141721;
}

.declaration-btn-dev {
    background: rgba(1, 245, 187, 0.12);
    border: 1px solid var(--tgm-bright-cyan, #01F5BB);
    color: var(--tgm-bright-cyan, #01F5BB);
    padding: 9px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.declaration-btn-dev:hover {
    background: var(--tgm-bright-cyan, #01F5BB);
    color: #141721;
}

/* --- Controls: Search, Filters & Sorting --- */
.registry-controls-card {
    background: var(--content-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 22px 24px;
    margin-bottom: 25px;
}

.registry-search-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.registry-search-input {
    flex: 1;
    min-width: 260px;
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.98rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.registry-search-input:focus {
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.registry-sort-select {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    cursor: pointer;
    min-width: 200px;
}

.registry-sort-select:focus {
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.registry-filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-chip-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 700;
    margin-right: 6px;
}

.filter-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    border-color: rgba(255, 255, 255, 0.35);
    color: #FFFFFF;
}

.filter-chip.active {
    background: #FFFFFF;
    border-color: #FFFFFF;
    color: #0A0D14;
    font-weight: 700;
}

.registry-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.78rem;
    color: #64748B;
    font-family: 'JetBrains Mono', monospace, sans-serif;
    font-weight: 500;
}

/* --- Master Registry Table --- */
/* --- Master Registry Table --- */
.registry-table-wrapper {
    background: var(--content-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px 12px 0 0;
    overflow-x: auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 0;
}

.registry-table-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.registry-table-header-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.registry-table-header-tag {
    font-family: 'JetBrains Mono', monospace, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #94A3B8;
}

.registry-table-header-telemetry {
    font-family: 'JetBrains Mono', monospace, sans-serif;
    font-size: 0.7rem;
    color: #64748B;
    letter-spacing: 0.5px;
}

.btn-data-portal-ingress {
    background: #FFFFFF;
    color: #0A0D14;
    font-family: 'JetBrains Mono', monospace, sans-serif;
    font-weight: 700;
    font-size: 0.76rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #FFFFFF;
    white-space: nowrap;
}

.btn-data-portal-ingress:hover {
    background: #0A0D14;
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

.registry-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.92rem;
    min-width: 760px;
}

.registry-table th {
    background: rgba(255, 255, 255, 0.03);
    padding: 14px 16px;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.registry-table td {
    padding: 13px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.registry-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Game Title Cell */
.game-cell {
    min-width: 200px;
}

.game-title-text {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.98rem;
    line-height: 1.3;
    display: block;
    text-decoration: none;
    transition: color 0.2s ease;
}

.game-title-text:hover {
    color: #FFFFFF;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.game-studio-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 2px;
}

/* Tech / Release Cell */
.tech-cell {
    white-space: nowrap;
    min-width: 90px;
}

.tech-release-year {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.88rem;
}

.tech-engine-tag {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 3px;
}

/* Score Values - Monochromatic Data Matrix */
.score-mono {
    font-family: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
    font-weight: 700;
    font-size: 1.02rem;
    white-space: nowrap;
    letter-spacing: -0.2px;
}

.dd-score-text {
    color: #FFFFFF;
}

.sge-score-text {
    color: #E2E8F0;
}

.benchmark-score-text {
    color: #FFFFFF;
    font-size: 1.12rem;
    font-weight: 800;
}

/* Status Badges - The Functional Chromatic Exception */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    white-space: nowrap;
    font-family: 'JetBrains Mono', 'SF Mono', monospace;
}

.status-pill-baseline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
}

.status-pill-certified {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #10B981;
}

.status-pill-provisional {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #f59e0b;
}

/* Actions Cell & Dual Button Stack */
.action-cell-stack {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: nowrap;
}

.action-btn-benchmark {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 6px;
    background: #FFFFFF;
    border: 1px solid #FFFFFF;
    color: #0A0D14;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.action-btn-benchmark:hover {
    background: #E2E8F0;
    border-color: #E2E8F0;
    color: #000000;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.action-btn-compare {
    display: inline-flex;
    align-items: center;
    padding: 5px 11px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94A3B8;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    font-family: inherit;
}

.action-btn-compare:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
}

.action-btn-compare.active {
    background: rgba(255, 255, 255, 0.18);
    border-color: #FFFFFF;
    color: #FFFFFF;
    font-weight: 700;
}

/* Comparison Active Banner */
.comparison-active-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    background: linear-gradient(90deg, rgba(147, 51, 234, 0.2) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(168, 85, 247, 0.45);
    border-radius: 10px;
    padding: 14px 20px;
    margin-bottom: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.comparison-banner-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
    color: #f3e8ff;
    flex-wrap: wrap;
}

.comparison-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(168, 85, 247, 0.35);
    border: 1px solid #c084fc;
    color: #f3e8ff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 999px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-clear-comparison {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f1f5f9;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.btn-clear-comparison:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

/* Row & Badge Highlighting in Comparison Mode */
.row-target-highlight {
    background: rgba(147, 51, 234, 0.12) !important;
    border-left: 3px solid #c084fc !important;
}

.target-title-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(168, 85, 247, 0.3);
    border: 1px solid #c084fc;
    color: #f3e8ff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
    vertical-align: middle;
}

.peer-title-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #E2E8F0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
    vertical-align: middle;
}

/* --- Registry Table Pagination --- */
.registry-pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 14px 20px;
    background: var(--content-bg);
    border: 1px solid var(--border-color);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0 0 12px 12px;
    margin-bottom: 40px;
}

.pagination-info {
    font-size: 0.86rem;
    color: var(--text-secondary);
}

.pagination-controls {
    display: flex;
    gap: 6px;
    align-items: center;
}

.pagination-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 5px 11px;
    border-radius: 6px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.35);
    color: #FFFFFF;
}

.pagination-btn.active {
    background: #FFFFFF;
    border-color: #FFFFFF;
    color: #0A0D14;
    font-weight: 700;
}

.pagination-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pagination-size-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    color: var(--text-secondary);
}

.page-size-select {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
}

/* --- Portal Link to Gamer Side --- */
.gamer-portal-banner {
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.1) 0%, rgba(1, 245, 187, 0.05) 100%);
    border: 1px solid rgba(129, 140, 248, 0.3);
    border-radius: 12px;
    padding: 24px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.gamer-portal-content h3 {
    margin: 0 0 6px 0;
    font-size: 1.25rem;
    color: #818cf8;
}

.gamer-portal-content p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.gamer-portal-btn {
    background: #818cf8;
    color: #141721;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.gamer-portal-btn:hover {
    background: #9fa8ff;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .registry-hero h1 { font-size: 2rem; }
    .studio-declaration-banner { flex-direction: column; align-items: flex-start; }
    .declaration-actions { width: 100%; flex-direction: column; }
    .gamer-portal-banner { flex-direction: column; align-items: flex-start; }
    .gamer-portal-btn { width: 100%; text-align: center; }
}
