.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: #f5f7fa;
    color: #333;
}

header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #2c3e50;
    color: #ecf0f1;
    top: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    border-radius: 5px;
    margin-bottom: 1.5rem;
    user-select: none;
    gap: 0.5rem;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    flex: 1 1 250px;
    letter-spacing: 1.5px;
    margin: 0;
    flex: none;
    text-align: center;
}

header .greeting-text {
    font-size: 1.1rem;
    font-style: italic;
    color: #bdc3c7;
    margin: 0;
    text-align: center;
}


#add-entry-btn {
    background-color: #27ae60;
    border: none;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 6px rgba(39, 174, 96, 0.4);
    flex: none;
}

#add-entry-btn:hover,
#add-entry-btn:focus {
    background-color: #219150;
    box-shadow: 0 6px 10px rgba(33, 145, 80, 0.6);
    outline: none;
}

#add-entry-btn:active {
    background-color: #1b7d3e;
    box-shadow: 0 3px 6px rgba(27, 125, 62, 0.7);
}

.sign-in-btn, #sign-out-btn {
    background-color: #2980b9;
    color: white;
    font-size: 1rem;
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(41, 128, 185, 0.4);
    transition: background-color 0.3s ease;
}

.sign-in-btn:hover, #sign-out-btn:hover {
    background-color: #2471a3;
}

main {
    padding: 1rem;
    max-width: 800px;
    margin: auto;
}

form {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    background-color: #fff;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

label {
    display: block;
    margin: 0.5rem 0;
}

.time-inputs {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.time-inputs input {
    flex: 1;
}

input[type="date"],
input[type="number"],
input[type="text"],
textarea {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.25rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
}

textarea {
    resize: vertical;
}

button[type="submit"] {
    margin-top: 1rem;
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}

.mood-selection {
    margin-top: 1rem;
}

.mood-selection img {
    width: 40px;
    height: 40px;
    margin-right: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.mood-selection img:hover {
    transform: scale(1.1);
}

.celebration-toggle img {
    width: 40px;
    height: 40px;
}

.celebration-toggle button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

#entries-display-wrapper {
    margin-top: 2rem;
}

.entries-title {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.5rem;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 0.25rem;
    letter-spacing: 0.03em;
    text-align: center;
}

#entries-display {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
}

#entries-display-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 2rem auto;
    overflow-x: auto;
}

.entry {
    background: white;
    border-bottom: 1px solid #ddd;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.entry:last-child {
    border-bottom: none;
}

.entry h3 {
    margin: 0;
    font-size: 1.2rem;
}

/* Mood and Celebrate icons start dimmed */
.mood-icon,
.celebrate-icon {
    opacity: 0.5;
    transform: scale(1);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.entry-text {
    white-space: pre-wrap;
}

.entry-text.collapsed {
    max-height: 4.5em;
    overflow: hidden;
    position: relative;
}

.toggle-button {
    background: none;
    border: none;
    color: #007BFF;
    cursor: pointer;
    padding: 0;
    font-size: 0.9em;
    margin-top: 4px;
}

.toggle-button:hover {
    text-decoration: underline;
}

/* When a mood radio is selected */
input[type="radio"]:checked+.mood-icon {
    opacity: 1;
    transform: scale(1.2);
}

/* When celebrate button is active */
#celebrate-btn.active .celebrate-icon {
    opacity: 1;
    transform: scale(1.2);
}

.entry img.mood-icon,
.entry img.celebrate-icon {
    width: 28px;
    height: 28px;
    vertical-align: middle;
    margin-left: 0.5rem;
    opacity: 1 !important;
    transform: none !important;
    cursor: default;
}

.entry-buttons {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.entry-buttons button {
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 9999px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    min-width: 110px;
}

.edit-btn {
    background-color: #5c9edb;
    color: #fff;
}

.edit-btn:hover {
    background-color: #4b89c4;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(91, 157, 219, 0.3);
}

.delete-btn {
    background-color: #e06666;
    color: #fff;
}

.delete-btn:hover {
    background-color: #c94e4e;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(224, 102, 102, 0.3);
}

#expand-entries-btn,
#collapse-entries-btn {
    margin: 1rem 0.5rem 0 0;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    background-color: #444;
    color: white;
    cursor: pointer;
}

#graph-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 3rem;
    padding: 1rem;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.graph-view-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

#graph-section h2 {
    margin-top: 0;
}

.graph-view-btn {
    margin: 0.5rem 0.5rem 1rem 0;
    padding: 0.5rem 1rem;
    border: 1px solid #ccc;
    background-color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.graph-view-btn:hover {
    background-color: #f0f0f0;
}

#graph-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

#graph-controls button {
    min-width: 50px;
    padding: 0.5rem 1rem;
    background-color: #ddd;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    flex-grow: 1;
    max-width: 150px;
}

.graph-label {
    text-align: center;
    font-weight: bold;
    margin: 1rem 0 0.5rem 0;
}

footer {
    margin-top: 3rem;
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1rem;
}

footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    text-align: center;
    padding: 1.5rem 2rem;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.15);
    user-select: none;
    margin-top: 2rem;
}

#footer-quote {
    font-style: italic;
    font-weight: 500;
    color: #a5d6a7;
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

#total-time {
    font-weight: 900;
    color: #4CAF50;
    font-size: 3rem;
    display: block;
    margin-top: 0.5rem;
}

#time-graph {
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
    max-height: 30vh;
    display: block;
}

@media (max-width: 600px) {
    footer {
        flex-direction: column;
        text-align: center;
    }

    #footer-quote,
    #total-time-display {
        flex: 1 1 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }
}

.hidden {
    display: none;
}

@media (max-width: 600px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    #add-entry-btn {
        align-self: center;
        width: 100%;
    }

    .mood-selection,
    .celebration-toggle {
        text-align: center;
    }

    footer {
        font-size: 0.95rem;
        padding: 1rem;
    }

    .footer-total-time {
        font-size: 1.2rem;
    }
}

@media (max-width: 600px) {
    .entry-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .entry-buttons button {
        width: 100%;
    }
}

@media (max-width: 600px) {
    #graph-controls button {
        min-width: 40px;
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}