* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #121212;
    color: #aaaaaa;
    transition: background-color 5s ease, filter 3s ease;
    overflow-x: hidden;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    transition: transform 0.5s ease;
}

.hidden {
    display: none !important;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #bbbbbb;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    transition: opacity 2s ease, transform 2s ease;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #aaaaaa;
    transition: opacity 1s ease;
}

p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: #888888;
    transition: opacity 1s ease, filter 2s ease;
}

.warning {
    color: #e07a5f;
    font-size: 0.9rem;
    border: 1px solid #e07a5f;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

button {
    background-color: #333333;
    color: #cccccc;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease, opacity 5s ease;
    margin: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

button:hover {
    background-color: #444444;
    transform: translateY(-2px);
}

button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

button.difficult {
    opacity: 0.7;
    cursor: not-allowed;
}

button.morphing {
    animation: morphText 8s infinite;
}

@keyframes morphText {
    0%, 100% {
        content: 'Chercher de l\'aide';
    }
    25% {
        content: 'zèbre';
    }
    50% {
        content: 'départ';
    }
    75% {
        content: '???????';
    }
}

#energy-bar-container {
    width: 80%;
    height: 25px;
    background-color: #333333;
    border-radius: 5px;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
}

#energy-bar {
    height: 100%;
    width: 100%;
    background-color: #4a5d6e;
    border-radius: 5px;
    transition: width 0.5s ease-in-out, background-color 1s ease;
    position: relative;
}

#energy-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmering 2s infinite;
}

@keyframes shimmering {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

#energy-bar-container span {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #dddddd;
    font-size: 0.9rem;
    z-index: 1;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

#game-screen {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity 1s ease;
}

#day-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.9rem;
    color: #777777;
    padding: 5px 10px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
}

#inner-voice-container {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
}

#voice-indicator {
    width: 10px;
    height: 10px;
    background-color: #aaa;
    border-radius: 50%;
    margin-right: 10px;
    transition: background-color 0.3s, transform 0.3s;
}

#voice-indicator.active {
    background-color: #ffcc00;
    animation: pulseIndicator 1.5s infinite;
}

@keyframes pulseIndicator {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

#inner-voice {
    flex-grow: 1;
    font-style: italic;
    color: #ccc;
    font-size: 0.95em;
}

.voice-positive { color: #a5d6a7; }
.voice-negative { color: #ef9a9a; }

#thought-cloud {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 15px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.9em;
    z-index: 100;
    text-align: center;
    min-width: 150px;
    max-width: 80%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    transition: opacity 0.5s;
}

.thought.positive { border-left: 5px solid #4CAF50; }
.thought.negative { border-left: 5px solid #f44336; }
.thought.intrusive { border-left: 5px solid #9c27b0; color: #f8bbd0; font-weight: bold;}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, -10px); }
    15% { opacity: 1; transform: translate(-50%, 0); }
    85% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, 10px); }
}

#intrusive-thought {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(50, 0, 0, 0.85);
    color: #ff8a80;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 1.8em;
    font-weight: bold;
    z-index: 1000;
    padding: 20px;
    text-shadow: 1px 1px 3px #000;
    animation: pulseText 2s infinite ease-in-out;
}

@keyframes pulseText {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

#disconnection-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 50, 0.7);
    color: #aed5fc;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 1.6em;
    z-index: 900;
    backdrop-filter: blur(3px);
    transition: opacity 0.5s;
}

.container.positive-effect {
    animation: positiveGlow 2s ease-in-out;
}

@keyframes positiveGlow {
    0% { box-shadow: 0 0 0px rgba(255, 255, 150, 0); }
    50% { box-shadow: 0 0 15px rgba(255, 255, 150, 0.5); }
    100% { box-shadow: 0 0 0px rgba(255, 255, 150, 0); }
}

.journal-content, .help-content, .family-content {
    padding: 15px;
    height: calc(100% - 40px);
    overflow-y: auto;
}

.journal-prompt textarea {
    width: 100%;
    height: 80px;
    margin: 10px 0;
    padding: 8px;
    border: 1px solid #555;
    background-color: #333;
    color: #eee;
    border-radius: 4px;
    resize: vertical;
}

.journal-history h3 {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 0.9em;
    color: #bbb;
}

#journal-entries-list {
    max-height: 150px;
    overflow-y: auto;
}

.journal-entry-item {
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-size: 0.85em;
}

.journal-entry-header {
    font-weight: bold;
    color: #aaa;
    margin-bottom: 4px;
    font-size: 0.9em;
}

