dok/public/css/hud.css
2026-04-10 17:13:23 +01:00

500 lines
9.2 KiB
CSS
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* =========================
HUD Container
========================= */
#hud {
position: fixed;
top: 0;
left: 0;
z-index: 1500;
display: flex;
flex-direction: column;
align-items: flex-end;
justify-content: flex-end;
/* Feste Breite statt viewport-Berechnung → kein Browser-Unterschied */
width: clamp(200px, 18vw, 280px);
pointer-events: none;
}
/* =========================
Charakter Panel (oben)
========================= */
#hud-character {
display: flex;
align-items: center;
gap: 0;
background: linear-gradient(
135deg,
rgba(10, 6, 2, 0.92) 0%,
rgba(30, 18, 6, 0.92) 100%
);
border: 2px solid #8b6a2a;
border-radius: 8px 8px 0 0;
border-bottom: 1px solid #5a3e15;
padding: 6px 14px 6px 6px;
pointer-events: all;
width: 100%;
box-sizing: border-box;
box-shadow:
0 2px 12px rgba(0, 0, 0, 0.7),
inset 0 1px 0 rgba(255, 220, 80, 0.08);
}
#hud-avatar-wrap {
position: relative;
width: clamp(52px, 4.5vw, 72px);
height: clamp(52px, 4.5vw, 72px);
flex-shrink: 0;
}
#hud-avatar {
width: 100%;
height: 100%;
border-radius: 50%;
object-fit: cover;
display: block;
border: 2px solid #c8960a;
box-shadow: 0 0 10px rgba(200, 150, 10, 0.5);
}
#hud-vip {
position: absolute;
bottom: -4px;
left: 50%;
transform: translateX(-50%);
background: linear-gradient(#b8720a, #7a4a05);
border: 1px solid #f0b030;
border-radius: 4px;
font-family: "Cinzel", serif;
font-size: 8px;
font-weight: bold;
color: #ffe080;
white-space: nowrap;
padding: 1px 5px;
letter-spacing: 0.5px;
}
/* Name + Klasse */
#hud-info {
display: flex;
flex-direction: column;
margin-left: 10px;
flex: 1;
gap: 4px;
}
#hud-name {
font-family: "Cinzel", serif;
font-size: clamp(11px, 0.9vw, 15px);
font-weight: bold;
color: #f0d9a6;
text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
letter-spacing: 0.5px;
}
/* Energie */
#hud-energy {
display: flex;
align-items: center;
gap: 6px;
}
#hud-energy-label {
font-family: "Cinzel", serif;
font-size: 10px;
color: #a08060;
}
#hud-energy-bar-wrap {
display: flex;
align-items: center;
gap: 5px;
}
#hud-energy-value {
font-family: "Cinzel", serif;
font-size: 11px;
font-weight: bold;
color: #f0d9a6;
background: rgba(0, 0, 0, 0.4);
border: 1px solid #5a3e15;
border-radius: 4px;
padding: 1px 7px;
}
#hud-energy-plus {
width: 18px;
height: 18px;
background: linear-gradient(#4a8a20, #2a5a10);
border: 1px solid #6acc30;
border-radius: 4px;
color: #fff;
font-size: 13px;
font-weight: bold;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
pointer-events: all;
transition: 0.15s;
line-height: 1;
}
#hud-energy-plus:hover {
background: linear-gradient(#5aaa28, #3a7015);
box-shadow: 0 0 6px rgba(100, 200, 40, 0.4);
}
/* =========================
Währungs Panel (unten)
========================= */
#hud-currency {
display: flex;
flex-direction: column;
gap: 4px;
background: linear-gradient(
135deg,
rgba(8, 5, 1, 0.92) 0%,
rgba(22, 13, 4, 0.92) 100%
);
border: 2px solid #8b6a2a;
border-top: none;
border-radius: 0 0 8px 8px;
padding: 5px 10px;
pointer-events: all;
width: 100%;
box-sizing: border-box;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
}
.hud-res-row {
display: flex;
align-items: center;
gap: 8px;
}
/* Einzelne Währung */
.hud-res {
display: flex;
align-items: center;
gap: 4px;
}
.hud-res-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
flex-shrink: 0;
font-size: 15px;
filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.7));
}
/* Ressource Icons (gem, silver, wood, stone, gold, iron) einheitliche Größe */
.hud-res-icon-gem,
.hud-res-icon-silver,
.hud-res-icon-wood,
.hud-res-icon-stone,
.hud-res-icon-gold,
.hud-res-icon-iron {
width: 22px;
height: 22px;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
}
.hud-res-icon-gem img,
.hud-res-icon-silver img,
.hud-res-icon-wood img,
.hud-res-icon-stone img,
.hud-res-icon-gold img,
.hud-res-icon-iron img {
width: 22px;
height: 22px;
object-fit: contain;
filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.7));
display: block;
}
.hud-res-value {
font-family: "Cinzel", serif;
font-size: clamp(10px, 0.8vw, 13px);
font-weight: bold;
color: #f0d9a6;
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
min-width: 28px;
}
/* Trennlinie */
.hud-sep {
width: 1px;
height: 18px;
background: rgba(139, 106, 42, 0.4);
margin: 0 2px;
}
/* Gold Button */
#hud-gold-btn {
margin-left: 4px;
padding: 3px 12px;
background: linear-gradient(#d4830a, #f0a020);
border: 1px solid #f8c040;
border-radius: 5px;
font-family: "Cinzel", serif;
font-size: 11px;
font-weight: bold;
color: #3a1a00;
cursor: pointer;
pointer-events: all;
transition: 0.15s;
white-space: nowrap;
}
#hud-gold-btn:hover {
background: linear-gradient(#e4930a, #ffc030);
box-shadow: 0 0 8px rgba(240, 160, 30, 0.5);
transform: scale(1.04);
}
/* Inline Gold Icon (z.B. Schwarzmarkt Preise) */
.inline-gold-icon {
width: 18px;
height: 18px;
object-fit: contain;
vertical-align: middle;
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
display: inline-block;
}
/* =========================
Shop Overlay & Popup
========================= */
#shop-overlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.7);
z-index: 3999;
display: none;
}
#shop-overlay.active { display: block; }
#shop-popup {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) scale(0.92);
opacity: 0;
pointer-events: none;
width: min(1100px, 95vw);
max-height: 90vh;
overflow-y: auto;
background: url("/images/parchment.png") center / cover no-repeat;
border: 4px solid #6b4b2a;
border-radius: 12px;
box-shadow: 0 0 60px rgba(0,0,0,0.95);
z-index: 4000;
display: flex;
flex-direction: column;
transition: opacity 0.25s ease, transform 0.25s ease;
}
#shop-popup.active {
opacity: 1;
transform: translate(-50%, -50%) scale(1);
pointer-events: all;
}
#shop-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 24px;
background: linear-gradient(#6b4b2a, #3c2414);
border-bottom: 2px solid #8b6a3c;
border-radius: 8px 8px 0 0;
flex-shrink: 0;
}
#shop-title {
font-family: "Tangerine", serif;
font-size: 46px;
color: #f0d9a6;
text-shadow: 0 2px 6px black;
}
#shop-close {
font-size: 22px;
color: #f0d9a6;
cursor: pointer;
width: 34px; height: 34px;
display: flex; align-items: center; justify-content: center;
border-radius: 6px;
transition: 0.2s;
}
#shop-close:hover { background: rgba(255,255,255,0.1); color: #fff; }
#shop-subtitle {
text-align: center;
font-family: "Cinzel", serif;
font-size: 14px;
color: #5c3b20;
padding: 14px 24px 0;
flex-shrink: 0;
}
#shop-grid {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 16px;
padding: 20px 30px;
}
.shop-loading {
grid-column: 1 / -1;
text-align: center;
font-family: "Cinzel", serif;
color: #8b6a3c;
padding: 40px;
}
/* Shop Karte */
.shop-card {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
padding: 20px 14px 14px;
background: linear-gradient(145deg, rgba(58,40,16,0.85), rgba(26,15,4,0.85));
border: 2px solid #8b6a3c;
border-radius: 12px;
cursor: pointer;
transition: 0.2s;
box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.shop-card:hover {
border-color: #f0d060;
transform: translateY(-4px);
box-shadow: 0 8px 24px rgba(0,0,0,0.7), 0 0 14px rgba(200,160,60,0.3);
}
.shop-badge {
position: absolute;
top: -10px; right: -10px;
background: linear-gradient(#c8200a, #8b1006);
border: 2px solid #ff6040;
border-radius: 20px;
font-family: "Cinzel", serif;
font-size: 10px;
font-weight: bold;
color: #fff;
padding: 3px 8px;
white-space: nowrap;
}
.shop-gem-icon {
font-size: 42px;
filter: drop-shadow(0 2px 6px rgba(0,100,255,0.5));
}
.shop-package-name {
font-family: "Tangerine", serif;
font-size: 28px;
color: #f0d9a6;
text-shadow: 0 1px 4px black;
}
.shop-gems-amount {
font-family: "Cinzel", serif;
font-size: 22px;
font-weight: bold;
color: #f0d060;
}
.shop-gems-label {
font-family: "Cinzel", serif;
font-size: 11px;
color: #a08060;
text-transform: uppercase;
letter-spacing: 1px;
}
.shop-breakdown {
font-family: "Cinzel", serif;
font-size: 11px;
color: #c8a86a;
}
.shop-price-per {
font-family: "Cinzel", serif;
font-size: 10px;
color: #8b6a3c;
}
.shop-buy-btn {
margin-top: 8px;
width: 100%;
padding: 10px;
background: linear-gradient(#6b4b2a, #3c2414);
border: 2px solid #f0d060;
border-radius: 8px;
color: #f0d9a6;
font-family: "Cinzel", serif;
font-size: 15px;
font-weight: bold;
cursor: pointer;
transition: 0.2s;
}
.shop-buy-btn:hover {
background: linear-gradient(#8b6b3a, #5c3a1a);
color: #fff;
box-shadow: 0 0 12px rgba(240,208,96,0.4);
}
.shop-buy-btn:disabled { opacity: 0.5; cursor: not-allowed; }
#shop-footer {
text-align: center;
font-family: "Cinzel", serif;
font-size: 11px;
color: #8b6a3c;
padding: 0 24px 20px;
flex-shrink: 0;
}