/* Trojan Hunter – Game Styles */

/* ===== Container ===== */
.th-game-container {
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    background: #0a1628;
    border-radius: 12px;
    overflow: hidden;
    font-family: 'Segoe UI', Arial, sans-serif;
    user-select: none;
    -webkit-user-select: none;
}

.th-screen {
    width: 100%;
}

/* ===== Startbildschirm ===== */
.th-start-screen {
    background: linear-gradient(135deg, #0a1628 0%, #1a3a6b 50%, #0a1628 100%);
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.th-start-content {
    text-align: center;
    max-width: 600px;
}

.th-start-logo {
    width: 180px;
    height: 180px;
    object-fit: contain;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.5));
}

.th-game-title {
    font-size: 56px;
    font-weight: 900;
    color: #00d4ff;
    margin: 0 0 10px;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.8);
    letter-spacing: 4px;
    text-transform: uppercase;
}

.th-game-subtitle {
    font-size: 18px;
    color: #8899aa;
    margin: 0 0 30px;
}

.th-instructions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 35px;
    text-align: left;
}

.th-instruction-item {
    background: rgba(26, 74, 138, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ccddef;
    font-size: 14px;
}

.th-instruction-icon {
    font-size: 22px;
}

/* ===== Buttons ===== */
.th-btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
    transition: all 0.2s ease;
    letter-spacing: 1px;
}

.th-btn-primary {
    background: linear-gradient(135deg, #1a6b3a, #0d4422);
    color: #4caf50;
    border-color: #4caf50;
    font-size: 20px;
    padding: 16px 50px;
    text-transform: uppercase;
}

.th-btn-primary:hover {
    background: linear-gradient(135deg, #0d4422, #1a6b3a);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
    transform: translateY(-2px);
}

.th-btn-secondary {
    background: rgba(26, 74, 138, 0.3);
    color: #00d4ff;
    border-color: #00d4ff;
}

.th-btn-secondary:hover {
    background: rgba(0, 212, 255, 0.1);
}

.th-btn-cta {
    background: linear-gradient(135deg, #1a6b3a, #0d4422);
    color: #4caf50;
    border-color: #4caf50;
    font-size: 15px;
}

.th-btn-cta:hover {
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.4);
}

.th-btn-linkedin {
    background: #0077b5;
    color: #fff;
    border-color: #0077b5;
    font-size: 14px;
    padding: 10px 20px;
}

.th-btn-facebook {
    background: #1877f2;
    color: #fff;
    border-color: #1877f2;
    font-size: 14px;
    padding: 10px 20px;
}

.th-btn-copy {
    background: rgba(26, 74, 138, 0.5);
    color: #00d4ff;
    border-color: #00d4ff;
    font-size: 14px;
    padding: 10px 20px;
}

/* ===== Spielbereich ===== */
#th-game-area {
    position: relative;
    cursor: crosshair;
}

#th-canvas {
    display: block;
    width: 100%;
    height: auto;
}

/* ===== HUD ===== */
.th-hud {
    position: absolute;
    background: rgba(0, 0, 0, 0.75);
    border: 2px solid rgba(0, 212, 255, 0.4);
    border-radius: 8px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    pointer-events: none;
    backdrop-filter: blur(4px);
}

.th-hud-topleft { top: 15px; left: 15px; }
.th-hud-topright { top: 15px; right: 15px; gap: 20px; }
.th-hud-bottomleft { bottom: 15px; left: 15px; gap: 15px; }
.th-hud-bottomright { bottom: 15px; right: 15px; }

.th-hud-label {
    font-size: 11px;
    color: #8899aa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.th-hud-value {
    font-size: 22px;
    font-weight: bold;
    font-family: monospace;
    color: #f5a623;
    line-height: 1;
}

.th-hud-block { text-align: center; }

.th-hud-icon { font-size: 20px; }

/* Munition */
.th-ammo-display {
    display: flex;
    gap: 4px;
    align-items: center;
}

