/* Behörden-Simulator Pro (ChatSim 2.0 Pro) Styling */
:root {
    --chat-bg: #0f172a;
    --chat-bubble-sent: #3b82f6;
    --chat-bubble-received: #1e293b;
    --chat-text: #f8fafc;
    --accent-pro: #8b5cf6;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;
}

.sim-pro-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    margin: 40px auto;
    max-width: 1100px;
    padding: 0 15px;
    flex-wrap: wrap;
}

.sim-container-pro {
    flex: 1;
    min-width: 340px;
    max-width: 500px;
    height: 700px;
    background: var(--chat-bg);
    border-radius: 20px;
    border: 4px solid #334155;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
}

/* Analytical Dashboard Panel beside Chat */
.sim-dashboard-panel {
    flex: 1;
    min-width: 320px;
    max-width: 500px;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    color: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
}

.dashboard-header {
    border-bottom: 2px solid var(--accent-pro);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.dashboard-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-stat-box {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.stat-label {
    font-size: 0.8rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    display: block;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--accent-pro);
}

.tactic-badge {
    display: inline-block;
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    margin-right: 6px;
    margin-bottom: 6px;
}

/* Overlay Menu */
.sim-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.97);
    z-index: 20;
    padding: 25px;
    overflow-y: auto;
}

.sim-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
    padding-bottom: 50px;
}

.scenario-card {
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 14px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.scenario-card:hover {
    transform: translateY(-4px);
    background: #334155;
    border-color: var(--accent-pro);
}

.scenario-icon {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.scenario-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.scenario-sub {
    font-size: 0.65rem;
    color: #94a3b8;
}

/* Header */
.sim-header {
    background: #1e293b;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #334155;
    z-index: 5;
}

.header-user-info {
    display: flex;
    align-items: center;
}

.sim-avatar {
    width: 42px;
    height: 42px;
    background: #475569;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 1.4rem;
}

.partner-name {
    font-weight: bold;
    color: white;
    font-size: 1rem;
}

.partner-status {
    font-size: 0.75rem;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 4px;
}

.partner-status::before {
    content: "";
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
}

/* Chat Area */
.sim-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.bubble-received {
    align-self: flex-start;
    background: var(--chat-bubble-received);
    color: var(--chat-text);
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255,255,255,0.05);
}

.bubble-sent {
    align-self: flex-end;
    background: var(--chat-bubble-sent);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-time {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 4px;
    text-align: right;
}

/* System Alerts inside chat */
.system-alert {
    background: rgba(239, 68, 68, 0.15);
    border-left: 4px solid var(--danger);
    padding: 10px 15px;
    border-radius: 6px;
    color: #fca5a5;
    font-size: 0.85rem;
    margin: 10px 0;
    align-self: stretch;
}

.system-notice {
    background: rgba(139, 92, 246, 0.15);
    border-left: 4px solid var(--accent-pro);
    padding: 10px 15px;
    border-radius: 6px;
    color: #ddd6fe;
    font-size: 0.85rem;
    margin: 10px 0;
    align-self: stretch;
}

/* Choices Footer */
.sim-footer {
    background: #1e293b;
    padding: 15px;
    border-top: 1px solid #334155;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
}

.choice-btn {
    background: #334155;
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 12px 15px;
    border-radius: 10px;
    text-align: left;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    width: 100%;
}

.choice-btn:hover {
    background: #475569;
    transform: translateX(4px);
}

/* Dossier Screen at End */
.dossier-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f172a;
    z-index: 30;
    padding: 30px;
    overflow-y: auto;
    color: white;
    display: none;
}

.dossier-header {
    text-align: center;
    border-bottom: 2px solid var(--accent-pro);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.dossier-rank {
    font-size: 4rem;
    font-weight: 900;
    margin: 10px 0;
}

.rank-s { color: #10b981; text-shadow: 0 0 15px rgba(16, 185, 129, 0.4); }
.rank-a { color: #3b82f6; }
.rank-b { color: #06b6d4; }
.rank-c { color: #f59e0b; }
.rank-d { color: #f97316; }
.rank-e { color: #ec4899; }
.rank-f { color: #ef4444; text-shadow: 0 0 15px rgba(239, 68, 68, 0.4); }
