/* Shared by signin.html, shop.html, account.html and the account bar on other pages.
   Layered on styles.css. Accent is the site's shop gold. */

/* Text that depends on BACKEND: hidden until /api/me says which one is live. */
html:not([data-backend="takaro"]) [data-only="takaro"],
html:not([data-backend="dtmatrix"]) [data-only="dtmatrix"] { display: none !important; }

.dt-acct {
    position: relative; z-index: 3;
    display: flex; justify-content: flex-end; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 8px 20px; font-weight: 600; letter-spacing: 1px; font-size: 0.95rem;
    background: rgba(10, 10, 10, 0.92); border-bottom: 1px solid rgba(255, 187, 34, 0.25);
}
.dt-acct a { color: #ffbb22; text-decoration: none; }
.dt-acct a:hover { color: #fff; }
.dt-acct .dt-acct-name { color: #e0e0e0; }
.dt-acct button { background: none; border: 0; padding: 0; font: inherit; color: #b0a090; cursor: pointer; letter-spacing: inherit; }
.dt-acct button:hover { color: #fff; }

.dtp-main { padding: 30px 20px 60px; }
.dtp-nav { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.dtp-nav a { color: #ffbb22; text-decoration: none; font-weight: 600; letter-spacing: 1px; }
.dtp-nav a:hover { color: #fff; }

.dtp-panel {
    background: linear-gradient(135deg, rgba(40, 30, 12, 0.85) 0%, rgba(15, 15, 30, 0.85) 100%);
    border: 2px solid rgba(255, 187, 34, 0.25); border-radius: 20px;
    padding: 28px; margin-bottom: 26px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}
.dtp-panel h2 { color: #ffbb22; font-size: 1.6rem; margin-bottom: 12px; letter-spacing: 1px; }
.dtp-help { color: #c0b49a; margin-bottom: 16px; }
.dtp-cmd { background: rgba(255, 187, 34, 0.15); border: 1px solid rgba(255, 187, 34, 0.4); border-radius: 6px; padding: 2px 8px; color: #ffd36b; font-weight: 700; }

.dtp-btn {
    display: inline-block; background: linear-gradient(135deg, #ffbb22 0%, #d98e00 100%); color: #1a1100;
    border: 2px solid #ffbb22; border-radius: 12px; padding: 12px 24px; font: inherit; font-size: 1.05rem;
    font-weight: 700; letter-spacing: 2px; text-transform: uppercase; cursor: pointer; text-decoration: none; text-align: center;
    min-height: 44px;
}
.dtp-btn:hover:not(:disabled) { background: linear-gradient(135deg, #ffd36b 0%, #ffbb22 100%); box-shadow: 0 8px 30px rgba(255, 187, 34, 0.4); }
.dtp-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.dtp-btn.ghost { background: transparent; color: #d9c79a; border-color: rgba(255, 187, 34, 0.45); }
.dtp-btn.ghost:hover:not(:disabled) { background: rgba(255, 187, 34, 0.12); color: #fff; }
.dtp-btn.danger { background: transparent; color: #ff8080; border-color: rgba(255, 102, 102, 0.5); }
.dtp-btn.small { padding: 8px 14px; font-size: 0.9rem; letter-spacing: 1px; min-height: 40px; }
.dtp-btn.steam { background: #1b2838; color: #fff; border-color: #66c0f4; }
.dtp-btn.steam:hover:not(:disabled) { background: #2a475e; box-shadow: 0 8px 30px rgba(102, 192, 244, 0.3); }

.dtp-input {
    font: inherit; font-size: 1.2rem; font-weight: 600; padding: 12px 16px; min-width: 0; min-height: 44px;
    background: rgba(10, 10, 20, 0.8); border: 2px solid rgba(255, 187, 34, 0.4); border-radius: 12px; color: #fff;
}
.dtp-input:focus { outline: none; border-color: #ffbb22; }
.dtp-code { width: 9ch; letter-spacing: 8px; text-align: center; font-size: 1.8rem; }
.dtp-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.dtp-msg { margin-top: 14px; font-weight: 600; min-height: 1.2em; }
.dtp-msg.error { color: #ff6b6b; }
.dtp-msg.ok { color: #00ff88; }
.dtp-or { margin: 22px 0 14px; color: #8a8068; text-align: center; letter-spacing: 2px; }

/* shop */
.dtp-bal { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.dtp-bal strong { color: #ffd36b; font-size: 1.4rem; }
.dtp-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 0; }
.dtp-chip { font: inherit; font-weight: 600; letter-spacing: 1px; padding: 8px 14px; min-height: 40px; border-radius: 999px; cursor: pointer;
    background: rgba(10, 10, 20, 0.7); color: #d9c79a; border: 1px solid rgba(255, 187, 34, 0.35); }
.dtp-chip[aria-pressed="true"] { background: #ffbb22; color: #1a1100; border-color: #ffbb22; }
.dtp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.dtp-group { grid-column: 1 / -1; color: #ffbb22; font-size: 1.6rem; letter-spacing: 1px; margin: 18px 0 0; padding-bottom: 6px; border-bottom: 2px solid rgba(255, 187, 34, 0.45); }
.dtp-group:first-child { margin-top: 0; }
.dtp-group.sub { color: #ffd36b; font-size: 1.2rem; margin-top: 4px; border-bottom: 1px solid rgba(255, 187, 34, 0.2); }
.dtp-card { background: rgba(10, 10, 20, 0.7); border: 1px solid rgba(255, 187, 34, 0.25); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.dtp-card h3 { color: #fff; font-size: 1.2rem; overflow-wrap: anywhere; }
.dtp-card .dtp-items { color: #a89c80; font-size: 0.95rem; overflow-wrap: anywhere; }
.dtp-price { color: #ffd36b; font-weight: 700; font-size: 1.25rem; }
.dtp-buy { display: flex; gap: 8px; margin-top: auto; align-items: center; }
.dtp-buy .dtp-input { width: 5.5ch; font-size: 1rem; padding: 8px; text-align: center; }
.dtp-buy .dtp-btn { flex: 1; }

/* account */
.dtp-list { list-style: none; }
.dtp-list li { display: flex; gap: 12px; justify-content: space-between; align-items: center; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid rgba(255, 187, 34, 0.15); }
.dtp-list li:last-child { border-bottom: 0; }
.dtp-sub { color: #a89c80; font-size: 0.9rem; }
.dtp-tag { background: rgba(0, 255, 136, 0.15); color: #00ff88; border-radius: 6px; padding: 1px 8px; font-size: 0.85rem; font-weight: 700; margin-left: 6px; }

@media (max-width: 600px) {
    .dtp-main { padding: 20px 12px 40px; }
    .dtp-panel { padding: 18px; border-radius: 14px; }
    .dtp-grid { grid-template-columns: 1fr; }
    .dtp-btn { width: 100%; }
    .dtp-btn.small { width: auto; }
    .dtp-buy .dtp-btn { width: auto; }
    .dt-acct { justify-content: center; }
}
.sidebar-btn.sidebar-shop { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); color: #111; font-weight: 700; }
#dt-acct .dt-acct-shop { font-weight: 700; color: #fbbf24; margin-right: auto; }
.dtp-pics { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 10px; background: radial-gradient(circle at 50% 40%, rgba(255, 187, 34, 0.12), rgba(0, 0, 0, 0.35)); border-radius: 10px; }
.dtp-pic { position: relative; width: 64px; height: 64px; }
.dtp-pic.big { width: 112px; height: 112px; }
.dtp-pic img, .dtp-tint { position: absolute; inset: 0; width: 100%; height: 100%; }
.dtp-pic img { object-fit: contain; image-rendering: auto; }
/* the game's icon tint: colour multiplied over the icon's own shape only */
.dtp-tint { mix-blend-mode: multiply; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.dtp-pic-count { position: absolute; right: -2px; bottom: -2px; background: #111; color: #ffd36b; border: 1px solid rgba(255, 187, 34, 0.5); border-radius: 8px; font-size: 0.75rem; font-weight: 700; padding: 1px 6px; }
.dtp-pic-none { display: grid; place-items: center; width: 100%; height: 100%; color: #665; font-size: 1.6rem; }
