/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', cursive, 'PingFang SC', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: linear-gradient(to bottom, #F6D365 0%, #FFFFFF 80%);
    background-attachment: fixed;
    color: #5a3d3d;
    line-height: 1.6;
    padding-bottom: 80px;
    touch-action: manipulation;
    min-height: 100vh;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Logo区域 - 增大上下间距 */
.logo-area {
    text-align: center;
    padding: 25px 0 15px;
    margin-top: 30px;
    margin-bottom: 10px;
}

.logo {
    max-width: 60%;
    margin-bottom: 1px;
}

.logo-area h1 {
    font-size: 33px;
    color: #ff8a8a;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
    letter-spacing: 1px;
    margin-top: -30px;
}

/* 登录区域 - 增大尺寸和间距 */
.login-section {
    position: absolute; /* 改为绝对定位 */
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    padding: 10px 15px; /* 缩小内边距 */
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(6px);
    z-index: 100; /* 确保在最上层 */
    transition: all 0.3s ease;
    max-width: 200px; /* 限制最大宽度 */
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    border: 3px solid white;
    background-color: white;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-btn {
    background-color: #ff8a8a;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    -webkit-user-select: none;
    user-select: none;
}

.login-btn:active {
    transform: scale(0.96);
    background-color: #ff6b6b;
}

.user-info {
    font-size: 16px;
    color: #5a3d3d;
    font-weight: bold;
}

/* 广告轮播 - 16:9比例，增加间距 */
.ad-banner {
    position: relative;
    margin: 0 auto 30px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 50%;
}

.slider {
    position: relative;
    padding-bottom: 56.25%; /* 16:9比例 */
    height: 0;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    object-fit: cover;
}

.slide.active {
    opacity: 1;
}

.slider-dots {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: #ff8a8a;
    transform: scale(1.3);
}

/* 功能入口 - 增大间距和尺寸 */
.features {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    gap: 15px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.feature-card {
    background-color: rgba(255, 255, 255, 0.92);
    border-radius: 18px;
    padding: 20px 15px;
    width: calc(50% - 8px);
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    border: 1px solid rgba(255, 138, 138, 0.15);
}

.feature-card:active {
    transform: scale(0.98);
    background-color: rgba(255, 235, 235, 0.95);
}



.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 12px;
}

.feature-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.feature-card h3 {
    font-size: 18px;
    color: #ff8a8a;
    margin-bottom: 6px;
}

.feature-card p {
    font-size: 14px;
    color: #888;
    line-height: 1.4;
}

/* 萌宠萌图展示 - 优化网格和间距 */
.cute-pets {
    margin-bottom: 50px;
}

.cute-pets h2 {
    font-family: 'ZCOOL KuaiLe', cursive;
    font-size: 24px;
    color: #ff6b8b;
    text-shadow: 2px 2px 0px #fff, 4px 4px 0px rgba(0,0,0,0.1);
    letter-spacing: 1px;
    transform: rotate(-2deg);
    display: inline-block;
    padding: 12px 25px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border: 2px dashed #FFB347;
    position: relative;
    margin-left: 50%;
    transform: translateX(-50%) rotate(-2deg);
}


.cute-pets h2:before {
    position: absolute;
    top: -5px;
    left: 20px;
    width: 15px;
    height: 15px;
    background-color: #FFE4B5;
    border-radius: 50%;
    z-index: -1;
    content: "🐾";
    margin-right: 10px;
    font-size: 20px;
    display: inline-block;
    animation: bounce 1s infinite alternate;
}

.cute-pets h2:after {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    content: "🐾";
    margin-left: 10px;
    font-size: 20px;
    display: inline-block;
    animation: bounce 1s infinite alternate 0.2s;

}

.pet-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-width: 80%;
    margin: 0 auto;
    margin-bottom: 100px;
}

.pet-card {
    background-color: white;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    border: 1px solid rgba(255, 138, 138, 0.1);
}

.pet-card:active {
    transform: scale(0.97);
    background-color: #ffeeee;
}

.pet-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pet-card:active img {
    transform: scale(1.05);
}