.help-options, .family-options {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.help-option, .family-option {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #444;
    border: none;
    border-radius: 5px;
    color: #eee;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.3s;
}

.help-option:hover, .family-option:hover {
    background-color: #555;
}

.help-icon, .family-icon {
    font-size: 1.5em;
    margin-right: 10px;
}

.emergency-help {
    margin-top: 20px;
    padding: 10px;
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #f44336;
    border-radius: 5px;
    text-align: center;
    font-size: 0.9em;
}

#social-interactions {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#messages-notification, #social-invite, #family-concern {
    background-color: rgba(50, 50, 100, 0.9);
    color: white;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    font-size: 0.9em;
    min-width: 200px;
}

#messages-notification button, #social-invite button, #family-concern button {
    margin-left: 10px;
    padding: 4px 8px;
    font-size: 0.85em;
    cursor: pointer;
}

#isolation-indicator {
    width: 80%;
    height: 15px;
    background-color: #333333;
    border-radius: 5px;
    margin: 10px auto;
    position: relative;
    overflow: hidden;
}

#isolation-meter {
    height: 100%;
    width: 0%;
    background-color: #8B4513;
    border-radius: 5px;
    transition: width 1s ease;
}

#isolation-indicator span {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #dddddd;
    font-size: 0.7rem;
    z-index: 1;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    border-left: 4px solid #666;
    transition: background 0.3s, border-color 0.3s;
}

.task-item span:first-child {
    flex-grow: 1;
    margin-right: 10px;
}

.task-item.completed {
    border-left-color: #4CAF50;
    opacity: 0.7;
}

.task-item.completed span:first-child {
    text-decoration: line-through;
    color: #aaa;
}

.complete-task-btn {
    padding: 5px 10px;
    background-color: #555;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s;
}

.complete-task-btn:hover:not(:disabled) {
    background-color: #777;
}

.complete-task-btn:disabled {
    background-color: #333;
    color: #666;
    cursor: not-allowed;
}

#tasks-container {
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#tasks-container h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #eee;
    text-align: center;
    font-size: 1.1em;
}

#tasks-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
}

.task-item:hover {
    background-color: #2a2a2a;
}

.task-item:hover::after {
    background-color: #4a4a4a;
}

.task-item.failed::after {
    background-color: #684848;
}

.task-item button {
    padding: 5px 10px;
    font-size: 0.8rem;
}

.blur-text {
    filter: blur(3px);
    transition: filter 0.3s ease;
}

.distorted-text {
    font-family: monospace;
    letter-spacing: -1px;
    text-transform: uppercase;
    display: inline-block;
    transform: skew(-5deg);
}

.severe-distorted {
    animation: textGlitch 0.3s infinite;
}

@keyframes textGlitch {
    0%, 100% {
        opacity: 1;
        transform: skew(-5deg);
    }
    25% {
        opacity: 0.8;
        transform: skew(5deg);
    }
    50% {
        opacity: 0.9;
        transform: skew(-10deg);
    }
    75% {
        opacity: 0.7;
        transform: skew(10deg);
    }
}

.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

.brutal-shake {
    animation: brutalShake 0.3s infinite;
}

