:root {
    --primary-color: #ffb7b2;
    --secondary-color: #ffdac1;
    --background-color: #fff9f5;
    --card-bg: #ffffff;
    --text-color: #5d5d5d;
    --accent-color: #b2e2f2;
    --success-color: #b9fbc0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Navigation */
.navbar {
    background-color: #ffffff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-item {
    text-decoration: none;
    color: #888;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: color 0.3s;
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.nav-item.active {
    color: var(--primary-color);
    font-weight: bold;
}

/* Container */
.container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Sections */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

/* Profile Section */
.profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.profile-image-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin-bottom: 1.5rem;
}

#pet-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--secondary-color);
}

.photo-edit-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: var(--primary-color);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.direct-edit {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    align-items: center;
}

.profile-input {
    width: 100%;
    max-width: 300px;
    border: 1px solid transparent;
    background: transparent;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 1rem;
    color: #666;
    transition: all 0.2s ease;
    text-align: center;
}

.profile-input:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: #eee;
}

.profile-input:focus {
    background: #fff;
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 183, 178, 0.1);
}

.name-input {
    font-size: 1.6rem;
    font-weight: bold;
    color: #333;
}

.name-input::placeholder {
    color: #ccc;
    font-weight: normal;
}

.breed-input {
    font-size: 1.1rem;
    color: #555;
}

.birth-input {
    font-size: 0.95rem;
    color: #888;
}

.date-input-group {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 0 !important;
}

.direct-edit .date-input-wrapper {
    width: 100%;
    max-width: 300px;
    justify-content: center;
}

.direct-edit .calendar-btn {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
    border-radius: 8px;
    background: transparent;
    color: #ccc;
}

.direct-edit .calendar-btn:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    margin-top: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #ff9a92;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #eee;
    color: #888;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.3rem;
    color: #444;
}

/* Date Input Wrapper */
.date-input-wrapper {
    display: flex;
    gap: 8px;
    position: relative;
    align-items: center;
}

.date-input-wrapper input[type="text"] {
    flex: 1;
}

.hidden-date-picker {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

.calendar-btn {
    background: var(--secondary-color);
    border: none;
    border-radius: 10px;
    width: 45px;
    height: 45px;
    cursor: pointer;
    color: var(--primary-color);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.calendar-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Input Groups Update */
.input-group {
    margin-bottom: 1.2rem;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.modal-content input, .modal-content textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #eee;
    border-radius: 12px;
    outline: none;
    background: #fcfcfc;
    transition: all 0.3s;
}

.modal-content input:focus {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 183, 178, 0.1);
}

/* Photo Preview */
.photo-preview {
    margin-top: 0.5rem;
    width: 100%;
    max-height: 150px;
    border-radius: 10px;
    overflow: hidden;
    display: none;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Diary Item Photo */
.diary-item-photo {
    width: 100%;
    max-height: 250px;
    border-radius: 12px;
    margin-bottom: 1rem;
    object-fit: cover;
}

.location-tag {
    display: inline-block;
    font-size: 0.8rem;
    color: #666;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 20px;
    margin-bottom: 0.5rem;
}

/* Health Details */
.health-detail {
    font-size: 0.85rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed #eee;
}

.health-detail div {
    margin-bottom: 2px;
}

.health-detail span {
    color: #999;
    margin-right: 5px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 3rem 1rem;
    color: #bbb;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* List Items Update */
.list-item {
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    border: 1px solid #f5f5f5;
}

.list-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
}

.list-item-content {
    color: #555;
    word-break: break-all;
}

.list-item-footer {
    margin-top: 0.8rem;
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #888;
}

/* Responsive Navigation for Mobile */
@media (max-width: 600px) {
    .navbar {
        padding: 0.8rem 1rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .nav-item {
        font-size: 0.75rem;
    }
}