/* 底部导航栏 - 增大高度和图标 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.98);
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 138, 138, 0.1);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #888;
    font-size: 20px;
    padding: 5px 12px;
    border-radius: 12px;
    transition: all 0.2s ease;
    -webkit-user-select: none;
    user-select: none;
}

.nav-item:active {
    transform: scale(0.95);
    background-color: #ffeeee;
}

.nav-item img {
    width: 40px;
    height: 40px;
    margin-bottom: 4px;
}

.nav-item.active {
    color: #ff8a8a;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .features {
        gap: 12px;
    }
    
    .pet-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .feature-card {
        padding: 18px 12px;
    }
    
    .feature-icon {
        width: 55px;
        height: 55px;
    }
}

@media (max-width: 480px) {
    .logo-area {
        padding: 20px 0 12px;
    }
    
    .logo {
        width: 70px;
        height: 70px;
    }
    
    .login-section {
        padding: 12px;
        margin-bottom: 20px;
    }
    
    .pet-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features {
        flex-direction: column;
        gap: 15px;
    }
    
    .feature-card {
        width: 100%;
    }
    
    .bottom-nav {
        padding: 10px 0;
    }
    
    .nav-item img {
        width: 22px;
        height: 22px;
    }
}

@media (min-width: 992px) {
    
    .pet-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 800px;
    }
    
    .ad-banner, .features {
        max-width: 800px;
    }
}

/* 动画类 */
.btn-active {
    transform: scale(0.96);
    background-color: #ff6b6b !important;
}

.card-active {
    transform: scale(0.98);
    background-color: rgba(255, 235, 235, 0.95) !important;
}

.nav-active {
    transform: scale(0.95);
    background-color: #ffeeee !important;
}

.pet-active {
    transform: scale(0.97);
    background-color: #ffeeee !important;
}

.pet-active img {
    transform: scale(1.05) !important;
}

@keyframes bounce {
    from { transform: translateY(0) rotate(-5deg); }
    to { transform: translateY(-5px) rotate(5deg); }
}

/* 大图预览模态框样式 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 3px solid white;
}

.close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    background: #ff8a8a;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.close-btn:hover {
    background: #ff6b6b;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


/* 新增悬浮登录框样式 - 与现有风格保持一致 */
.login-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.login-modal {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 138, 138, 0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.login-modal.active {
    transform: translateY(0);
}

.login-modal h2 {
    color: #ff8a8a;
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
}

.login-form-group {
    margin-bottom: 20px;
}

.login-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #5a3d3d;
    font-weight: bold;
}

.login-form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 138, 138, 0.3);
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.8);
}

.login-form-group input:focus {
    outline: none;
    border-color: #ff8a8a;
    box-shadow: 0 0 0 3px rgba(255, 138, 138, 0.2);
}

.login-submit-btn {
    width: 100%;
    padding: 12px;
    background-color: #ff8a8a;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-submit-btn:hover {
    background-color: #ff6b6b;
}

.login-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #ff8a8a;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-close-btn:hover {
    background-color: #ff6b6b;
    transform: rotate(90deg);
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    color: #888;
}

.login-footer a {
    color: #ff8a8a;
    text-decoration: none;
    font-weight: bold;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* 第三方登录按钮 */
.social-login {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    margin-right: 15px;
    border: 3px solid white;
    background-color: white;
}

.social-btn:hover {
    transform: translateY(-3px);
}

.social-btn img {
    width: 50px;
    height: 50px;
    object-fit: cover;

}

/* 今日首要日程模块 */
.top-schedule {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 15px;
    margin: 25px auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-width: 85%;
    border: 1px solid rgba(255, 138, 138, 0.1);
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.schedule-header h2 {
    font-size: 18px;
    color: #ff6b81;
    margin: 0;
}

.view-all {
    font-size: 14px;
    color: #ff8a8a;
    text-decoration: none;
    font-weight: bold;
}

.view-all:hover {
    text-decoration: underline;
}

.schedule-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 182, 193, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.schedule-time {
    min-width: 60px;
    font-weight: bold;
    color: #ff8a8a;
    font-size: 16px;
    padding-right: 15px;
    border-right: 2px dashed #ffb6c1;
}

.schedule-task {
    padding-left: 15px;
    flex-grow: 1;
    color: #5a3d3d;
}