@keyframes brutalShake {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-7px, 5px) rotate(-5deg); }
    50% { transform: translate(7px, -5px) rotate(5deg); }
    75% { transform: translate(-7px, -5px) rotate(-5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

.dim-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    pointer-events: none;
    z-index: 100;
    transition: opacity 2s ease;
}

.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFEmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDAgNzkuMTYwNDUxLCAyMDE3LzA1LzA2LTAxOjA4OjIxICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoTWFjaW50b3NoKSIgeG1wOkNyZWF0ZURhdGU9IjIwMTktMDEtMzFUMTg6NTU6MDgrMDE6MDAiIHhtcDpNb2RpZnlEYXRlPSIyMDE5LTAxLTMxVDE4OjU4OjQxKzAxOjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDE5LTAxLTMxVDE4OjU4OjQxKzAxOjAwIiBkYzpmb3JtYXQ9ImltYWdlL3BuZyIgcGhvdG9zaG9wOkNvbG9yTW9kZT0iMyIgcGhvdG9zaG9wOklDQ1Byb2ZpbGU9InNSR0IgSUVDNjE5NjYtMi4xIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOmI2MWVjMDRlLWYyNGItNDliZC1hZDY3LTQ4MmM0ZGU2ZTBlMiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpiNjFlYzA0ZS1mMjRiLTQ5YmQtYWQ2Ny00ODJjNGRlNmUwZTIiIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpiNjFlYzA0ZS1mMjRiLTQ5YmQtYWQ2Ny00ODJjNGRlNmUwZTIiPiA8eG1wTU06SGlzdG9yeT4gPHJkZjpTZXE+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJjcmVhdGVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOmI2MWVjMDRlLWYyNGItNDliZC1hZDY3LTQ4MmM0ZGU2ZTBlMiIgc3RFdnQ6d2hlbj0iMjAxOS0wMS0zMVQxODo1NTowOCswMTowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTggKE1hY2ludG9zaCkiLz4gPC9yZGY6U2VxPiA8L3htcE1NOkhpc3Rvcnk+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Ufjs1QAAAi5JREFUaN7tmLFLHEEQh7+TQIpACiEiSHBpgiDYXOMLKFha5C9IMSGVf4udSJpACiGQJoQUKUKKFIYUKVJYSgiHjWXKtIaQWFgYYm7ni2uysrN7N+feXXEDw+3O7Mx+O/N2lrcGd6jh0B2rBSkUUACpMshY/Bj6oErW0MxAnVWrUwU5AJo5aftVgiggr6JPGWgrwIr4mwpwIjmKGZkDPoqcuGRc5FY+c88NTeuygGYJWJfPmTgDPku+t/J/JjHKBeAYuDJ+h2jmHbxasWPRzlUcQ96TBDDzGlfAD2DZyLsIzCYRRBPfPcZjMgn96SmfFUPd1CzXMRnmWj5dU9s05L7l0uQJstPQKe/qimV3Z2mZVlsB+l4HcA3oK1/PnLMkHMtxSJCOpXhD+ZaUSi7BlsU/SRKQDUvRFaU4UO/KKDvAkQQcebbGSQjvP0j0Cc0X4IvkBTQPgT4wMOROo/yYdY2ZxuNM+NwamVa7Cr4pGedxcpQ62FiSPSjKSXxSdJmtNJSxDsxb9x1o7lvl9A/8nV8tyCzwQqm/iXO1hkHyPIVeUz+W3zXnLiKDKHfjZM68W64V8ydgM1Lwy4I8UzLc/SaPzFdKpbzLbkgdh7atVpPbjlYvHLUkdiuSGxNEsz1hV+JeTC/KJy24Kmjp/ZPYnvCiBakVpAACtwPxm1V1Q6tVZjdDL6+VkCxf3l5I/hspqzJu9dlq8R/KL+0T8RcpiAJyAAAAAElFTkSuQmCC');
    opacity: 0.03;
    pointer-events: none;
    z-index: 200;
}

.intense-noise {
    opacity: 0.15;
    animation: noiseIntensity 3s infinite;
}

@keyframes noiseIntensity {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.25; }
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 40%, rgba(0, 0, 0, 0.4) 150%);
    pointer-events: none;
    z-index: 150;
    opacity: 0;
    transition: opacity 3s ease;
}

.blood-vignette {
    background: radial-gradient(circle, transparent 40%, rgba(139, 0, 0, 0.3) 150%);
}

.red-tint {
    background: radial-gradient(circle, rgba(255, 0, 0, 0.05) 30%, rgba(255, 0, 0, 0.2) 70%, rgba(139, 0, 0, 0.4) 150%);
}

.red-tint.blood-vignette {
    background: radial-gradient(circle, rgba(255, 0, 0, 0.1) 30%, rgba(255, 0, 0, 0.3) 70%, rgba(139, 0, 0, 0.5) 150%);
}

#help-btn-container {
    position: relative;
    width: 200px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px;
}

#seek-help-btn {
    position: absolute;
    transform-origin: center;
    transition: all 0.15s ease-out;
}

#seek-help-btn.move-away:hover {
    transform: translateX(calc(var(--mouse-x) * -1)) translateY(calc(var(--mouse-y) * -1));
}

#messages-screen {
    color: #aaa;
}

#messages-list {
    width: 80%;
    max-width: 500px;
    max-height: 70vh;
    overflow-y: auto;
    margin: 20px 0;
}

.message {
    background-color: #222;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    text-align: left;
    transition: transform 0.3s ease;
}

.message:hover {
    transform: translateY(-2px);
}

.message-sender {
    font-weight: bold;
    color: #bbb;
    margin-bottom: 5px;
}

.message-content {
    margin-bottom: 10px;
}

.message-actions {
    display: flex;
    justify-content: flex-end;
}

.reply-btn {
    padding: 5px 10px;
    font-size: 0.8rem;
    background-color: #333;
}

#family-screen {
    color: #aaa;
    text-align: center;
}

#family-content {
    width: 80%;
    max-width: 500px;
    margin: 20px 0;
}

#family-photo {
    width: 200px;
    height: 150px;
    background-color: #333;
    margin: 20px auto;
    position: relative;
    border-radius: 5px;
    overflow: hidden;
}

