/* --- Base Styles & Variables --- */
:root {
    --primary-bg: #1a1a1d;
    --secondary-bg: #2b2d42;
    --accent-color: #00ff9d;
    --secondary-accent: #ff9a00; /* Accent for rest day button */
    --text-color: #edf2f4;
    --strong-text: #ffffff;
    --error-color: #ff4d6d;
    --disabled-bg: #555;
    --disabled-text: #999;
    --font-heading: 'Anton', sans-serif;
    --font-body: 'Oswald', sans-serif;
    --font-quote: 'Roboto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px; /* Base font size */
}

body {
    font-family: var(--font-body);
    background-color: var(--primary-bg);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align top on small screens */
    min-height: 100vh;
    padding: 20px 10px; /* Reduced horizontal padding */
    text-align: center;
    overflow-x: hidden;
}

.container {
    background-color: var(--secondary-bg);
    padding: 25px 20px; /* Adjusted padding */
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    max-width: 500px;
    width: 100%;
    animation: fadeIn 0.8s ease-out;
    margin-top: 2vh; /* Add some top margin */
}

/* --- Typography --- */
h1 {
    font-family: var(--font-heading);
    color: var(--accent-color);
    font-size: 2.8rem; /* Slightly smaller */
    margin-bottom: 15px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

h2 {
    font-family: var(--font-heading);
    color: var(--strong-text);
    font-size: 1.6rem; /* Slightly smaller */
    margin-bottom: 8px;
}

p, blockquote, cite {
    font-size: 1rem; /* Adjusted base size */
    line-height: 1.5;
}

#last-streak-date {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 4px;
}

/* --- Mascot --- */
#mascot-container {
    margin: 15px auto;
    width: 130px; /* Slightly smaller */
    height: 130px;
    transition: transform 0.3s ease;
}

#mascot-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: bounce 2s infinite ease-in-out; /* Default idle bounce */
}

/* Mascot reaction on success */
#mascot-container.happy img {
    animation: jump 0.5s ease;
}

/* --- Streak Counter --- */
#streak-info {
    margin: 25px 0;
}

#streak-count {
    font-family: var(--font-heading);
    font-size: 4rem; /* Slightly smaller */
    color: var(--accent-color);
    font-weight: 700;
    margin: 5px 0;
    line-height: 1;
    transition: color 0.3s ease;
}

.counter-pop {
    animation: popIn 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* --- Buttons --- */
.button-group {
    display: flex;
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px; /* Space between buttons */
    align-items: center; /* Center buttons horizontally */
    margin: 25px 0;
}

#streak-button,
#rest-day-button {
    font-family: var(--font-heading);
    border: none;
    padding: 12px 25px; /* Adjusted padding */
    font-size: 1.3rem; /* Adjusted size */
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 90%; /* Make buttons take more width */
    max-width: 300px; /* But not too wide */
}

#streak-button {
    background-color: var(--accent-color);
    color: var(--primary-bg);
    box-shadow: 0 5px 15px rgba(0, 255, 157, 0.3);
}

#rest-day-button {
    background-color: var(--secondary-accent);
    color: var(--primary-bg);
    box-shadow: 0 5px 15px rgba(255, 154, 0, 0.3);
}


#streak-button:hover {
    background-color: #00e68a;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 255, 157, 0.4);
}

#rest-day-button:hover:not(:disabled) { /* Only hover effect if not disabled */
    background-color: #ffae42; /* Lighter orange */
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 154, 0, 0.4);
}


#streak-button:active,
#rest-day-button:active:not(:disabled) {
    transform: translateY(1px) scale(0.98);
}

#streak-button:active {
     box-shadow: 0 3px 10px rgba(0, 255, 157, 0.2);
}

#rest-day-button:active:not(:disabled) {
     box-shadow: 0 3px 10px rgba(255, 154, 0, 0.2);
}


#streak-button:disabled,
#rest-day-button:disabled {
    background-color: var(--disabled-bg);
    color: var(--disabled-text);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
    opacity: 0.7;
}

.button-text {
    transition: opacity 0.2s ease;
}

.button-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

#streak-button:hover .button-icon,
#rest-day-button:hover:not(:disabled) .button-icon {
    transform: rotate(-15deg) scale(1.1);
}

/* Loading state for main button */
#streak-button.loading .button-text {
    opacity: 0;
}
#streak-button.loading .button-icon {
    animation: spin 1s linear infinite;
    content: '⏱️';
}


/* --- Status Message --- */
#status-message {
    min-height: 1.5em;
    margin-top: 15px;
    font-weight: bold;
    font-size: 0.95rem; /* Slightly smaller */
    transition: opacity 0.3s ease;
    padding: 0 5px; /* Add padding for long messages */
}

#status-message.success { color: var(--accent-color); }
#status-message.error { color: var(--error-color); }
#status-message.info { color: var(--text-color); opacity: 0.9; }


/* --- Quote --- */
#quote-container {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid rgba(237, 242, 244, 0.2);
    opacity: 0.9;
}

#quote-text {
    font-family: var(--font-quote);
    font-style: italic;
    color: var(--text-color);
    margin-bottom: 8px;
    font-size: 1rem;
}

#quote-author {
    font-family: var(--font-quote);
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
    color: var(--accent-color);
    opacity: 0.8;
}

/* --- Footer --- */
footer {
    margin-top: 25px;
    font-size: 0.85rem;
    opacity: 0.6;
    line-height: 1.4; /* Added for better spacing */
}

/* REMOVED: #notification-status style */


/* --- Animations --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@keyframes jump {
    0%, 100% { transform: translateY(0) rotate(0); }
    25% { transform: translateY(-20px) rotate(-5deg); }
    75% { transform: translateY(-15px) rotate(5deg); }
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- Enhanced Mobile Responsiveness --- */
@media (max-width: 480px) {
    html {
        font-size: 15px;
    }
    .container {
        padding: 20px 15px;
        margin-top: 10px;
    }
    h1 {
        font-size: 2.2rem;
    }
    h2 {
        font-size: 1.4rem;
    }
    #streak-count {
        font-size: 3.2rem;
    }
     #mascot-container {
        width: 100px;
        height: 100px;
    }

    #streak-button,
    #rest-day-button {
        font-size: 1.1rem;
        padding: 10px 20px;
        width: 100%;
    }

    .button-group {
        gap: 10px;
        margin: 20px 0;
    }

     #status-message {
         font-size: 0.9rem;
     }
     #quote-text {
         font-size: 0.95rem;
     }
}