/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 导航栏 */
.navbar {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 15px 0;
    margin-bottom: 30px;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.navbar-brand {
    font-size: 24px;
    font-weight: bold;
    color: #4a90e2;
}

.navbar-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-item {
    color: #666;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav-item:hover, .nav-item.active {
    background: #4a90e2;
    color: #fff;
}

/* 页面标题 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 32px;
    color: #333;
}

/* 按钮 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #4a90e2;
    color: #fff;
}

.btn-primary:hover {
    background: #357abd;
}

.btn-secondary {
    background: #95a5a6;
    color: #fff;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-block {
    width: 100%;
}

.btn-danger {
    background: #e74c3c;
    color: #fff;
}

.btn-danger:hover {
    background: #c0392b;
}

/* 认证页面 */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.auth-box {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.auth-title {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 28px;
}

.auth-form {
    margin-bottom: 20px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.auth-footer a {
    color: #4a90e2;
    text-decoration: none;
    margin-left: 5px;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4a90e2;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
}

.photo-preview {
    margin-top: 10px;
}

.photo-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* 宠物卡片网格 */
.pet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.pet-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.pet-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.pet-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.pet-card-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.pet-card-badge {
    background: #4a90e2;
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
}

.pet-card-photo {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.pet-card-info {
    margin-bottom: 15px;
}

.pet-card-info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.pet-card-info-item:last-child {
    border-bottom: none;
}

.pet-card-info-label {
    color: #666;
}

.pet-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.pet-card-actions .btn {
    flex: 1;
    padding: 8px;
    font-size: 13px;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    overflow: auto;
}

.modal-content {
    background: #fff;
    margin: 50px auto;
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

/* 消息提示 */
.message {
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: none;
}

.message.show {
    display: block;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 证件预览 */
.certificate-preview {
    text-align: center;
    margin: 20px 0;
}

.certificate-preview img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* 移动端导航栏 */
.navbar-toggle {
    display: none;
    background: #4a90e2;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 8px 12px;
    line-height: 1;
    min-width: 40px;
    height: 40px;
    transition: background 0.3s;
}

.navbar-toggle:hover {
    background: #357abd;
}

.navbar-toggle:active {
    background: #2a5f8f;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar-toggle {
        display: block;
    }
    
    .navbar .container {
        flex-wrap: wrap;
        padding: 10px 15px;
    }
    
    .navbar-brand {
        font-size: 18px;
        flex: 1;
    }
    
    .navbar-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid #eee;
    }
    
    .navbar-menu.active {
        display: flex;
    }
    
    .navbar-menu .nav-item {
        padding: 12px 15px;
        border-bottom: 1px solid #f5f5f5;
        width: 100%;
        text-align: left;
    }
    
    .navbar-menu .nav-item:last-child {
        border-bottom: none;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .pet-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .container {
        padding: 15px;
    }
    
    .pet-card {
        padding: 15px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .pet-card-info-item {
        padding: 12px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .pet-card-info-label {
        font-weight: 600;
        color: #666;
        margin-bottom: 5px;
    }
    
    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 20px auto;
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    h2 {
        font-size: 20px;
    }
    
    h3 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .navbar-brand {
        font-size: 16px;
    }
    
    .page-header h1 {
        font-size: 20px;
    }
    
    .container {
        padding: 10px;
    }
    
    .pet-card {
        padding: 12px;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 13px;
    }
}