.photo-blur {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(5px);
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.photo-caption {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

#family-response {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

#reflection-prompt {
    color: #aaa;
    text-align: center;
}

#reflection-question {
    font-size: 1.2rem;
    margin: 20px 0;
    font-style: italic;
}

#reflection-answer {
    width: 80%;
    max-width: 500px;
    height: 150px;
    background-color: #222;
    border: 1px solid #444;
    color: #aaa;
    padding: 10px;
    font-size: 1rem;
    resize: none;
    margin-bottom: 20px;
    border-radius: 5px;
}

#dark-thoughts {
    color: #e07a5f;
    text-align: center;
}

#dark-thoughts-content {
    width: 80%;
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    background-color: rgba(139, 0, 0, 0.1);
    border-radius: 10px;
}

#dark-thought-text {
    font-size: 1.3rem;
    line-height: 1.6;
    font-weight: bold;
    margin-bottom: 30px;
}

#resist-thought-btn {
    background-color: #2f4f4f;
    margin-right: 15px;
}

#surrender-thought-btn {
    background-color: #8B0000;
}

#journey-summary {
    background-color: #1a1a1a;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    width: 80%;
    max-width: 400px;
}

#journey-summary h3 {
    color: #bbb;
    margin-bottom: 10px;
}

.heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.05); }
    50% { transform: scale(1); }
    75% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.text-flicker {
    animation: textFlicker 0.2s infinite;
}

@keyframes textFlicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.violent-text {
    color: #991111;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.3);
}

.crossed-text {
    text-decoration: line-through;
    opacity: 0.5;
}

.help-vanish {
    animation: helpVanish 0.5s forwards;
}

@keyframes helpVanish {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.9) rotate(5deg); }
    100% { opacity: 0; transform: scale(0) rotate(15deg); }
}

.option-transform {
    animation: optionTransform 10s forwards;
}

@keyframes optionTransform {
    0% { content: "Chercher de l'aide"; }
    25% { content: "zèbre"; }
    50% { content: "départ"; }
    75% { content: "??????"; }
    100% { content: "inutile"; }
}

/* Styles pour l'horloge */
#game-clock {
    font-family: 'Courier New', monospace;
    border: 1px solid rgba(60, 60, 70, 0.5);
    transition: all 1s ease;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.8);
}

#clock-time {
    letter-spacing: 1px;
}

#clock-date {
    opacity: 0.8;
}

#day-progress {
    position: relative;
}

#day-progress-bar {
    position: relative;
    box-shadow: 0 0 5px rgba(50, 80, 120, 0.3);
}

/* Animation pour la transition jour/nuit */
@keyframes night-fade {
    0% { background-color: rgba(0, 0, 0, 0); }
    40% { background-color: rgba(0, 0, 0, 0.95); }
    85% { background-color: rgba(0, 0, 0, 0.95); }
    100% { background-color: rgba(0, 0, 0, 0); }
}

#night-transition {
    animation: night-fade 8s ease-in-out;
    z-index: 9999;
    pointer-events: none;
}

/* Améliorations visuelles pour les pensées sombres */
.dark-thought-text {
    font-weight: 300;
    line-height: 1.5;
    letter-spacing: 0.5px;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
}

/* Style plus intense pour les pensées intrusives */
.intrusive-text {
    font-weight: 400;
    letter-spacing: 0.3px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

/* Animation plus subtile pour le nuage de pensées */
.thought-cloud-container {
    position: relative;
}

@keyframes thought-appear {
    0% { opacity: 0; transform: translateY(-5px); }
    100% { opacity: 1; transform: translateY(0); }
}

#thought-cloud {
    animation: thought-appear 0.8s ease-in-out;
}

/* Style pour les tâches non accomplies à la fin de la journée */
.task-item.auto-failed {
    opacity: 0.3;
    text-decoration: line-through;
    text-decoration-color: #444;
    transition: all 0.5s ease;
}

/* Amélioration des animations de vacillement de vision */
@keyframes vision-vacillation {
    0% { opacity: 0.5; filter: blur(1px); }
    50% { opacity: 0.7; filter: blur(2px); }
    100% { opacity: 0.5; filter: blur(1px); }
}

/* Effet de transition pour les jours */
.day-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    pointer-events: none;
}

.day-transition.active {
    opacity: 1;
}

.day-message {
    color: #ddd;
    font-size: 32px;
    text-align: center;
    max-width: 80%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 1.5s ease-in-out;
    transform: translateY(20px);
}

.day-transition.active .day-message {
    opacity: 1;
    transform: translateY(0);
}

/* Amélioration pour les boutons difficiles */
.difficult {
    position: relative;
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                opacity 0.2s ease,
                background-color 0.3s ease;
}

