@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

:root {
    --color-bg: #f0f4f8;
    --color-container: #ffffff;
    --color-text: #333;
    --color-primary: #4a69bd; /* Un azul más corporativo */
    --color-safe: #28a745;
    --color-danger: #dc3545;
    --color-warning: #ffc107;
    --color-border: #dee2e6;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 20px;
    box-sizing: border-box;
}

.game-container {
    background-color: var(--color-container);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 900px;
    padding: 30px;
    box-sizing: border-box;
}

header h1 {
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-icon { width: 40px; height: 40px; margin-right: 15px; }
.instructions { text-align: center; font-size: 0.9em; color: #666; margin-bottom: 30px; }

.main-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr; /* Más espacio para la bandeja de entrada */
    gap: 30px;
}

.inbox-section h2 {
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 1.2em;
    display: flex;
    align-items: center;
}
.section-icon { width: 24px; height: 24px; margin-right: 10px; }

.email-item {
    background-color: #f8f9fa;
    border: 1px solid var(--color-border);
    border-left: 5px solid var(--color-primary);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.email-item:hover { transform: translateY(-3px); box-shadow: 0 4px 10px rgba(0,0,0,0.08); }
.email-item.opened { background-color: #e9ecef; border-left-color: #6c757d; opacity: 0.7; }
.email-sender { font-weight: 600; }
.email-subject { color: #495057; }

.status-section { display: flex; flex-direction: column; gap: 20px; }
.status-box { background-color: #f8f9fa; padding: 20px; border-radius: 10px; border: 1px solid var(--color-border); }
.status-box h2 { font-size: 1.1em; margin-top: 0; margin-bottom: 10px; display: flex; align-items: center; }
.status-box h2 span { margin-right: 10px; }
.status-box p { font-size: 0.9em; margin: 0; }

#system-security.compromised { background-color: #fff2f2; border-color: var(--color-danger); }
#system-security.compromised #security-icon { animation: pulse-red 1.5s infinite; }

#network-diagram { display: none; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.network-node { background: #d4edda; padding: 5px 10px; border-radius: 5px; font-size: 0.8em; }
.network-node.your-pc { background: var(--color-warning); }
.attack-arrows { flex-grow: 1; text-align: center; font-size: 1.2em; color: var(--color-danger); }

#network-status.attacking #network-diagram { display: flex; }
#network-status.attacking .attack-arrows::before {
    content: '>> >> >>';
    animation: move-arrows 0.8s linear infinite;
    display: block;
}

.message-box { margin-top: 20px; padding: 15px; border-radius: 5px; text-align: center; font-weight: 600; transition: background-color 0.3s, color 0.3s; }
.message-box.safe { background-color: #d4edda; color: #155724; }
.message-box.danger { background-color: #f8d7da; color: #721c24; }

#reset-button { display: block; width: 200px; margin: 20px auto 0; padding: 12px; background-color: var(--color-primary); color: white; border: none; border-radius: 5px; font-size: 1em; font-weight: 600; cursor: pointer; transition: background-color 0.2s; }
#reset-button:hover { background-color: #3b528f; }

@keyframes pulse-red {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes move-arrows {
    from { transform: translateX(-10px); opacity: 0.3; }
    to { transform: translateX(10px); opacity: 1; }
}


.back-button {
    display: inline-block;
    padding: 10px 15px;
    margin-top: 10px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
}