* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f7f3ee;
    margin: 0;
    padding: 0;
    color: #333;
}

.container {
    max-width: 850px;
    margin: 0 auto;
    padding: 30px 20px 40px;
}


/* Header */

.header {
    text-align: center;
    margin-bottom: 30px;
}

.paw-icon {
    font-size: 45px;
    margin-bottom: 5px;
}

h1 {
    margin: 0;
    font-size: 42px;
}

.subtitle {
    margin: 8px 0 5px;
    font-size: 20px;
    color: #555;
}

.tagline {
    margin: 0;
    color: #888;
    font-size: 14px;
}


/* Cards */

.card {
    background: white;
    padding: 28px;
    margin-bottom: 22px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
}


/* Section titles */

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

.section-title > span {
    font-size: 32px;
}

.section-title h2 {
    margin: 0;
    font-size: 22px;
}

.section-title p {
    margin: 4px 0 0;
    color: #777;
    font-size: 14px;
}


/* Profile */

.form-grid {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    gap: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: bold;
    font-size: 14px;
}


/* Inputs */

input {
    width: 100%;
    padding: 12px;
    border: 1px solid #d5d5d5;
    border-radius: 8px;
    font-size: 15px;
    background: #fafafa;
}

input:focus {
    outline: none;
    border-color: #888;
    background: white;
}


/* Buttons */

button {
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    transition: transform 0.15s ease;
}

button:hover {
    transform: translateY(-1px);
}

.primary-button {
    margin-top: 22px;
    padding: 13px 22px;
    background: #333;
    color: white;
}

.score-button {
    display: block;
    margin-left: auto;
    margin-right: auto;
}


/* Activities */

.activity-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.activity-item {
    padding: 15px 10px;
    background: #fafafa;
    border-radius: 12px;
    text-align: center;
}

.activity-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.activity-item label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 14px;
}

.input-with-unit {
    position: relative;
}

.input-with-unit input {
    padding-right: 40px;
    text-align: center;
}

.input-with-unit span {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #777;
}


/* Score */

.result-card {
    text-align: center;
}

.center-title {
    justify-content: center;
}

.score {
    font-size: 52px;
    font-weight: bold;
    margin: 10px 0 15px;
}

.score-bar {
    width: 100%;
    height: 14px;
    background: #e8e8e8;
    border-radius: 20px;
    overflow: hidden;
}

.score-progress {
    width: 0%;
    height: 100%;
    border-radius: 20px;
    background: #333;
}

.score-message {
    font-size: 18px;
    font-weight: bold;
    margin-top: 18px;
}


/* Footer */

footer {
    text-align: center;
    color: #888;
    font-size: 13px;
    margin-top: 25px;
}


/* Mobile */

@media (max-width: 700px) {

    .container {
        padding: 20px 12px 30px;
    }

    h1 {
        font-size: 34px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .activity-grid {
        grid-template-columns: 1fr 1fr;
    }

    .card {
        padding: 20px;
    }
}


@media (max-width: 450px) {

    .activity-grid {
        grid-template-columns: 1fr;
    }

    .score {
        font-size: 44px;
    }
}

/* Dog Mood */

.mood-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.mood-button {
    margin-top: 0;
    padding: 18px 10px;
    background: #fafafa;
    color: #333;
    border: 2px solid transparent;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.mood-button:first-child {
    font-size: 28px;
}

.mood-button:hover {
    border-color: #333;
}

.mood-button span {
    font-size: 14px;
    font-weight: bold;
}

.selected-mood {
    text-align: center;
    margin-top: 18px;
    font-weight: bold;
    color: #555;
}


/* Mobile */

@media (max-width: 600px) {

    .mood-options {
        grid-template-columns: 1fr 1fr;
    }

}

/* Activity History */

.activity-history {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    display: grid;
    grid-template-columns: 110px 1fr auto;
    align-items: center;
    gap: 15px;
    padding: 14px 16px;
    background: #fafafa;
    border-radius: 10px;
}

.history-date {
    font-weight: bold;
    font-size: 14px;
}

.history-mood {
    color: #666;
    font-size: 14px;
}

.history-score {
    font-weight: bold;
    font-size: 16px;
}

.empty-history {
    text-align: center;
    color: #777;
    padding: 15px;
}

.history-note {
    text-align: center;
    margin: 18px 0 0;
    color: #999;
    font-size: 12px;
}


/* Mobile History */

@media (max-width: 600px) {

    .history-item {
        grid-template-columns: 1fr auto;
        gap: 8px;
    }

    .history-mood {
        grid-column: 1;
    }

    .history-score {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

}

/* Save confirmation animation */

.save-success {
    animation: savePulse 0.5s ease;
}

@keyframes savePulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}


/* ==========================================
   Top Bar
   ========================================== */

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

/* ==========================================
   Header Layout
   ========================================== */

.header-content {
    position: relative;

    display: flex;

    justify-content: center;

    align-items: center;

    min-height: 180px;
}


/* Keep title centered */

.header-title {
    text-align: center;
}


/* Dashboard button */

.dashboard-button {
    position: absolute;

    right: 0;

    top: 20px;

    display: inline-block;

    padding: 11px 16px;

    background-color: white;

    color: #333;

    text-decoration: none;

    font-weight: bold;

    border-radius: 8px;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.08);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.dashboard-button:hover {

    transform: translateY(-2px);

    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.12);
}


/* Mobile layout */

@media (max-width: 600px) {

    .header-content {

        flex-direction: column;

        min-height: auto;

        gap: 15px;

    }

    .dashboard-button {

        position: static;

    }

}