.difficult:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    box-shadow: 0 0 0 1px rgba(150, 50, 50, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease, box-shadow 0.3s ease;
    pointer-events: none;
}

.difficult:hover:before {
    opacity: 1;
    box-shadow: 0 0 0 2px rgba(150, 70, 70, 0.3);
}

/* Style pour le bouton départ quand il devient disponible */
.depart-btn {
    position: relative;
    overflow: hidden;
}

.depart-btn:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(130, 60, 60, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 1s ease;
}

.depart-btn:hover:after {
    opacity: 1;
}

/* Effet de désespoir pour les textes à isolement élevé */
@keyframes text-despair {
    0% { letter-spacing: normal; opacity: 1; }
    50% { letter-spacing: 0.5px; opacity: 0.8; }
    100% { letter-spacing: normal; opacity: 1; }
}

.despair-text {
    animation: text-despair 8s infinite;
    font-weight: 300;
}

/* Styles pour les nouvelles barres (sommeil et santé mentale) */
.bar-container {
    width: 80%;
    margin: 10px auto;
    position: relative;
}

.bar-label {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 3px;
    text-align: left;
}

.bar-wrapper {
    height: 15px;
    background-color: #333333;
    border-radius: 5px;
    overflow: hidden;
}

.bar {
    height: 100%;
    width: 100%;
    border-radius: 5px;
    transition: width 0.5s ease-in-out, background-color 1s ease;
}

#sleep-bar {
    background-color: #4a6e5d;
}

#mental-health-bar {
    background-color: #5d6e4a;
}

/* Style pour le bouton dormir */
#sleep-btn {
    background-color: #2a3a4a;
    transition: all 0.3s ease;
}

#sleep-btn:hover {
    background-color: #3a4a5a;
}

#sleep-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Effet de transition pour le sommeil */
#sleep-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 3s ease;
}

/* Effet d'oscillation de l'écran */
@keyframes screen-wobble {
    0% { 
        transform: translate(0, 0) scale(1.01);
        filter: blur(1px);
    }
    25% { 
        transform: translate(4px, 2px) scale(1.015);
        filter: blur(1.5px);
    }
    50% { 
        transform: translate(0, -3px) scale(1.02);
        filter: blur(1.2px);
    }
    75% { 
        transform: translate(-4px, 2px) scale(1.015);
        filter: blur(1.7px);
    }
    100% { 
        transform: translate(0, 0) scale(1.01);
        filter: blur(1px);
    }
}

#wobble-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9997;
    animation: screen-wobble 6s infinite ease-in-out;
    background-color: rgba(0, 0, 0, 0.05);
}

/* Styles pour les effets lorsque la santé mentale est basse */
.audio-distortion {
    filter: distort(5%);
}

.severe-mental-state {
    animation: mentalPulse 8s infinite ease-in-out;
}

@keyframes mentalPulse {
    0%, 100% {
        text-shadow: 0 0 2px rgba(255, 0, 0, 0.1);
    }
    50% {
        text-shadow: 0 0 5px rgba(255, 0, 0, 0.3);
    }
}

/* Style pour les insomnia messages */
.insomnia-text {
    color: #6e4a6e;
    font-style: italic;
    opacity: 0.9;
    animation: insomniaFlicker 5s infinite;
}

@keyframes insomniaFlicker {
    0%, 100% {
        opacity: 0.9;
    }
    50% {
        opacity: 0.7;
    }
}

/* Style pour les messages quand la santé mentale est basse */
.mental-health-warning {
    color: #8a4a4a;
    font-weight: 300;
    letter-spacing: 0.5px;
    text-shadow: 0 0 3px rgba(100, 0, 0, 0.2);
}

/* Styles pour l'intensité de la vacillation de l'écran basée sur la santé mentale */
.slight-wobble {
    animation: screen-wobble 7s infinite ease-in-out;
}

.moderate-wobble {
    animation: screen-wobble 5s infinite ease-in-out;
}

.severe-wobble {
    animation: screen-wobble 4s infinite ease-in-out;
}

/* Effet de désespoir visuel pour une faible santé mentale */
@keyframes despair-shadow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 0 15px rgba(100, 0, 0, 0.2);
    }
}

.mental-decline {
    animation: despair-shadow 6s infinite ease-in-out;
}

/* Amélioration des styles pour le conteneur de jeu principal lorsque la santé mentale est basse */
.poor-mental-health {
    transition: filter 2s ease, transform 2s ease;
    filter: saturate(80%) contrast(105%);
}

.very-poor-mental-health {
    transition: filter 2s ease, transform 2s ease;
    filter: saturate(70%) contrast(110%) hue-rotate(-5deg);
}

