/* 多猫系统面板样式 */

.multi-cat-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.panel-content {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* 防止被父元素的样式影响 */
    box-sizing: border-box;
}

.panel-header {
    padding: 20px 30px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.panel-header h2 {
    margin: 0;
    color: white;
    font-size: 24px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.panel-tabs {
    display: flex;
    padding: 10px 20px 0;
    gap: 10px;
    flex-shrink: 0;
}

.tab-btn {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.tab-btn.active {
    background: white;
    color: #667eea;
    font-weight: bold;
}

.panel-body {
    flex: 1;
    background: white;
    padding: 30px;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 0 0 20px 20px;
    min-height: 0;
    /* 防止被父元素的样式影响 */
    box-sizing: border-box;
    position: relative;
}

/* 猫咪列表 */
.cat-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.cat-slot {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.cat-slot:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.cat-card {
    padding: 20px;
}

.cat-avatar {
    font-size: 60px;
    text-align: center;
    margin-bottom: 15px;
}

.cat-info h3 {
    margin: 0 0 10px;
    color: #333;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.active-badge {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.cat-info p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.specialty {
    color: #667eea !important;
    font-weight: bold;
}

.create-time {
    color: #999 !important;
    font-size: 12px !important;
}

.cat-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.cat-actions button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-switch {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-switch:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-detail {
    background: #f0f0f0;
    color: #333;
}

.btn-detail:hover {
    background: #e0e0e0;
}

.btn-scene-add {
    background: linear-gradient(135deg, #56ab2f, #a8e063);
    color: white;
}

.btn-scene-add:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(86, 171, 47, 0.4);
}

.btn-scene-remove {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
}

.btn-scene-remove:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.btn-scene-replace {
    background: linear-gradient(135deg, #fa709a, #fee140);
    color: white;
}

.btn-scene-replace:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(250, 112, 154, 0.4);
}

.scene-badge {
    background: linear-gradient(135deg, #fa709a, #fee140);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(250, 112, 154, 0.4);
}

/* 替换猫咪对话框样式 */
.replace-cat-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.replace-cat-item {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.replace-cat-item:hover {
    border-color: #667eea;
    background: #fff;
    transform: translateX(5px);
}

.replace-cat-item .cat-avatar {
    font-size: 40px;
    margin: 0;
}

.cat-info-inline {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cat-info-inline strong {
    font-size: 18px;
    color: #333;
}

.cat-info-inline span {
    font-size: 14px;
    color: #666;
}

.btn-replace-confirm {
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-replace-confirm:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-replace-confirm:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.empty-slot, .locked-slot {
    padding: 40px 20px;
    text-align: center;
}

.slot-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.empty-slot p, .locked-slot p {
    margin: 5px 0;
    color: #666;
}

.requirement {
    color: #999;
    font-size: 14px;
}

.btn-create, .btn-unlock {
    margin-top: 15px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-create:hover, .btn-unlock:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-unlock:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.locked-slot {
    opacity: 0.6;
}

/* 创建表单 */
.create-form {
    max-width: 500px;
    margin: 0 auto;
}

.create-form h3 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #333;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.color-picker {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.color-btn {
    width: 50px;
    height: 50px;
    border: 3px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.color-btn:hover {
    transform: scale(1.1);
    border-color: #667eea;
}

.form-group input[type="color"] {
    width: 100%;
    height: 50px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.form-actions button {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* 互动视图 */
.interact-view h3 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.cat-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.selector-group {
    flex: 1;
    max-width: 300px;
}

.selector-group label {
    display: block;
    margin-bottom: 10px;
    color: #333;
    font-weight: bold;
}

.selector-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
}

.selector-icon {
    font-size: 40px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.interaction-types {
    margin-bottom: 40px;
}

.interaction-types h4 {
    color: #333;
    margin-bottom: 20px;
}

.interaction-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 20px;
    margin-bottom: 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.interaction-btn:hover {
    border-color: #667eea;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.interaction-btn .icon {
    font-size: 36px;
}

.interaction-btn .name {
    flex: 1;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.interaction-btn .effect {
    color: #667eea;
    font-size: 14px;
}

.relationships-section h4 {
    color: #333;
    margin-bottom: 20px;
}

.relationships-list {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 20px;
}

.relationship-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.relationship-item:last-child {
    margin-bottom: 0;
}

.rel-cats {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
}

.rel-icon {
    color: #ff6b9d;
}

.rel-info {
    margin-bottom: 10px;
}

.intimacy-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.intimacy-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.5s;
}

.intimacy-label {
    font-size: 14px;
    color: #667eea;
    font-weight: bold;
}

.rel-stats {
    font-size: 12px;
    color: #999;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state p {
    color: #666;
    font-size: 18px;
    margin-bottom: 10px;
}

/* 提示消息 */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 15px 25px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    font-weight: bold;
    z-index: 10001;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    border-left: 4px solid #4caf50;
    color: #4caf50;
}

.toast-error {
    border-left: 4px solid #f44336;
    color: #f44336;
}

.toast-info {
    border-left: 4px solid #2196f3;
    color: #2196f3;
}

/* 响应式 - 移动端优化 */
@media (max-width: 768px) {
    /* 主面板 - 确保充满视口但有安全距离 */
    .multi-cat-panel {
        padding: 5px;
        align-items: flex-start;
        padding-top: 10px;
        /* 禁止页面滚动 */
        position: fixed;
        overflow: hidden;
    }
    
    /* 主面板容器 - 关键修复 */
    .panel-content {
        width: calc(100vw - 10px) !important;
        max-width: calc(100vw - 10px) !important;
        height: calc(100vh - 20px) !important;
        max-height: calc(100vh - 20px) !important;
        border-radius: 12px;
        /* 确保子元素正确布局 */
        display: flex !important;
        flex-direction: column !important;
        margin: 0 auto;
        overflow: hidden !important;
        box-sizing: border-box !important;
        /* 防止被其他样式覆盖 */
        padding: 0 !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
    }
    
    /* 头部 - 固定高度 */
    .panel-header {
        padding: 10px 12px !important;
        flex-shrink: 0 !important;
        min-height: auto;
        box-sizing: border-box;
    }
    
    .panel-header h2 {
        font-size: 16px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.3;
    }
    
    .close-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 18px !important;
        flex-shrink: 0;
        line-height: 1;
    }
    
    /* 标签页 - 固定高度,横向滚动 */
    .panel-tabs {
        padding: 6px 8px 0 !important;
        gap: 4px !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE 10+ */
        flex-shrink: 0 !important;
        box-sizing: border-box;
    }
    
    .panel-tabs::-webkit-scrollbar {
        display: none; /* Chrome Safari */
    }
    
    .tab-btn {
        padding: 8px 12px !important;
        font-size: 13px !important;
        white-space: nowrap;
        flex-shrink: 0;
        min-width: fit-content;
        /* 增加触摸区域 */
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    /* 面板主体 - 关键修复:设置为flex布局并允许滚动 */
    .panel-body {
        padding: 12px 8px !important;
        /* 允许内容区域扩展并滚动 */
        flex: 1 1 auto !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        /* 改善滚动性能 */
        -webkit-overflow-scrolling: touch;
        /* 最小高度确保有滚动空间 */
        min-height: 0 !important;
        /* 确保有足够的空间滚动 */
        height: 1px;
        box-sizing: border-box !important;
        position: relative;
    }
    
    /* 猫咪列表 - 单列显示 */
    .cat-list {
        grid-template-columns: 1fr;
        gap: 12px;
        padding-bottom: 20px;
    }
    
    /* 猫咪卡片优化 */
    .cat-slot {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        border-radius: 12px;
    }
    
    .cat-slot:active {
        transform: scale(0.98);
    }
    
    .cat-card {
        padding: 12px;
    }
    
    .cat-avatar {
        font-size: 40px;
        margin-bottom: 10px;
    }
    
    .cat-info h3 {
        font-size: 15px;
        flex-wrap: wrap;
        line-height: 1.4;
        margin-bottom: 8px;
        gap: 6px;
    }
    
    .cat-info p {
        font-size: 12px;
        line-height: 1.5;
        margin: 4px 0;
    }
    
    /* 徽章适配 */
    .active-badge,
    .scene-badge {
        font-size: 10px;
        padding: 2px 6px;
        margin-top: 2px;
        display: inline-block;
    }
    
    /* 按钮布局优化 - 确保两列显示 */
    .cat-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        margin-top: 10px;
    }
    
    .cat-actions button {
        padding: 8px 6px;
        font-size: 12px;
        min-height: 40px;
        /* 确保触摸友好 */
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        line-height: 1.2;
        border-radius: 6px;
    }
    
    /* 特殊情况：只有一个按钮时占满整行 */
    .cat-actions button:only-child {
        grid-column: 1 / -1;
    }
    
    /* 空槽位和锁定槽位 */
    .empty-slot, .locked-slot {
        padding: 24px 12px;
        text-align: center;
    }
    
    .slot-icon {
        font-size: 40px;
        margin-bottom: 10px;
    }
    
    .empty-slot p, .locked-slot p {
        font-size: 13px;
        margin: 4px 0;
        line-height: 1.4;
    }
    
    .requirement {
        font-size: 12px;
        line-height: 1.4;
        color: #999;
        margin-top: 6px;
    }
    
    .btn-create, .btn-unlock {
        min-height: 40px;
        font-size: 13px;
        padding: 8px 16px;
        margin-top: 10px;
        border-radius: 6px;
    }
    
    /* 创建表单优化 */
    .create-form {
        max-width: 100%;
        padding-bottom: 20px;
    }
    
    .create-form h3 {
        font-size: 18px;
        margin-bottom: 16px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .form-group input[type="text"],
    .form-group select {
        padding: 10px;
        font-size: 16px; /* 防止iOS自动缩放 */
        min-height: 40px;
        border-radius: 6px;
        -webkit-appearance: none;
        appearance: none;
        box-sizing: border-box;
    }
    
    /* 颜色选择器优化 */
    .color-picker {
        display: flex;
        gap: 6px;
        margin-bottom: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }
    
    .color-btn {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
        border-width: 2px;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .form-group input[type="color"] {
        min-height: 40px;
        border-radius: 6px;
    }
    
    /* 投骰子按钮优化 */
    .btn-roll-traits {
        min-height: 44px !important;
        font-size: 14px !important;
        margin-bottom: 10px !important;
        padding: 10px !important;
    }
    
    #createTraitsDisplay {
        font-size: 12px !important;
        padding: 10px !important;
        line-height: 1.4;
        min-height: 80px;
    }
    
    /* 表单操作按钮 */
    .form-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-top: 20px;
    }
    
    .form-actions button {
        padding: 12px;
        font-size: 14px;
        min-height: 44px;
        border-radius: 6px;
    }
    
    /* 互动视图优化 */
    .interact-view h3 {
        font-size: 18px;
        margin-bottom: 16px;
    }
    
    .cat-selector {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 24px;
    }
    
    .selector-group {
        width: 100%;
        max-width: 100%;
    }
    
    .selector-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .selector-group select {
        font-size: 16px;
        padding: 10px;
        min-height: 40px;
    }
    
    .selector-icon {
        transform: rotate(90deg);
        font-size: 28px;
    }
    
    /* 互动按钮 */
    .interaction-types h4 {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .interaction-btn {
        padding: 12px 10px;
        margin-bottom: 10px;
        min-height: 56px;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        border-radius: 10px;
    }
    
    .interaction-btn .icon {
        font-size: 28px;
        flex-shrink: 0;
    }
    
    .interaction-btn .name {
        font-size: 14px;
        line-height: 1.3;
    }
    
    .interaction-btn .effect {
        font-size: 11px;
        text-align: right;
        flex-shrink: 0;
    }
    
    /* 关系列表 */
    .relationships-section h4 {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .relationships-list {
        padding: 10px;
    }
    
    .relationship-item {
        padding: 10px;
        margin-bottom: 10px;
        border-radius: 8px;
    }
    
    .rel-cats {
        font-size: 13px;
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .rel-info {
        margin-bottom: 6px;
    }
    
    .intimacy-label {
        font-size: 12px;
    }
    
    .rel-stats {
        font-size: 11px;
    }
    
    /* 详情弹窗优化 */
    .cat-detail-dialog {
        padding: 5px;
        align-items: flex-start;
        padding-top: 10px;
        overflow: hidden;
    }
    
    .dialog-content {
        width: calc(100vw - 10px) !important;
        max-width: calc(100vw - 10px) !important;
        height: calc(100vh - 20px) !important;
        max-height: calc(100vh - 20px) !important;
        border-radius: 12px;
        display: flex !important;
        flex-direction: column !important;
        margin: 0 auto;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    
    .dialog-header {
        padding: 10px 12px !important;
        flex-shrink: 0 !important;
        box-sizing: border-box;
    }
    
    .dialog-header h2 {
        font-size: 16px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1;
        min-width: 0;
    }
    
    .dialog-body {
        padding: 12px 10px !important;
        flex: 1 1 auto !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        min-height: 0 !important;
        height: 1px;
        padding-bottom: 20px !important;
        box-sizing: border-box !important;
    }
    
    .detail-section {
        margin-bottom: 20px;
    }
    
    .detail-section h3 {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .detail-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 8px;
    }
    
    .detail-item {
        padding: 10px;
        border-radius: 8px;
    }
    
    .detail-item .label {
        font-size: 10px;
    }
    
    .detail-item .value {
        font-size: 14px;
    }
    
    /* 属性条 */
    .stat-label {
        font-size: 12px;
    }
    
    .stat-progress {
        height: 16px;
        border-radius: 8px;
    }
    
    /* 替换猫咪对话框 */
    .replace-cat-list {
        gap: 10px;
    }
    
    .replace-cat-item {
        padding: 10px;
        border-radius: 10px;
    }
    
    .replace-cat-item .cat-avatar {
        font-size: 32px;
    }
    
    .cat-info-inline strong {
        font-size: 14px;
    }
    
    .cat-info-inline span {
        font-size: 12px;
    }
    
    .btn-replace-confirm {
        padding: 8px 14px;
        font-size: 12px;
        min-height: 40px;
        white-space: nowrap;
    }
    
    /* 空状态 */
    .empty-state {
        padding: 40px 12px;
    }
    
    .empty-state p {
        font-size: 14px;
        line-height: 1.5;
        margin: 8px 0;
    }
    
    .empty-state button {
        margin-top: 16px;
    }
    
    /* 提示消息 */
    .toast {
        right: 5px;
        left: 5px;
        top: 60px;
        padding: 10px 12px;
        font-size: 12px;
        max-width: calc(100vw - 10px);
        word-wrap: break-word;
    }
    
    /* 滚动条优化 - 隐藏但保留功能 */
    .panel-body::-webkit-scrollbar,
    .dialog-body::-webkit-scrollbar {
        width: 3px;
    }
    
    .panel-body::-webkit-scrollbar-track,
    .dialog-body::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .panel-body::-webkit-scrollbar-thumb,
    .dialog-body::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.2);
        border-radius: 2px;
    }
}

/* 超小屏幕优化 (小于 480px) */
@media (max-width: 480px) {
    .panel-header h2 {
        font-size: 15px;
    }
    
    .close-btn {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    
    .tab-btn {
        padding: 7px 10px;
        font-size: 12px;
    }
    
    .cat-info h3 {
        font-size: 14px;
    }
    
    .cat-info p {
        font-size: 11px;
    }
    
    .cat-actions button {
        font-size: 11px;
        padding: 7px 5px;
        min-height: 38px;
    }
    
    .form-group label {
        font-size: 12px;
    }
    
    .interaction-btn .icon {
        font-size: 24px;
    }
    
    .interaction-btn .name {
        font-size: 13px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .slot-icon {
        font-size: 36px;
    }
    
    .cat-avatar {
        font-size: 36px;
    }
}

/* 猫咪详情弹窗 */
.cat-detail-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dialog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.dialog-content {
    position: relative;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dialog-header {
    padding: 20px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.dialog-header h2 {
    margin: 0;
    font-size: 24px;
}

.dialog-body {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.detail-section {
    margin-bottom: 30px;
}

.detail-section:last-child {
    margin-bottom: 0;
}

.detail-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 8px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.detail-item {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item .label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
}

.detail-item .value {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-preview {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
}

.stat-bars {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-bar {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-label {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #333;
    font-weight: bold;
}

.stat-progress {
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 10px;
}
