/* ===== 按钮样式 ===== */
.btn-primary {
    background: linear-gradient(135deg, #1f6feb, #388bfd);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #388bfd, #58a6ff);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(88,166,255,0.3);
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--accent-blue);
}

.btn-danger {
    background: linear-gradient(135deg, #b91c1c, #ef4444);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ef4444, #f87171);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #166534, #22c55e);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #22c55e, #4ade80);
    transform: translateY(-1px);
}

.btn-success:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-large {
    padding: 12px 32px;
    font-size: 15px;
    border-radius: var(--radius-lg);
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.btn-close:hover {
    color: var(--accent-red);
    background: rgba(248,81,73,0.1);
}

/* ===== 宠物网格 ===== */
.pet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.pet-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.pet-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--rarity-color, var(--rarity-common));
}

.pet-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--rarity-color, var(--rarity-common));
}

.pet-card.selected {
    border-color: var(--accent-blue);
    background: rgba(88,166,255,0.05);
}

.pet-card.busy {
    opacity: 0.7;
}

.pet-avatar {
    font-size: 40px;
    text-align: center;
    margin-bottom: 8px;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.pet-name {
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.pet-level {
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.pet-rarity {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 6px;
    display: inline-block;
    width: 100%;
}

.pet-stats-mini {
    display: flex;
    justify-content: space-around;
    font-size: 11px;
    color: var(--text-secondary);
}

.pet-status-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 14px;
    background: var(--bg-dark);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pet-exp-bar {
    height: 3px;
    background: var(--border-color);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.pet-exp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
    border-radius: 2px;
    transition: width 0.3s;
}

/* 稀有度颜色 */
.rarity-common { --rarity-color: var(--rarity-common); color: var(--rarity-common); }
.rarity-uncommon { --rarity-color: var(--rarity-uncommon); color: var(--rarity-uncommon); }
.rarity-rare { --rarity-color: var(--rarity-rare); color: var(--rarity-rare); }
.rarity-epic { --rarity-color: var(--rarity-epic); color: var(--rarity-epic); }
.rarity-legendary { --rarity-color: var(--rarity-legendary); color: var(--rarity-legendary); }

/* ===== 宠物详情面板 ===== */
.detail-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-top: 8px;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.detail-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.pet-detail-grid {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.pet-detail-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.detail-section {
    background: var(--bg-panel);
    border-radius: var(--radius);
    padding: 12px;
}

.detail-section h4 {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 13px;
}

.stat-label {
    color: var(--text-secondary);
}

.stat-value {
    color: var(--text-primary);
    font-weight: 600;
}

.stat-bar-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
}

.stat-bar {
    flex: 1;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s;
}

.skill-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin: 2px;
    border: 1px solid;
}

.trait-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin: 2px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}
