/* 기본 & 전체 레이아웃 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&display=swap');

:root {
    --primary-color: #5D5FEF;
    --background-color: #f4f5f7;
    --text-color: #333;
    --light-text-color: #888;
    --border-color: #e0e0e0;
    --mustard-color: #E4B429;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

/* --- 고정 및 스크롤 레이아웃 --- */
.mobile-container {
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background-color: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.scrollable-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

/* --- 고정 헤더 (로고) --- */
.main-header {
    background-color: var(--mustard-color);
    text-align: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.header-logo {
    height: 80px;
    width: 80px;
    object-fit: contain;
}

/* --- 반려동물 사진 틀 --- */
.pet-image-frame {
    width: 100%;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 12px;
    background-color: #f0f0f0;
}

#pet-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- 프로필 페이지 컨텐츠 --- */
.profile-body {
    padding: 0;
}

.pet-info {
    text-align: center;
    margin-bottom: 25px;
}

.pet-info h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.gender-icon {
    font-size: 22px;
}

.gender-icon.female {
    color: #E91E63;
}

.gender-icon.male {
    color: #2196F3;
}

.pet-details {
    font-size: 16px;
    color: var(--light-text-color);
}

.pet-stats {
    display: flex;
    justify-content: space-around;
    background-color: var(--background-color);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.stat-item {
    text-align: center;
}

.stat-item .label {
    display: block;
    font-size: 14px;
    color: var(--light-text-color);
    margin-bottom: 5px;
}

.stat-item .value {
    font-size: 16px;
    font-weight: 500;
}

.special-notes h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
}

.special-notes p {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 8px;
}

/* --- 고정 푸터 영역 --- */
.profile-actions.fixed-footer {
    background-color: white;
    border-top: 1px solid var(--border-color);
    padding: 10px 15px 15px 15px;
}

.footer-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--light-text-color);
    margin-bottom: 10px;
}

.button-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.profile-actions .action-btn {
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-actions .action-btn:hover {
    transform: scale(1.05);
}

.profile-actions .action-btn .fas {
    margin-right: 8px;
}

.profile-actions .icon-btn {
    flex: 1;
    height: 50px;
    font-size: 20px;
}

.profile-actions .icon-btn .fas {
    margin-right: 0;
}

.profile-actions .text-btn {
    flex: 2;
    height: 50px;
    font-size: 16px;
}

.action-btn.contact,
.action-btn.chat {
    background-color: #f0f0f0;
    color: var(--text-color);
}

.action-btn.location {
    background-color: var(--primary-color);
    color: white;
}

/* --- 채팅 페이지 --- */
.chat-header {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    background-color: white;
    position: sticky;
    top: 0;
    z-index: 10;
}

.chat-header h1 {
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    flex-grow: 1;
    margin-right: -20px;
}

.back-btn {
    font-size: 20px;
    color: var(--text-color);
    text-decoration: none;
}

.chat-window {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #a8bde6;
}

.message-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.message-group.sent {
    align-items: flex-end;
}

.message-group.received {
    align-items: flex-start;
}

.message-bubble {
    max-width: 75%;
    padding: 10px 15px;
    border-radius: 20px;
    line-height: 1.5;
    margin-bottom: 5px;
    word-wrap: break-word;
}

.message-group.sent .message-bubble {
    background-color: #FEE500;
    color: #3C1E1E;
    border-top-right-radius: 5px;
}

.message-group.received .message-bubble {
    background-color: white;
    border-top-left-radius: 5px;
}

.chat-input-area {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 420px;
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #f9f9f9;
    border-top: 1px solid var(--border-color);
}

.plus-btn,
.send-btn {
    border: none;
    background: none;
    font-size: 20px;
    padding: 10px;
    cursor: pointer;
    color: var(--light-text-color);
}

.send-btn {
    background-color: #FEE500;
    color: black;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
}

.send-btn:active {
    background-color: #e4cd00;
}

.text-input {
    flex-grow: 1;
    border: none;
    background-color: white;
    border-radius: 20px;
    padding: 12px 15px;
    font-size: 16px;
    margin: 0 10px;
}

.text-input:focus {
    outline: none;
}