.critical-mental-health {
    transition: filter 2s ease, transform 2s ease;
    filter: saturate(60%) contrast(115%) hue-rotate(-10deg);
}

/* Conteneur pour les barres latérales */
#side-bars-container {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 200px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Modifications pour placer les barres à gauche */
#side-bars-container .bar-container,
#side-bars-container #energy-bar-container,
#side-bars-container #isolation-indicator {
    width: 100%;
    margin: 5px 0;
}

#side-bars-container .bar-label {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

#side-bars-container #energy-bar-container span,
#side-bars-container #isolation-indicator span {
    font-size: 0.8rem;
}

/* Style pour le fond des barres latérales */
#side-bars-container::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    z-index: -1;
}

/* Animation pour indiquer le changement de tâches */
@keyframes task-change-flash {
    0% { background-color: rgba(60, 60, 80, 0.4); }
    50% { background-color: rgba(80, 80, 100, 0.6); }
    100% { background-color: rgba(60, 60, 80, 0.4); }
}

.task-change-flash {
    animation: task-change-flash 2s ease-in-out;
}

/* Styles pour l'interface du téléphone */
#phone-container {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 300;
    width: 280px;
    height: 500px;
    perspective: 1000px;
}

#phone-frame {
    width: 100%;
    height: 100%;
    background-color: #222;
    border-radius: 30px;
    border: 8px solid #333;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-style: preserve-3d;
    transform: rotateY(5deg);
    transition: transform 0.5s ease;
}

#phone-frame:hover {
    transform: rotateY(0deg);
}

#phone-header {
    height: 40px;
    background-color: #111;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    color: #aaa;
    font-size: 0.8rem;
    border-bottom: 1px solid #333;
}

#phone-screen {
    flex: 1;
    background-color: #1a1a1a;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Écran des conversations */
#phone-conversations-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.phone-app-title {
    font-size: 1.2rem;
    color: #ddd;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #333;
    text-align: center;
}

#phone-conversations-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.conversation-item {
    display: flex;
    padding: 10px;
    border-radius: 8px;
    background-color: #2a2a2a;
    cursor: pointer;
    transition: background-color 0.2s;
}

.conversation-item:hover {
    background-color: #333;
}

.conversation-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #444;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px;
    font-size: 1.2rem;
}

.conversation-details {
    flex: 1;
    overflow: hidden;
}

.conversation-name {
    font-size: 0.9rem;
    color: #eee;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-preview {
    font-size: 0.8rem;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-time {
    font-size: 0.7rem;
    color: #777;
    text-align: right;
    margin-left: 5px;
}

.unread-indicator {
    width: 8px;
    height: 8px;
    background-color: #e74c3c;
    border-radius: 50%;
    margin-top: 5px;
}

/* Écran des messages */
#phone-messages-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0;
    left: 0;
    background-color: #1a1a1a;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

#phone-messages-screen.active {
    transform: translateX(0);
}

.phone-conversation-header {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #222;
    border-bottom: 1px solid #333;
}

#back-to-conversations-btn {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    margin: 0;
    transition: color 0.2s;
}

#back-to-conversations-btn:hover {
    color: #ddd;
}

#conversation-contact-name {
    flex: 1;
    font-size: 1rem;
    color: #ddd;
    text-align: center;
}

#phone-messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.phone-message {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 15px;
    margin-bottom: 5px;
    word-wrap: break-word;
    position: relative;
}

.phone-message.incoming {
    align-self: flex-start;
    background-color: #2a2a2a;
    color: #ddd;
    border-bottom-left-radius: 5px;
}

.phone-message.outgoing {
    align-self: flex-end;
    background-color: #3a3a3a;
    color: #eee;
    border-bottom-right-radius: 5px;
}

.phone-message-sender {
    font-size: 0.7rem;
    color: #999;
    margin-bottom: 3px;
}

.phone-message-text {
    font-size: 0.9rem;
}

.phone-message-time {
    font-size: 0.65rem;
    color: #888;
    text-align: right;
    margin-top: 3px;
}

#phone-input-area {
    display: flex;
    gap: 5px;
    padding: 5px;
    background-color: #1f1f1f;
    border-radius: 20px;
    margin: 10px;
}

#phone-message-input {
    flex: 1;
    padding: 8px 12px;
    background-color: #2a2a2a;
    border: none;
    border-radius: 15px;
    color: #eee;
    font-size: 0.9rem;
}

#phone-message-input:focus {
    outline: none;
    background-color: #333;
}

#phone-send-btn {
    background-color: #444;
    color: #ddd;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

#phone-send-btn:hover {
    background-color: #555;
}

