* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s, color 0.3s, transform 0.2s, opacity 0.3s;
}

body {
    background-color: #f0e6f6;
    background-image: linear-gradient(135deg, #f0e6f6 0%, #e0d0f0 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #333;
    padding: 1rem;
}

body.dark-mode {
    background-color: #292639;
    background-image: linear-gradient(135deg, #292639 0%, #1e1a2e 100%);
    color: #e0d0f0;
}

.game-container {
    display: flex;
    flex-direction: row;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    background-color: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
}

.dark-mode .game-container {
    background-color: #352f4a;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.character-container {
    width: 25%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fef6ff;
    padding: 1rem;
    overflow: hidden;
    border-right: 1px solid #e0d0f0;
    position: relative;
    transition: background-color 0.3s;
}

.dark-mode .character-container {
    background-color: #433b59;
    border-right: 1px solid #544873;
}

.character-frame {
    position: relative;
    width: 90%;
    height: 70%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(156, 111, 182, 0.2);
    background: linear-gradient(to bottom, rgba(255,255,255,0.1), rgba(156, 111, 182, 0.1));
}

.dark-mode .character-frame {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(to bottom, rgba(255,255,255,0.05), rgba(84, 72, 115, 0.2));
}

.states-container {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 10px;
}

.state-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: help;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.state-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.state-icon.positive {
    background: linear-gradient(135deg, rgba(120, 255, 120, 0.3), rgba(100, 220, 100, 0.5));
    border: 2px solid #4caf50;
}

.state-icon.negative {
    background: linear-gradient(135deg, rgba(255, 120, 120, 0.3), rgba(220, 100, 100, 0.5));
    border: 2px solid #f44336;
}

.dark-mode .state-icon.positive {
    background: linear-gradient(135deg, rgba(100, 220, 100, 0.2), rgba(76, 175, 80, 0.4));
    border: 2px solid #3d8c40;
}

.dark-mode .state-icon.negative {
    background: linear-gradient(135deg, rgba(220, 100, 100, 0.2), rgba(244, 67, 54, 0.4));
    border: 2px solid #d32f2f;
}

.apartment-container {
    width: 15%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #f8f0ff;
    padding: 20px;
    overflow: auto;
    border-right: 1px solid #e0d0f0;
    transition: background-color 0.3s;
}

.dark-mode .apartment-container {
    background-color: #3e3652;
    border-right: 1px solid #544873;
}

.apartment-title {
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
    color: #9c6fb6;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dark-mode .apartment-title {
    color: #b4a6c9;
}

.apartment-room {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dark-mode .apartment-room {
    background-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.apartment-room:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.dark-mode .apartment-room:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.room-label {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: #6c5980;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.room-label::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.livingroom-label::before { background-color: #c9a7e8; }
.bedroom-label::before { background-color: #a7bee8; }
.bathroom-label::before { background-color: #a7e8e3; }
.kitchen-label::before { background-color: #e8d3a7; }

.dark-mode .room-label {
    color: #b4a6c9;
}

.room-status {
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 5px;
    color: #6c5980;
    text-align: right;
}

.dark-mode .room-status {
    color: #b4a6c9;
}

.progress-bar {
    height: 12px;
    background-color: rgba(224, 208, 240, 0.5);
    border-radius: 10px;
    width: 100%;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dark-mode .progress-bar {
    background-color: rgba(84, 72, 115, 0.5);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    width: 100%;
    transition: width 0.5s ease;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.3));
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#health-bar { 
    background-color: #e77a7a; 
    background-image: linear-gradient(90deg, #e77a7a, #ff9e9e);
}
#hunger-bar { 
    background-color: #e7b77a; 
    background-image: linear-gradient(90deg, #e7b77a, #ffd294);
}
#hydration-bar { 
    background-color: #7a9ee7; 
    background-image: linear-gradient(90deg, #7a9ee7, #a0c0ff);
}
#hygiene-bar { 
    background-color: #7ae7e7; 
    background-image: linear-gradient(90deg, #7ae7e7, #a0ffff);
}
#happiness-bar { 
    background-color: #e77ad9; 
    background-image: linear-gradient(90deg, #e77ad9, #ffa0e0);
}
#stamina-bar { 
    background-color: #a9e77a; 
    background-image: linear-gradient(90deg, #a9e77a, #c0ffa0);
}

#money-value { 
    color: #4caf50; 
    font-weight: bold; 
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dark-mode #money-value { 
    color: #6adc6e; 
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.danger-bar { 
    animation: pulse 1.5s infinite;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

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

#livingroom-bar { 
    background-color: #c9a7e8; 
    background-image: linear-gradient(90deg, #c9a7e8, #e0c5ff);
}
#bedroom-bar { 
    background-color: #a7bee8; 
    background-image: linear-gradient(90deg, #a7bee8, #c5e0ff);
}
#bathroom-bar { 
    background-color: #a7e8e3; 
    background-image: linear-gradient(90deg, #a7e8e3, #c5fff0);
}
#kitchen-bar { 
    background-color: #e8d3a7; 
    background-image: linear-gradient(90deg, #e8d3a7, #ffe0c5);
}

.game-content {
    width: 60%;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.status-container {
    background-color: #f8f0ff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #e0d0f0;
    transition: background-color 0.3s;
}

.dark-mode .status-container {
    background-color: #3e3652;
    border-bottom: 1px solid #544873;
}

.vitals {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 70%;
}

.vital-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vital-label {
    width: 90px;
    font-size: 0.95rem;
    color: #6c5980;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.vital-label::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.health-label::before { background-color: #e77a7a; }
.hunger-label::before { background-color: #e7b77a; }
.hydration-label::before { background-color: #7a9ee7; }
.hygiene-label::before { background-color: #7ae7e7; }
.happiness-label::before { background-color: #e77ad9; }
.stamina-label::before { background-color: #a9e77a; }

.dark-mode .vital-label {
    color: #b4a6c9;
}

.time-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    font-weight: bold;
    color: #9c6fb6;
}

.dark-mode .time-container {
    color: #b4a6c9;
}

#day-display {
    font-size: 1.3rem;
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

#time-display {
    font-size: 1.1rem;
    padding: 5px 10px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.dark-mode #time-display {
    background-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.message-box {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #fff;
    border-bottom: 1px solid #e0d0f0;
    scrollbar-width: thin;
    scrollbar-color: #9c6fb6 #f0e6f6;
}

.message-box::-webkit-scrollbar {
    width: 8px;
}

.message-box::-webkit-scrollbar-track {
    background: #f0e6f6;
    border-radius: 10px;
}

.message-box::-webkit-scrollbar-thumb {
    background-color: #9c6fb6;
    border-radius: 10px;
    border: 2px solid #f0e6f6;
}

.dark-mode .message-box {
    background-color: #352f4a;
    border-bottom: 1px solid #544873;
    scrollbar-color: #7d5994 #352f4a;
}

.dark-mode .message-box::-webkit-scrollbar-track {
    background: #352f4a;
}

.dark-mode .message-box::-webkit-scrollbar-thumb {
    background-color: #7d5994;
    border: 2px solid #352f4a;
}

.message {
    margin-bottom: 12px;
    line-height: 1.6;
    padding: 10px 15px;
    border-radius: 12px;
    background-color: rgba(240, 230, 246, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    animation: messageAppear 0.3s ease-out;
}

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

.dark-mode .message {
    background-color: rgba(84, 72, 115, 0.2);
}

.message.hoshino {
    color: #9c6fb6;
    font-style: italic;
    background-color: rgba(156, 111, 182, 0.1);
    border-left: 3px solid #9c6fb6;
    margin-left: 20px;
}

.dark-mode .message.hoshino {
    color: #d1afec;
    background-color: rgba(209, 175, 236, 0.1);
    border-left: 3px solid #d1afec;
}

.highlight-command {
    background-color: #ffe0fc;
    font-weight: bold;
    padding: 0 5px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dark-mode .highlight-command {
    background-color: #6c4f7c;
    color: #f0e6f6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.command-area {
    padding: 20px;
    display: flex;
    gap: 15px;
    background-color: #f8f0ff;
    border-top: 1px solid #e0d0f0;
    transition: background-color 0.3s;
}

.dark-mode .command-area {
    background-color: #3e3652;
    border-top: 1px solid #544873;
}

#command-input {
    flex-grow: 1;
    padding: 12px 15px;
    border: 2px solid #e0d0f0;
    border-radius: 10px;
    font-size: 1rem;
    background-color: #fff;
    color: #333;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

#command-input:focus {
    border-color: #9c6fb6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(156, 111, 182, 0.2);
}

.dark-mode #command-input {
    background-color: #2b2539;
    color: #e0d0f0;
    border: 2px solid #544873;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.dark-mode #command-input:focus {
    border-color: #7d5994;
    box-shadow: 0 0 0 3px rgba(125, 89, 148, 0.2);
}

#submit-command {
    padding: 12px 25px;
    background-color: #9c6fb6;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(156, 111, 182, 0.3);
}

#submit-command:hover {
    background-color: #8a5ea2;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(156, 111, 182, 0.4);
}

#submit-command:active {
    transform: translateY(0);
}

.dark-mode #submit-command {
    background-color: #7d5994;
    box-shadow: 0 3px 10px rgba(125, 89, 148, 0.3);
}

.dark-mode #submit-command:hover {
    background-color: #6a4c7e;
    box-shadow: 0 4px 15px rgba(125, 89, 148, 0.4);
}

.settings-container {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.settings-toggle {
    background-color: #9c6fb6;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(156, 111, 182, 0.3);
    display: flex;
    align-items: center;
    gap: 5px;
}

.settings-toggle:hover {
    background-color: #8a5ea2;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(156, 111, 182, 0.4);
}

.settings-toggle:active {
    transform: translateY(0);
}

.dark-mode .settings-toggle {
    background-color: #7d5994;
    box-shadow: 0 3px 10px rgba(125, 89, 148, 0.3);
}

.dark-mode .settings-toggle:hover {
    background-color: #6a4c7e;
    box-shadow: 0 4px 15px rgba(125, 89, 148, 0.4);
}

.game-over-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 1s;
    backdrop-filter: blur(5px);
}

.game-over-content {
    background-color: #fff;
    color: #333;
    padding: 40px;
    border-radius: 20px;
    max-width: 80%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: popIn 0.5s ease-out forwards;
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.dark-mode .game-over-content {
    background-color: #352f4a;
    color: #e0d0f0;
}

.ending-report {
    max-height: 400px;
    overflow-y: auto;
    text-align: left;
    padding: 20px;
    margin: 20px 0;
    background-color: #f8f0ff;
    border-radius: 15px;
    border-left: 5px solid #9c6fb6;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

.dark-mode .ending-report {
    background-color: #3e3652;
    border-left: 5px solid #7d5994;
}

#download-report {
    margin-top: 20px;
    padding: 12px 25px;
    background-color: #9c6fb6;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(156, 111, 182, 0.3);
}

#download-report:hover {
    background-color: #8a5ea2;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(156, 111, 182, 0.4);
}

.dark-mode #download-report {
    background-color: #7d5994;
    box-shadow: 0 3px 10px rgba(125, 89, 148, 0.3);
}

.dark-mode #download-report:hover {
    background-color: #6a4c7e;
    box-shadow: 0 4px 15px rgba(125, 89, 148, 0.4);
}

.inventory-list {
    list-style-type: none;
    padding: 0;
    margin: 10px 0;
}

.inventory-category {
    font-weight: 600;
    margin-top: 15px;
    color: #9c6fb6;
    border-bottom: 1px solid #e0d0f0;
    padding-bottom: 5px;
}

.dark-mode .inventory-category {
    color: #d1afec;
    border-bottom: 1px solid #544873;
}

.inventory-item {
    margin-left: 15px;
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

.guidebook-overlay, .hall-overlay, .cookbook-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    backdrop-filter: blur(5px);
}

.guidebook-content, .hall-content, .cookbook-content {
    background-color: #fff;
    color: #333;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    border-radius: 20px;
    padding: 30px;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out forwards;
}

@keyframes slideIn {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.dark-mode .guidebook-content, 
.dark-mode .hall-content, 
.dark-mode .cookbook-content {
    background-color: #352f4a;
    color: #e0d0f0;
}

.guidebook-close, .hall-close, .cookbook-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #9c6fb6;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(156, 111, 182, 0.3);
}

.guidebook-close:hover, 
.hall-close:hover, 
.cookbook-close:hover {
    background-color: #8a5ea2;
    transform: rotate(90deg);
    box-shadow: 0 4px 15px rgba(156, 111, 182, 0.4);
}

.dark-mode .guidebook-close, 
.dark-mode .hall-close, 
.dark-mode .cookbook-close {
    background-color: #7d5994;
    box-shadow: 0 3px 10px rgba(125, 89, 148, 0.3);
}

.dark-mode .guidebook-close:hover, 
.dark-mode .hall-close:hover, 
.dark-mode .cookbook-close:hover {
    background-color: #6a4c7e;
    box-shadow: 0 4px 15px rgba(125, 89, 148, 0.4);
}

.guidebook-title, 
.hall-title, 
.cookbook-title {
    font-size: 2rem;
    margin-bottom: 30px;
    color: #9c6fb6;
    text-align: center;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dark-mode .guidebook-title, 
.dark-mode .hall-title, 
.dark-mode .cookbook-title {
    color: #d1afec;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.guidebook-section {
    margin-bottom: 30px;
}

.guidebook-section h2 {
    font-size: 1.5rem;
    color: #9c6fb6;
    margin-bottom: 15px;
    border-bottom: 1px solid #e0d0f0;
    padding-bottom: 8px;
    font-weight: 600;
}

.dark-mode .guidebook-section h2 {
    color: #d1afec;
    border-bottom: 1px solid #544873;
}

.guidebook-section p {
    line-height: 1.7;
    margin-bottom: 15px;
}

.guidebook-tip {
    background-color: #f8f0ff;
    padding: 15px;
    border-left: 4px solid #9c6fb6;
    margin: 15px 0;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.dark-mode .guidebook-tip {
    background-color: #3e3652;
    border-left: 4px solid #d1afec;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.hall-sorting {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    align-items: center;
    flex-wrap: wrap;
}

.hall-sorting button {
    background-color: #9c6fb6;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(156, 111, 182, 0.3);
}

.hall-sorting button:hover {
    background-color: #8a5ea2;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(156, 111, 182, 0.4);
}

.dark-mode .hall-sorting button {
    background-color: #7d5994;
    box-shadow: 0 3px 10px rgba(125, 89, 148, 0.3);
}

.dark-mode .hall-sorting button:hover {
    background-color: #6a4c7e;
    box-shadow: 0 4px 15px rgba(125, 89, 148, 0.4);
}

.hall-empty {
    text-align: center;
    margin: 40px 0;
    font-style: italic;
    color: #6c5980;
    font-size: 1.1rem;
}

.dark-mode .hall-empty {
    color: #b4a6c9;
}

.hall-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.dark-mode .hall-table {
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
}

.hall-table th, .hall-table td {
    padding: 15px;
    text-align: left;
}

.hall-table th {
    background-color: #9c6fb6;
    color: white;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.dark-mode .hall-table th {
    background-color: #7d5994;
}

.hall-table tr {
    background-color: #f8f0ff;
    transition: background-color 0.3s;
}

.dark-mode .hall-table tr {
    background-color: #3e3652;
}

.hall-table tr:nth-child(even) {
    background-color: #f0e6f6;
}

.dark-mode .hall-table tr:nth-child(even) {
    background-color: #352f4a;
}

.hall-table tr:hover {
    background-color: #e0d0f0;
}

.dark-mode .hall-table tr:hover {
    background-color: #544873;
}

.ending-good {
    color: #4caf50;
    font-weight: bold;
}

.ending-neutral {
    color: #ff9800;
    font-weight: bold;
}

.ending-bad {
    color: #f44336;
    font-weight: bold;
}

.cookbook-button {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #9c6fb6;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(156, 111, 182, 0.3);
    display: none;
    z-index: 10;
}

.cookbook-button:hover {
    background-color: #8a5ea2;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(156, 111, 182, 0.4);
}

.dark-mode .cookbook-button {
    background-color: #7d5994;
    box-shadow: 0 3px 10px rgba(125, 89, 148, 0.3);
}

.dark-mode .cookbook-button:hover {
    background-color: #6a4c7e;
    box-shadow: 0 4px 15px rgba(125, 89, 148, 0.4);
}

.recipe-item {
    margin-bottom: 20px;
    padding: 20px;
    background-color: #f8f0ff;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid #9c6fb6;
}

.recipe-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.dark-mode .recipe-item {
    background-color: #3e3652;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    border-left: 4px solid #7d5994;
}

.dark-mode .recipe-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.recipe-name {
    font-weight: 600;
    color: #9c6fb6;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.dark-mode .recipe-name {
    color: #d1afec;
}

.recipe-ingredients {
    font-style: italic;
    margin-bottom: 10px;
    line-height: 1.5;
}

.recipe-effects {
    font-size: 0.9rem;
    color: #6c5980;
    background-color: rgba(255, 255, 255, 0.5);
    padding: 10px;
    border-radius: 8px;
}

.dark-mode .recipe-effects {
    color: #b4a6c9;
    background-color: rgba(0, 0, 0, 0.2);
}

#hoshino-image {
    max-height: 90%;
    max-width: 90%;
    object-fit: contain;
    transition: transform 0.2s ease-in-out;
    filter: drop-shadow(0 0 10px rgba(156, 111, 182, 0.2));
    cursor: pointer;
}

.dark-mode #hoshino-image {
    filter: drop-shadow(0 0 10px rgba(156, 111, 182, 0.4));
}

.bounce-animation {
    animation: bounce 0.5s;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

/* UI Improvements for button icons */
.settings-toggle::before,
.cookbook-button::before {
    font-family: sans-serif;
    font-size: 1.1rem;
    display: inline-block;
    margin-right: 5px;
}

#dark-mode-toggle::before {
    content: '🌙';
}

.dark-mode #dark-mode-toggle::before {
    content: '☀️';
}

#language-toggle::before {
    content: '🌐';
}

#guidebook-toggle::before {
    content: '📖';
}

#hall-of-caretakers-toggle::before {
    content: '🏆';
}

.cookbook-button::before {
    content: '🍳';
}

@media (max-width: 1200px) {
    .game-container {
        width: 95%;
    }
}

@media (max-width: 992px) {
    .vitals {
        width: 100%;
    }
    
    .time-container {
        align-items: flex-start;
        margin-top: 15px;
    }
    
    .status-container {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .game-container {
        flex-direction: column;
        max-width: 100%;
        height: auto;
        min-height: 90vh;
    }
    
    .character-container {
        width: 100%;
        height: 250px;
        border-right: none;
        border-bottom: 1px solid #e0d0f0;
    }
    
    .dark-mode .character-container {
        border-bottom: 1px solid #544873;
    }
    
    .apartment-container {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e0d0f0;
    }
    
    .dark-mode .apartment-container {
        border-bottom: 1px solid #544873;
    }
    
    .game-content {
        width: 100%;
        height: auto;
        flex-grow: 1;
    }
    
    .apartment-room {
        margin-bottom: 15px;
    }
    
    .settings-container, 
    .cookbook-button {
        position: static;
        margin: 10px;
    }
    
    .settings-container {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .cookbook-button {
        width: calc(50% - 20px);
        text-align: center;
        justify-content: center;
    }
    
    .message-box {
        max-height: 300px;
    }
}

@media (max-width: 576px) {
    .command-area {
        flex-direction: column;
        gap: 10px;
    }
    
    #submit-command {
        width: 100%;
    }
    
    .guidebook-content, 
    .hall-content, 
    .cookbook-content {
        width: 95%;
        padding: 20px;
    }
    
    .cookbook-button {
        width: 100%;
    }
    
    .vital-item {
        flex-wrap: wrap;
    }
    
    .vital-label {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .progress-bar {
        width: 60%;
    }
}