@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: #007bff;
    --color-safe: #28a745;
    --color-danger: #dc3545;
    --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: 0;
    padding: 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: 1fr 1fr;
    gap: 30px;
}

.inbox-section h2, .files-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-item.virus-email {
    border-left-color: var(--color-danger); /* Para distinguirlo si quisiéramos */
}

.email-sender {
    font-weight: 600;
}

.email-subject {
    color: #495057;
}

.files-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.file-item {
    background-color: #f8f9fa;
    border: 1px solid var(--color-border);
    padding: 10px;
    border-radius: 5px;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.file-item span {
    margin-right: 8px;
    font-size: 1.2em;
}

.file-item.corrupted {
    background-color: #ffdddd;
    border-color: var(--color-danger);
    color: var(--color-danger);
    text-decoration: line-through;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.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: #0056b3;
}


.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;
}