#phone-notification {
    position: absolute;
    top: 5px;
    right: -5px;
    background-color: #2a2a2a;
    border-radius: 20px;
    padding: 5px 10px 5px 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    animation: notification-pulse 2s infinite;
    z-index: 400;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.notification-dot {
    width: 8px;
    height: 8px;
    background-color: #e74c3c;
    border-radius: 50%;
}

.notification-text {
    font-size: 0.75rem;
    color: #eee;
}

@keyframes notification-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Effet de frappe sur le téléphone */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background-color: #2a2a2a;
    border-radius: 15px;
    max-width: 60px;
    align-self: flex-start;
    margin-bottom: 5px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: #999;
    border-radius: 50%;
    animation: typing-animation 1.5s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-animation {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-5px); opacity: 1; }
}

/* Media queries pour le téléphone sur petits écrans */
@media (max-height: 700px) {
    #phone-container {
        height: 400px;
    }
}

@media (max-width: 900px) {
    #phone-container {
        display: none; /* Cacher sur mobile */
    }
}

/* Styles pour l'écran d'accueil du téléphone */
#phone-home-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 15px;
    background-color: #1a1a1a;
    background-image: linear-gradient(to bottom, #2a2a2a, #121212);
}

.phone-app-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 20px 0;
}

.phone-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.phone-app:hover {
    transform: scale(1.05);
}

.app-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background-color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    margin-bottom: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.app-name {
    font-size: 12px;
    color: #ddd;
    text-align: center;
}

/* Styles pour l'écran du journal */
#phone-journal-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #1a1a1a;
}

.phone-screen-header {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #222;
    border-bottom: 1px solid #333;
}

.back-btn {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    margin: 0;
    transition: color 0.2s;
}

.back-btn:hover {
    color: #ddd;
}

.journal-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.journal-prompt {
    background-color: #2a2a2a;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.journal-prompt p {
    color: #eee;
    margin-bottom: 10px;
    font-size: 14px;
}

#journal-entry {
    width: 100%;
    min-height: 100px;
    background-color: #333;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 10px;
    color: #eee;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 10px;
}

#submit-reflection-btn {
    background-color: #3a3a3a;
    color: #eee;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#submit-reflection-btn:hover {
    background-color: #444;
}

.journal-history {
    background-color: #2a2a2a;
    border-radius: 10px;
    padding: 15px;
}

.journal-history h3 {
    color: #ddd;
    font-size: 16px;
    margin-bottom: 10px;
    border-bottom: 1px solid #444;
    padding-bottom: 8px;
}

.journal-entry-item {
    background-color: #333;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
}

.journal-entry-date {
    color: #999;
    font-size: 12px;
    margin-bottom: 5px;
}

.journal-entry-text {
    color: #eee;
    font-size: 14px;
}

/* Styles pour l'écran d'aide professionnelle */
#phone-help-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #1a1a1a;
}

.help-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.help-intro p {
    color: #eee;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    margin-bottom: 10px;
}

.help-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.help-option {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #2a2a2a;
    border: none;
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.help-option:hover {
    background-color: #333;
}

.help-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    background-color: #444;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.help-text {
    color: #eee;
    font-size: 14px;
    text-align: left;
}

.emergency-help {
    margin-top: auto;
    padding: 12px;
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #f44336;
    border-radius: 8px;
    text-align: center;
}

.emergency-help p {
    color: #f8bbd0;
    font-size: 13px;
    margin-bottom: 0;
    line-height: 1.5;
}

.emergency-help strong {
    color: #ff8a80;
    font-size: 14px;
}

/* Styles pour l'écran famille */
#phone-family-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #1a1a1a;
}

.family-content {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.family-intro p {
    color: #eee;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    margin-bottom: 10px;
}

.family-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.family-option {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #2a2a2a;
    border: none;
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.family-option:hover {
    background-color: #333;
}

.family-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    background-color: #444;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.family-text {
    color: #eee;
    font-size: 14px;
    text-align: left;
}

/* Style pour les messages du jeu */
#game-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    z-index: 1000;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    max-width: 80%;
}

#game-message.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Animation pour les écrans du téléphone */
.phone-app.pulse {
    animation: app-pulse 0.5s ease-in-out;
}

@keyframes app-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Animation d'entrée des messages */
.message-enter {
    animation: message-pop-in 0.3s ease-out;
    transform-origin: center bottom;
}

