@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@400;700&display=swap');

body {
    font-family: 'Comfortaa', cursive;
    background: linear-gradient(to right top, #a1d9d9, #e0f2f7);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
    color: #333;
}

.container {
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    backdrop-filter: blur(5px);
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

h1 {
    color: #5b8c85;
    margin-bottom: 25px;
    font-size: 2.2em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

h2 {
    color: #7a6c5d;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.6em;
}

/* --- Login Form Styles --- */
.login-container {
    padding: 20px;
}

.login-form .input-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #7a6c5d;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: calc(100% - 20px); /* Account for padding */
    padding: 12px 10px;
    border: 2px solid #ccc;
    border-radius: 10px;
    font-family: 'Comfortaa', cursive;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    border-color: #5b8c85;
    outline: none;
}

.login-button {
    background-color: #81c784; /* Green */
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-family: 'Comfortaa', cursive;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.login-button:hover {
    background-color: #66bb6a;
    transform: translateY(-2px);
}

.login-error {
    color: #e57373; /* Red for error */
    font-size: 0.9em;
    margin-top: -10px;
    margin-bottom: 15px;
    min-height: 1.2em; /* Reserve space */
    font-weight: bold;
}

/* --- App Controls (Reset/Logout Buttons) --- */
.app-controls {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.control-button {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-family: 'Comfortaa', cursive;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    color: white;
}

.reset-button {
    background-color: #ffb74d; /* Orange */
}

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

.logout-button {
    background-color: #9e9e9e; /* Grey */
}

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


/* --- Existing Styles (adjust as needed for integration) --- */
.hidden {
    display: none !important; /* Forces element to be hidden */
}

.avatar-area {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
    border-radius: 50%;
    background-color: #ffe0b2;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

#avatar {
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
}

#animation-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

#animation-container.show {
    opacity: 1;
}

.feedback-text {
    color: #e57373;
    font-size: 1.5em;
    font-weight: bold;
    margin-top: 15px;
    margin-bottom: 10px;
    min-height: 1.8em;
    animation: popIn 0.5s ease-out;
}

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

.chore-list-container {
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.03);
}

.chore-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.chore-item {
    background-color: #ffccbc;
    border-radius: 15px;
    padding: 15px;
    width: 100px;
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: grab;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.chore-item:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.chore-item:active {
    cursor: grabbing;
    transform: scale(0.98);
}

.chore-item img {
    width: 60px;
    height: 60px;
    margin-bottom: 5px;
    object-fit: contain;
    pointer-events: none;
}

.chore-item span {
    font-size: 0.9em;
    font-weight: bold;
    color: #7a6c5d;
    text-align: center;
}

.chore-item.completed {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
    transform: scale(0.9);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    filter: grayscale(100%);
}

.progress-bar-container {
    width: 80%;
    background-color: #f0f0f0;
    border-radius: 10px;
    height: 20px;
    margin: 30px auto 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05);
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: #81c784;
    border-radius: 10px;
    transition: width 0.5s ease-in-out;
}

#progressText {
    font-size: 1.1em;
    color: #555;
    font-weight: bold;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    h1 {
        font-size: 1.8em;
    }
    .chore-item {
        width: 80px;
        height: 80px;
        padding: 10px;
    }
    .chore-item img {
        width: 50px;
        height: 50px;
    }
    .chore-item span {
        font-size: 0.8em;
    }
    .feedback-text {
        font-size: 1.2em;
    }
    .app-controls {
        flex-direction: column;
        gap: 10px;
    }
}