.th-bullet {
    width: 8px;
    height: 20px;
    background: linear-gradient(to bottom, #f5a623, #c47a00);
    border-radius: 4px 4px 2px 2px;
    transition: opacity 0.1s;
}

.th-bullet.empty {
    background: #333;
    opacity: 0.4;
}

/* Leben */
.th-lives-display {
    display: flex;
    gap: 5px;
    align-items: center;
    margin-right: 8px;
}

.th-heart {
    font-size: 22px;
    transition: transform 0.2s;
}

.th-heart.lost {
    opacity: 0.2;
    filter: grayscale(1);
}

/* Kill-Streak */
.th-killstreak {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(245, 166, 35, 0.9);
    color: #000;
    font-size: 28px;
    font-weight: 900;
    padding: 15px 40px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: none;
    box-shadow: 0 0 30px rgba(245, 166, 35, 0.8);
    animation: th-killstreak-anim 0.3s ease-out;
    pointer-events: none;
    z-index: 100;
}

@keyframes th-killstreak-anim {
    from { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    to   { transform: translate(-50%, -50%) scale(1);   opacity: 1; }
}

/* Feedback */
.th-feedback {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(220, 53, 69, 0.9);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    padding: 10px 25px;
    border-radius: 8px;
    pointer-events: none;
    z-index: 100;
    animation: th-feedback-anim 0.2s ease-out;
}

@keyframes th-feedback-anim {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Nachladen */
.th-reload-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    color: #f5a623;
    font-size: 24px;
    font-weight: bold;
    padding: 15px 40px;
    border-radius: 10px;
    letter-spacing: 3px;
    pointer-events: none;
    z-index: 100;
}

.th-reload-btn {
    position: absolute;
    bottom: 70px;
    right: 15px;
    background: rgba(245, 166, 35, 0.9);
    color: #000;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: none;
    z-index: 50;
}

/* ===== Ergebnisbildschirm ===== */
#th-result-screen {
    background: linear-gradient(135deg, #0a1628 0%, #1a3a6b 50%, #0a1628 100%);
    min-height: 600px;
    padding: 30px 20px;
    overflow-y: auto;
}

.th-result-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.th-result-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 15px;
}

.th-result-title {
    font-size: 36px;
    font-weight: 900;
    color: #00d4ff;
    margin: 0 0 25px;
    letter-spacing: 3px;
}

.th-result-stats {
    background: rgba(26, 74, 138, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.th-result-stat-main { margin-bottom: 20px; }

.th-result-label {
    font-size: 12px;
    color: #8899aa;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.th-result-score {
    font-size: 64px;
    font-weight: 900;
    color: #f5a623;
    font-family: monospace;
    line-height: 1;
}

.th-result-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.th-result-stat {
    background: rgba(10, 22, 40, 0.5);
    border-radius: 8px;
    padding: 15px;
}

.th-result-rang {
    font-size: 18px;
    font-weight: bold;
    color: #00d4ff;
}

.th-result-quote {
    font-size: 18px;
    font-weight: bold;
    color: #4caf50;
}

/* Formular */
.th-form-section {
    background: rgba(26, 74, 138, 0.2);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    text-align: left;
}

.th-form-section h3 {
    color: #ccddef;
    margin-top: 0;
    font-size: 18px;
    text-align: center;
}

.th-form-group { margin-bottom: 12px; }

.th-input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(10, 22, 40, 0.8);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 6px;
    color: #fff;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.th-input:focus {
    outline: none;
    border-color: #00d4ff;
}

.th-input::placeholder { color: #556677; }

.th-checkbox-group { display: flex; align-items: flex-start; }

.th-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #8899aa;
    font-size: 13px;
    cursor: pointer;
}

.th-checkbox-label input { margin-top: 2px; }

.th-checkbox-label a { color: #00d4ff; }

.th-form-error {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid #dc3545;
    color: #ff6b7a;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 12px;
}

/* Platz-Anzeige */
.th-platz-anzeige {
    font-size: 20px;
    color: #ccddef;
    margin-bottom: 20px;
}

.th-platz-zahl {
    font-size: 36px;
    font-weight: 900;
    color: #f5a623;
    font-family: monospace;
}

/* Highscore-Liste */
.th-highscore-section {
    background: rgba(26, 74, 138, 0.2);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: left;
}

.th-hs-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.th-hs-tab {
    padding: 7px 14px;
    background: rgba(26, 74, 138, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 5px;
    color: #8899aa;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.th-hs-tab.active,
.th-hs-tab:hover {
    background: rgba(0, 212, 255, 0.15);
    color: #00d4ff;
    border-color: #00d4ff;
}

.th-highscore-list table {
    width: 100%;
    border-collapse: collapse;
}

.th-highscore-list th {
    color: #8899aa;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 10px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.th-highscore-list td {
    padding: 8px 10px;
    color: #ccddef;
    font-size: 14px;
    border-bottom: 1px solid rgba(26, 74, 138, 0.3);
}

.th-highscore-list tr.th-my-entry td {
    color: #f5a623;
    font-weight: bold;
}

.th-hs-rank { color: #8899aa; font-size: 12px; }
.th-hs-score { color: #f5a623; font-weight: bold; font-family: monospace; }
.th-loading { color: #8899aa; text-align: center; padding: 20px; }

/* Sharing */
.th-sharing {
    margin-bottom: 20px;
}

.th-sharing-label {
    color: #8899aa;
    font-size: 14px;
    margin-bottom: 10px;
}

.th-sharing-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* CTA Buttons */
.th-result-ctas {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Sharing früh (vor Eintragen) */
.th-sharing-early {
    margin: 15px 0;
    padding: 15px;
    background: rgba(0,212,255,0.06);
    border: 1px solid rgba(0,212,255,0.15);
    border-radius: 8px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .th-game-title { font-size: 36px; }
    .th-instructions { grid-template-columns: 1fr; }
    .th-hud-value { font-size: 18px; }
    .th-result-score { font-size: 48px; }
    .th-result-stats-row { grid-template-columns: 1fr; }
    .th-reload-btn { display: block !important; }
    .th-result-ctas { flex-direction: column; align-items: center; }
    .th-sharing-buttons { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
    .th-game-title { font-size: 28px; letter-spacing: 2px; }
    .th-hud { padding: 5px 8px; }
    .th-hud-value { font-size: 15px; }
    .th-heart { font-size: 16px; }
}
