/* --- CSS for Moksha's Samosa Saga --- */

/* Import friendly fonts from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@700&family=Poppins:wght@400;600&display=swap');

:root {
    --primary-color: #ff9800; /* Warm Samosa Orange */
    --secondary-color: #e91e63; /* Fun Pink */
    --bg-color: #fdf8e1; /* Light Creamy Background */
    --text-color: #4f4f4f; /* Warm Dark Gray */
    --panel-bg: rgba(255, 255, 255, 0.7);
    --panel-border: 1px solid rgba(255, 152, 0, 0.4);
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23f4e5bc" fill-opacity="0.4"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
}

.main-container {
    width: 100%;
    max-width: 900px;
    background-color: var(--panel-bg);
    border: var(--panel-border);
    border-radius: 12px;
    padding: 2rem 2.5rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

h1 {
    font-family: 'Baloo 2', cursive;
    color: var(--primary-color);
    text-align: center;
    font-size: 2.8rem;
    letter-spacing: 1px;
    margin-top: 0;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.8);
}

/* --- Start & Game Over Screens --- */
.start-screen {
    text-align: center;
}

.start-screen h2 {
    font-family: 'Baloo 2', cursive;
    color: var(--secondary-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.start-screen p {
    line-height: 1.7;
    max-width: 550px;
    margin: 0 auto 2rem auto;
    font-size: 1.1rem;
}

.start-screen button, .reset-btn {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 12px 28px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s;
    box-shadow: var(--shadow);
}

.start-screen button:hover, .reset-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.final-log {
    font-style: italic;
    background-color: rgba(0,0,0,0.03);
    border-left: 4px solid var(--secondary-color);
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: 4px;
}

/* --- Main Game Layout --- */
.game-layout {
    display: flex;
    gap: 1.5rem;
    min-height: 450px;
}

#terminal {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
    background-color: rgba(0,0,0,0.02);
    border-radius: 8px;
}

#terminal p {
    margin: 0 0 1rem 0;
    line-height: 1.6;
}
#terminal p:last-child {
    margin-bottom: 0;
}

.sidebar {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.game-panel {
    background-color: white;
    border: var(--panel-border);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow);
}

#status-panel h2, #actions-panel h2 {
    font-family: 'Baloo 2', cursive;
    color: var(--secondary-color);
    font-size: 1.4rem;
    margin-top: 0;
    text-align: center;
    margin-bottom: 1rem;
}

/* --- Progress Bar --- */
.progress-bar-container {
    margin-top: 1rem;
}
.progress-bar-container p {
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #eee;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #ddd;
}
#samosa-progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.5s ease-in-out;
}
#samosa-progress-text {
    text-align: center;
    font-weight: 600;
    margin-top: 0.25rem;
    display: block;
}


#actions-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.action-btn {
    width: 100%;
    background-color: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    text-align: center;
    transition: background-color 0.2s, color 0.2s, transform 0.1s;
}

.action-btn:hover {
    background-color: var(--primary-color);
    color: white;
}
.action-btn:active {
    transform: scale(0.98);
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #eee;
}

.reset-form {
    text-align: center;
    margin-top: 1.5rem;
}