@keyframes message-pop-in {
    0% { 
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    70% {
        opacity: 1;
        transform: translateY(-5px) scale(1.03);
    }
    100% { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Animation du téléphone */
#phone-frame.pulse {
    animation: phone-pulse 0.5s ease-in-out 3;
}

@keyframes phone-pulse {
    0% { transform: rotateY(5deg) scale(1); }
    50% { transform: rotateY(5deg) scale(1.03); }
    100% { transform: rotateY(5deg) scale(1); }
}

.help-resources {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
    flex-grow: 1;
}

.resource-item {
    background-color: #2a2a2a;
    border-radius: 8px;
    padding: 12px;
}

.resource-item h4 {
    color: #ccc;
    font-size: 14px;
    margin-bottom: 8px;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
}

.resource-item p {
    color: #bbb;
    font-size: 13px;
    margin-bottom: 5px;
    line-height: 1.4;
}

.resource-item strong {
    color: #ddd;
}

.resource-item a {
    color: #8ab4f8;
    text-decoration: none;
    transition: color 0.2s;
}

.resource-item a:hover {
    color: #a7c9fa;
    text-decoration: underline;
}

/* Styles pour les actions de désespoir */
#despair-actions {
    margin-top: 20px;
    display: flex; /* Sera affiché via JS */
    justify-content: center;
    gap: 15px;
    width: 100%;
}

.despair-btn {
    background-color: #400000; /* Rouge très sombre */
    color: #ff8a80; /* Rouge pâle */
    border: 1px solid #702020;
    font-weight: bold;
    animation: despairPulse 2s infinite ease-in-out;
    opacity: 0.9;
}

.despair-btn:hover {
    background-color: #5a0000;
    color: #ffabab;
    border-color: #903030;
    opacity: 1;
}

@keyframes despairPulse {
    0% { transform: scale(1); box-shadow: 0 0 5px rgba(200, 50, 50, 0.3); }
    50% { transform: scale(1.03); box-shadow: 0 0 10px rgba(200, 50, 50, 0.5); }
    100% { transform: scale(1); box-shadow: 0 0 5px rgba(200, 50, 50, 0.3); }
}

/* Classes pour les effets visuels de santé mentale basse */

/* Appliquée au body ou .container */
.mental-state-low {
    animation: screen-shake-mild 0.8s infinite linear;
}

.mental-state-very-low {
    animation: screen-shake-moderate 0.5s infinite linear;
}

.mental-state-critical {
    animation: screen-shake-severe 0.3s infinite linear;
}

@keyframes screen-shake-mild {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-1px); }
    50% { transform: translateX(0); }
    75% { transform: translateX(1px); }
}

@keyframes screen-shake-moderate {
    0%, 100% { transform: translateX(0) rotate(0); }
    25% { transform: translateX(-2px) rotate(-0.2deg); }
    50% { transform: translateX(2px) rotate(0.2deg); }
    75% { transform: translateX(-2px) rotate(-0.2deg); }
}

@keyframes screen-shake-severe {
    0%, 100% { transform: translate(0, 0) rotate(0); }
    25% { transform: translate(-4px, 1px) rotate(-0.5deg); }
    50% { transform: translate(3px, -2px) rotate(0.3deg); }
    75% { transform: translate(-2px, 3px) rotate(-0.4deg); }
}

/* Filtres de couleur et flou */
.tint-overlay,
.blur-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 950; /* Au-dessus de la plupart des éléments, sous les popups */
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.tint-overlay.active {
    opacity: 1;
}

.blur-overlay.active {
    opacity: 1;
}

/* Niveaux de teinte rouge */
.tint-overlay.low {
    background: radial-gradient(circle, transparent 50%, rgba(100, 0, 0, 0.1) 150%);
}
.tint-overlay.very-low {
    background: radial-gradient(circle, rgba(150, 0, 0, 0.05) 40%, rgba(150, 0, 0, 0.25) 150%);
}
.tint-overlay.critical {
    background: radial-gradient(circle, rgba(200, 0, 0, 0.1) 30%, rgba(200, 0, 0, 0.4) 150%);
}

/* Niveaux de flou */
.blur-overlay.low { backdrop-filter: blur(0.5px); }
.blur-overlay.very-low { backdrop-filter: blur(1px); }
.blur-overlay.critical { backdrop-filter: blur(2px); }

/* Style pour l'indicateur "écrit..." */
.typing-indicator .phone-message-text {
    display: flex;
    align-items: center;
    padding: 8px 12px; /* Ajuster le padding */
}

.typing-indicator .dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #aaa;
    border-radius: 50%;
    margin: 0 2px;
    animation: typingDots 1.4s infinite ease-in-out both;
}

.typing-indicator .dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator .dot:nth-child(2) {
    animation-delay: -0.16s;
}

.typing-indicator .dot:nth-child(3) {
    animation-delay: 0s;
}

@keyframes typingDots {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.0);
        opacity: 1;
    }
} 