:root {
    --primary-color: #5c4d46;
    --primary-light: #8b7b72;
    --bg-color: #f5f0e8;
    --bg-card: #fff;
    --text-color: #3d332f;
    --text-muted: #8b7b72;
    --border-color: #e8e0d5;
    --accent-color: #d4a574;
    --dog-color: #3d332f;
    --cat-color: #c9b896;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-color);
    min-height: 100vh;
    color: var(--text-color);
    padding-bottom: 80px;
}

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border-radius: 25px;
    padding: 40px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

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

.auth-header .back-btn {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(92, 77, 70, 0.1);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    color: var(--primary-color);
    cursor: pointer;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 8px;
}

.auth-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 14px;
    color: var(--text-color);
    background: var(--bg-color);
    outline: none;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: var(--primary-color);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.auth-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(92, 77, 70, 0.3);
}

.auth-footer {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
}

.header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 12px 15px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 8px;
}

.paw-icon {
    font-size: 24px;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.search-bar {
    background: var(--primary-color);
    border-radius: 35px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    max-width: 400px;
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
}

.menu-btn {
    width: 36px;
    height: 36px;
    background: rgba(92, 77, 70, 0.1);
    border: none;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
}

.menu-btn span {
    width: 16px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px;
}

.back-btn {
    width: 40px;
    height: 40px;
    background: rgba(92, 77, 70, 0.1);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.banner-section {
    padding: 80px 15px 15px;
}

.banner-card {
    background: var(--bg-card);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.banner-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.banner-overlay {
    position: relative;
    top: -50px;
    left: 20px;
}

.banner-text {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
}

.banner-info {
    padding: 16px 20px;
    margin-top: -30px;
}

.banner-tag {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.stats-section {
    padding: 0 15px;
    margin-bottom: 24px;
}

.stats-section .am-row {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 24px 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

.stat-divider {
    width: 1px;
    background: var(--border-color);
    margin: 0 10px;
}

.pets-section {
    padding: 0 15px;
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
}

.view-all {
    font-size: 14px;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
}

.pet-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    margin-bottom: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pet-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.pet-image-wrapper {
    position: relative;
    width: 100%;
    height: 160px;
}

.pet-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px 20px 0 0;
}

.remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pet-card-body {
    padding: 12px;
}

.pet-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.pet-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.pet-age {
    font-size: 12px;
    color: var(--text-muted);
}

.pet-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.pet-type {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.type-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.pet-type.dog .type-dot {
    background: var(--dog-color);
}

.pet-type.cat .type-dot {
    background: var(--cat-color);
}

.pet-location {
    font-size: 11px;
    color: var(--text-muted);
}

.pet-distance {
    display: flex;
    align-items: center;
    gap: 4px;
}

.distance-icon {
    font-size: 12px;
}

.distance-text {
    font-size: 12px;
    color: var(--accent-color);
    font-weight: 500;
}

.about-section {
    padding: 0 15px;
    margin-bottom: 24px;
}

.about-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.about-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
}

.about-content {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 16px;
}

.about-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.about-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(92, 77, 70, 0.3);
}

.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    padding: 8px 0 20px;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.08);
    z-index: 100;
}

.tab-bar ul {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0;
    margin: 0;
}

.tab-bar li {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 12px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
    flex: 1;
}

.tab-bar li.active,
.tab-bar li:hover {
    color: var(--primary-color);
}

.tab-icon {
    font-size: 22px;
    margin-bottom: 4px;
}

.tab-label {
    font-size: 11px;
}

.tab-center-item {
    position: relative;
    top: -25px;
    flex: 0.5;
}

.tab-center-btn {
    width: 70px;
    height: 70px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(92, 77, 70, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tab-center-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(92, 77, 70, 0.5);
}

.center-icon {
    font-size: 32px;
}

.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    padding: 80px 15px 30px;
    border-radius: 0 0 30px 30px;
    margin-bottom: 20px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.empty-text {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.empty-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
}

.filter-section {
    padding: 0 15px;
    margin-bottom: 20px;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.filter-tab {
    flex: 1;
    padding: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tab.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.type-filter {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.type-btn {
    padding: 8px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-size: 13px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.type-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.pets-content {
    padding: 0 15px;
}

.pet-detail-content {
    padding-top: 60px;
}

.pet-image-container {
    position: relative;
}

.pet-main-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.image-overlay {
    position: absolute;
    bottom: 15px;
    left: 15px;
}

.pet-type-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.pet-type-badge.dog {
    background: rgba(61, 51, 47, 0.9);
    color: #fff;
}

.pet-type-badge.cat {
    background: rgba(201, 184, 150, 0.9);
    color: var(--text-color);
}

.pet-info-section {
    background: var(--bg-card);
    margin: -25px 15px 15px;
    border-radius: 20px;
    padding: 20px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.pet-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.pet-name-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pet-title-row .pet-name {
    font-size: 24px;
}

.favorite-btn {
    width: 48px;
    height: 48px;
    background: rgba(92, 77, 70, 0.1);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pet-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-icon {
    font-size: 16px;
}

.meta-text {
    font-size: 14px;
    color: var(--text-color);
}

.detail-section {
    padding: 0 15px;
}

.section-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.section-card .section-title {
    font-size: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-icon {
    font-size: 18px;
}

.section-content {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

.requirement-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.requirement-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-muted);
}

.check-icon {
    color: #52c41a;
    font-weight: 600;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-label {
    font-size: 14px;
    color: var(--text-muted);
}

.contact-value {
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
}

.action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    padding: 15px;
    display: flex;
    gap: 15px;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.08);
}

.action-btn {
    flex: 1;
    padding: 14px;
    border-radius: 15px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.action-btn.primary {
    background: var(--primary-color);
    color: #fff;
}

.action-btn.secondary {
    background: rgba(92, 77, 70, 0.1);
    color: var(--primary-color);
}

.action-icon {
    font-size: 18px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.modal-footer .btn {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

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

.btn-secondary {
    background: rgba(92, 77, 70, 0.1);
    color: var(--text-color);
}

textarea.form-control {
    resize: none;
}

.profile-content {
    padding-top: 60px;
}

.profile-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    padding: 30px 15px;
    border-radius: 0 0 30px 30px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.avatar-wrapper {
    position: relative;
}

.avatar {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.avatar-icon {
    font-size: 40px;
}

.user-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name {
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.user-phone {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.stats-row {
    display: flex;
    justify-content: space-around;
    background: var(--bg-card);
    margin: -25px 15px 15px;
    border-radius: 20px;
    padding: 24px 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.stats-row .stat-item {
    flex: 1;
}

.menu-section {
    padding: 0 15px;
}

.menu-card {
    background: var(--bg-card);
    border-radius: 20px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.menu-item {
    width: 100%;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: none;
    border: none;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.3s ease;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background: rgba(92, 77, 70, 0.05);
}

.menu-icon {
    font-size: 20px;
}

.menu-text {
    flex: 1;
    font-size: 15px;
    color: var(--text-color);
    text-align: left;
}

.menu-arrow {
    font-size: 16px;
    color: var(--text-muted);
}

.footer {
    text-align: center;
    padding: 40px 20px;
}

.footer-text {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.footer-copyright {
    font-size: 12px;
    color: var(--text-muted);
}

.favorites-content {
    padding: 80px 15px 0;
}

@media screen and (min-width: 768px) {
    body {
        padding-bottom: 30px;
        padding-top: 80px;
    }

    .header-fixed {
        padding: 16px 30px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .logo-text {
        font-size: 22px;
    }

    .search-bar {
        padding: 12px 20px;
        max-width: 500px;
    }

    .search-bar input {
        font-size: 16px;
    }

    .banner-section {
        padding: 30px;
        max-width: 1200px;
        margin: 0 auto;
    }

    .banner-image {
        height: 280px;
    }

    .banner-text {
        font-size: 32px;
    }

    .stats-section {
        padding: 0 30px;
        max-width: 1200px;
        margin: 0 auto 30px;
    }

    .stats-section .am-row {
        padding: 32px;
    }

    .stat-number {
        font-size: 36px;
    }

    .stat-label {
        font-size: 16px;
    }

    .stat-divider {
        margin: 0 20px;
    }

    .pets-section {
        padding: 0 30px;
        max-width: 1200px;
        margin: 0 auto 30px;
    }

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

    .pet-card {
        margin-bottom: 20px;
    }

    .pet-image-wrapper {
        height: 200px;
    }

    .tab-bar {
        display: none;
    }

    .page-header {
        padding: 40px 30px;
        max-width: 1200px;
        margin: 0 auto 30px;
        border-radius: 20px;
    }

    .filter-section {
        padding: 0 30px;
        max-width: 1200px;
        margin: 0 auto 20px;
    }

    .pets-content {
        padding: 0 30px;
        max-width: 1200px;
        margin: 0 auto;
    }

    .pet-detail-content {
        padding-top: 30px;
        max-width: 800px;
        margin: 0 auto;
    }

    .pet-main-image {
        height: 400px;
        border-radius: 20px;
    }

    .pet-info-section {
        margin: -30px 30px 30px;
    }

    .pet-meta-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .detail-section {
        padding: 0 30px;
    }

    .action-bar {
        display: none;
    }

    .profile-content {
        padding-top: 30px;
        max-width: 600px;
        margin: 0 auto;
    }

    .profile-header {
        border-radius: 20px;
    }

    .stats-row {
        margin: -30px 30px 30px;
    }

    .menu-section {
        padding: 0 30px;
    }

    .favorites-content {
        padding: 30px;
        max-width: 1200px;
        margin: 0 auto;
    }
}

@media screen and (min-width: 1024px) {
    .header-fixed {
        padding: 20px 50px;
    }

    .banner-image {
        height: 320px;
    }

    .banner-text {
        font-size: 40px;
    }

    .stats-section,
    .pets-section {
        padding: 0 50px;
    }

    .pet-image-wrapper {
        height: 220px;
    }

    .page-header {
        padding: 50px;
    }
}