/* 
 * 🏛️ ATLAS-CIV-CLICKER | CSS-MODUL: SYSTEM UI
 * 
 * MENSCH: Steuert globale System-Komponenten wie Bestätigungs-Dialoge, 
 * Tooltips und den kaiserlichen Atlas-Guide.
 * KI: @ui-system @modals @atlas-guide @v3.8-premium @utilities
 */

/* --- 0. Kaiserliche Utility-Klassen (Restore) --- */
.text-gold { color: var(--color-gold) !important; text-shadow: 0 0 8px rgba(245, 158, 11, 0.3); }
.text-blue { color: #60a5fa !important; text-shadow: 0 0 8px rgba(96, 165, 250, 0.3); }
.text-rubin { color: var(--color-rubine) !important; text-shadow: 0 0 8px rgba(217, 70, 239, 0.3); }

.glass-gold { background: rgba(245, 158, 11, 0.05) !important; border-left: 3px solid var(--color-gold) !important; border-radius: 8px; padding: 10px; }
.glass-blue { background: rgba(96, 165, 250, 0.05) !important; border-left: 3px solid #60a5fa !important; border-radius: 8px; padding: 10px; }
.glass-rubin { background: rgba(217, 70, 239, 0.05) !important; border-left: 3px solid var(--color-rubine) !important; border-radius: 8px; padding: 10px; }

.badge-gold { background: rgba(245, 158, 11, 0.2); color: var(--color-gold); padding: 2px 8px; border-radius: 12px; font-weight: 800; font-size: 0.7rem; }
.badge-blue { background: rgba(96, 165, 250, 0.2); color: #60a5fa; padding: 2px 8px; border-radius: 12px; font-weight: 800; font-size: 0.7rem; }
.badge-rubin { background: rgba(217, 70, 239, 0.2); color: var(--color-rubine); padding: 2px 8px; border-radius: 12px; font-weight: 800; font-size: 0.7rem; }

/* --- 1. System Modals (Nova v3.8) --- */
.confirm-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    animation: fadeIn 0.3s ease;
}

.confirm-box {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #f87171; /* Massive Warn-Kante */
    padding: 2.5rem;
    border-radius: 24px;
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.7);
    text-align: center;
    transform: translateY(20px);
    animation: slideUp 0.3s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Hilfe-Modal & Info-Boxen */
.modal-box {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 20px;
    width: 500px;
    max-width: 90vw;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    position: relative;
    animation: slideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.modal-close:hover {
    color: #fff;
    transform: rotate(90deg);
}

/* Hilfe-System (Gonzo Finder) */
.info-spot {
    position: absolute;
    top: 10px; /* In den sichtbaren Bereich verschoben (v3.8 Fix) */
    right: 10px;
    width: 28px;
    height: 28px;
    background: var(--color-gold);
    color: #000; /* Schwarzes ? auf Gold */
    border: 2px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 900;
    cursor: help;
    z-index: 100; /* Über dem Banner-Stack */
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.6);
    animation: pulse-gold-help 1.5s infinite ease-in-out;
}

@keyframes pulse-gold-help {
    0% { transform: scale(1); box-shadow: 0 0 10px rgba(245, 158, 11, 0.6); }
    50% { transform: scale(1.15); box-shadow: 0 0 20px rgba(245, 158, 11, 0.9); }
    100% { transform: scale(1); box-shadow: 0 0 10px rgba(245, 158, 11, 0.6); }
}

.help-highlight {
    position: relative;
    outline: 1.5px solid rgba(245, 158, 11, 0.5) !important;
    outline-offset: 2px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.confirm-title {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    font-weight: 900;
    color: #f87171;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.confirm-msg {
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.confirm-actions {
    display: flex;
    gap: 15px;
}



/* --- 3. Generische Modals & Changelog (Nova v3.8) --- */
.modal-content {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
    position: relative;
    animation: slideUp 0.4s ease;
}

.changelog-text {
    font-family: inherit;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 15px;
}

.changelog-text h1 {
    color: var(--color-gold);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(245, 158, 11, 0.2);
    padding-bottom: 0.5rem;
}

.changelog-text h2 {
    color: #3b82f6;
    font-size: 1.2rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.changelog-text h2::before {
    content: '';
    width: 4px;
    height: 1.2rem;
    background: #3b82f6;
    border-radius: 2px;
}

.changelog-text ul {
    list-style: none;
    padding-left: 0.5rem;
}

.changelog-text li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.changelog-text li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-gold);
}

.changelog-text hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 2rem 0;
}

.changelog-text::-webkit-scrollbar { width: 6px; }
.changelog-text::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

/* --- 4. Kaiserlicher Footer (Nova v3.8 High-End) --- */
.imperial-footer {
    margin-top: 2rem;
    padding: 2rem 1rem 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    background: linear-gradient(to bottom, transparent, rgba(15, 23, 42, 0.4));
    position: relative;
    z-index: 10;
}

@media (max-width: 768px) {
    .imperial-footer {
        margin-top: 1rem;
        padding: 1.5rem 10px 2rem;
    }
}

.footer-branding {
    margin-bottom: 1.2rem;
}

.version-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Cinzel', serif;
    transition: var(--transition);
    flex-wrap: wrap; /* MENSCH: Erlaubt sauberes Brechen auf sehr schmalen Geräten */
}

.brand-text {
    color: var(--color-gold);
    font-weight: 900;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
    white-space: nowrap;
}

@media (max-width: 480px) {
    .brand-text {
        font-size: 0.95rem !important;
        letter-spacing: 0.5px !important;
    }
    .version-tag {
        font-size: 0.85rem !important;
    }
}

.version-tag {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1rem;
    opacity: 0.8;
}

.env-badge-earlyaccess {
    background: var(--color-gold);
    color: #000;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.env-badge-local {
    background: #22c55e; /* MENSCH: Sattes Grün für die lokale Entwicklung */
    color: #fff;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

/* Link Grid (2 Zeilen wie Online-Version) */
.footer-links-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.link-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-links-grid a {
    color: var(--color-gold);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    opacity: 0.9;
}

.footer-links-grid a:hover {
    opacity: 1;
    text-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
    transform: translateY(-1px);
}

.link-sep {
    color: rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    pointer-events: none;
}

.footer-icon {
    font-size: 1rem !important;
    vertical-align: middle;
}

.danger-link {
    color: #f87171 !important;
}

.danger-link:hover {
    text-shadow: 0 0 12px rgba(248, 113, 113, 0.6) !important;
}

/* Meta-Bereich */
.footer-meta {
    margin-top: 3rem;
    opacity: 0.5;
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.update-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-icon {
    font-size: 0.9rem !important;
}

.footer-icons {
    display: flex;
    gap: 15px;
    color: var(--text-secondary);
}

.footer-icons span {
    font-size: 1.2rem !important;
}

/* Responsive Fixes */
@media (max-width: 600px) {
    .link-row { gap: 10px; }
    .footer-links-grid a { font-size: 0.85rem; }
    .brand-text { font-size: 1rem; }
}

/* Animationen */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- 5. Kaiserliches Hilfe-System (v2.3.5) --- */
.floating-help-btn {
    position: fixed;
    bottom: 85px; 
    right: 20px;
    width: 42px;
    height: 42px;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(5px);
    color: var(--color-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 4000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.floating-help-btn:hover {
    transform: scale(1.1);
    background: var(--color-gold);
    color: var(--bg-color);
}

.info-spot {
    position: absolute;
    top: 8px; right: 8px;
    width: 28px; height: 28px;
    background: #000;
    color: var(--color-gold);
    border: 2px solid var(--color-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    box-shadow: 0 4px 15px rgba(0,0,0,0.8), 0 0 10px rgba(245, 158, 11, 0.4);
    cursor: pointer;
    z-index: 5000;
}

/* --- 6. Sticky Status & Imperial Boost (v4.1.2) --- */
.sticky-status-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    height: 60px;
    z-index: 9999;
}

.boost-progress-bg {
    width: 100%; height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
}

.boost-progress-bar {
    height: 100%; width: 100%;
    background: linear-gradient(to right, #f59e0b, #fbbf24);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
    transition: width 1s linear;
}

.boost-timer-text {
    font-size: 0.8rem;
    color: var(--color-gold);
    font-weight: 800;
    text-align: center;
    margin-top: 4px;
    letter-spacing: 1px;
}
