* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #0d0d1a 0%, #1a1a2e 100%);
    min-height: 100vh;
    color: #fff;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 10px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.team-name-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-name-input label {
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
}

.team-name-input input {
    padding: 8px 15px;
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 14px;
    width: 200px;
    transition: all 0.3s ease;
}

.team-name-input input:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.team-name-input input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.header h1 {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #00ff88 0%, #0066ff 50%, #0a0a1a 100%);
    color: #fff;
    border: 1px solid rgba(0, 255, 136, 0.5);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3), inset 0 0 10px rgba(0, 255, 136, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #00ffaa 0%, #0088ff 50%, #0f0f2a 100%);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5), 0 0 40px rgba(0, 102, 255, 0.3), inset 0 0 15px rgba(0, 255, 136, 0.2);
}

.btn-secondary {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1), inset 0 0 10px rgba(255, 255, 255, 0.05);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #2a2a4e 0%, #263056 50%, #1f4470 100%);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2), inset 0 0 15px rgba(255, 255, 255, 0.1);
}

.section {
    margin-bottom: 10px;
}

.compact-section {
    margin-bottom: 4px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.section-header h2 {
    font-size: 16px;
    font-weight: bold;
}

.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-bar select,
.filter-bar input {
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 12px;
}

.filter-bar select option {
    background: #1a1a2e;
    color: #fff;
}

.filter-bar input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.char-slots, .card-slots {
    display: flex;
    justify-content: space-between;
    gap: 2px;
    margin-bottom: 0;
}

.char-slot-wrapper {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lane-display {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    cursor: pointer;
    gap: 4px;
}

.lane-display[data-char="1"],
.lane-display[data-char="3"],
.lane-display[data-char="5"] {
    cursor: default;
}

.lane-btn {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.lane-display:not([data-char="1"]):not([data-char="3"]):not([data-char="5"]):hover .lane-btn {
    transform: scale(1.1);
}

.lane-text {
    font-size: 15px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.8);
}

/* 宠物槽位包装器 */
.pet-slot-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* 宠物位置选择器（固定，不可切换） */
.pet-lane-selector {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    cursor: default;
}

.pet-lane-selector .lane-icons {
    width: 28px;
    height: 16px;
}

.pet-lane-selector .lane-icons img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pet-lane-selector .lane-text {
    font-size: 11px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.7);
}

.pet-slots {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 15px;
}

.char-slot, .card-slot {

    width: 190px;
    height: 250px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.pet-slot {
    width: 100px;
    height: 125px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.char-slot:hover, .card-slot:hover, .pet-slot:hover {
    border-color: rgba(255, 107, 107, 0.5);
    background: rgba(255, 255, 255, 0.03);
}

.char-slot.selected, .card-slot.selected, .pet-slot.selected {
    border-color: #ff6b6b;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

.card-slot.drag-over {
    border-color: #00ff88;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
    background: rgba(0, 255, 136, 0.1);
}

.pet-slot.drag-over {
    border-color: #ffaa00;
    box-shadow: 0 0 15px rgba(255, 170, 0, 0.5);
    background: rgba(255, 170, 0, 0.1);
}

.slot-content {
    width: 100%;
    height: 100%;
    position: relative;
}

.slot-label {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 25px;
    height: 25px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
}

.char-card, .card-item, .pet-card {
    width: 100%;
    height: 100%;
    position: relative;
}

.card-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.char-card .bg-star {
    position: absolute;
    width: 95%;
    height: 95%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: contain;
    border-radius: 8px;
}

.pet-card .bg-star {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
}

.char-card .char-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 86%;
    height: 86%;
    object-fit: contain;
    z-index: 1;
}

.pet-card .pet-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    object-fit: contain;
    z-index: 1;
}

.char-card .char-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.8);
    text-align: center;
    font-size: 15px;
    font-weight: bold;
    z-index: 1;
}

.card-item .card-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: rgba(0, 0, 0, 0.8);
    text-align: center;
    font-size: 15px;
    font-weight: bold;
    z-index: 1;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pet-card .pet-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 5px;
    background: rgba(0, 0, 0, 0.8);
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    z-index: 1;
}

.char-card .class-icon,
.char-card .element-icon {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 1;
}

.char-card .element-icon {
    top: 40px;
    left: 15px;
}

.pet-card .class-icon,
.pet-card .element-icon {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 1;
}

.pet-card .element-icon {
    top: 25px;
    left: 10px;
}

.char-card .remove-btn, .pet-card .remove-btn, .card-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: rgba(255, 0, 0, 0.8);
    border-radius: 50%;
    border: none;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    z-index: 2;
    display: none;
}

.pet-card .remove-btn {
    width: 16px;
    height: 16px;
    font-size: 10px;
}

/* 鼠标悬停时显示删除按钮 */
.char-slot:hover .char-card .remove-btn,
.pet-slot:hover .pet-card .remove-btn,
.card-slot:hover .card-item .remove-btn {
    display: block;
}

.eqm-grid {
    display: flex;
    justify-content: space-between;
    gap: 4px;
}

.eqm-char {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    padding: 4px;
}

.eqm-slots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

.eqm-slot {
    aspect-ratio: 1;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.eqm-slot:hover {
    border-color: rgba(255, 107, 107, 0.5);
}

.eqm-slot img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bottom-section {
    display: flex;
    gap: 20px;
}

.pet-panel {
    flex: 0 0 auto;
    width: 340px;
}

.pet-section {
    height: 200px;
}

.axis-note-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 技能轴区域 */
.skill-axis-section {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 10px;
}

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

.axis-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-axis-control {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-axis-control:hover {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 50%, #1a1a2e 100%);
    border-color: #00ff88;
}

#axis-count {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    min-width: 20px;
    text-align: center;
}

.skill-axes-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skill-axis {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    flex-wrap: wrap;
}

.axis-label {
    display: none;
}

.axis-chars {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.axis-char-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.axis-char-select-wrapper {
    display: flex;
    align-items: center;
}

.axis-char-select {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 11px;
    padding: 3px 4px;
    cursor: pointer;
    min-width: 60px;
    max-width: 80px;
    white-space: nowrap;
    text-align: center;
}

.axis-char-select:hover {
    border-color: #00ff88;
}

.axis-char-select option {
    background: #1a1a2e;
    color: #fff;
}

.axis-arrow {
    color: rgba(255, 255, 255, 0.3);
    font-size: 16px;
}

.axis-timer {
    width: 50px;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    font-size: 10px;
    text-align: center;
}

.axis-timer::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.axis-char-remove {
    width: 18px;
    height: 18px;
    background: rgba(255, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.axis-char-remove:hover {
    background: rgba(255, 0, 0, 0.9);
}

.axis-add-char {
    width: 40px;
    height: 40px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.3);
    font-size: 20px;
    transition: all 0.3s ease;
}

.axis-add-char:hover {
    border-color: #00ff88;
    color: #00ff88;
    background: rgba(0, 255, 136, 0.05);
}

.note-section {
    flex: 1;
}

#note-input {
    width: 100%;
    height: 80px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    resize: none;
}

#note-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    background: rgba(20, 20, 40, 0.98);
    margin: 5% auto;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 90%;
    max-width: 1000px;
    max-height: 80vh;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

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

.modal-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    margin-bottom: 15px;
}

.modal-filter select,
.modal-filter input {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 13px;
}

.modal-filter select option {
    background: #1a1a2e;
    color: #fff;
}

.modal-filter input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #fff;
}

.modal-body {
    max-height: 60vh;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.modal-item {
    text-align: center;
    cursor: pointer;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.modal-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.modal-item img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 8px;
}

.modal-item p {
    font-size: 12px;
    font-weight: bold;
}

.modal-item.selected-item {
    background: rgba(0, 255, 136, 0.2);
    border: 2px solid #00ff88;
    cursor: not-allowed;
}

.modal-item.selected-item:hover {
    background: rgba(0, 255, 136, 0.2);
    transform: none;
}

.modal-item.selected-item img {
    opacity: 0.6;
    filter: grayscale(30%);
}

.selected-badge {
    display: inline-block;
    margin-top: 5px;
    padding: 2px 8px;
    background: #00ff88;
    color: #000;
    font-size: 11px;
    font-weight: bold;
    border-radius: 10px;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 10px;
    }

    .char-slots, .card-slots, .eqm-grid {
        flex-wrap: wrap;
    }

    .char-slot, .card-slot {
        flex: 0 0 calc(45% - 8px);
    }

    .eqm-char {
        flex: 0 0 calc(45% - 8px);
    }

    .pet-note-panel {
        flex-direction: column;
    }

    .pet-section {
        width: 100%;
    }

    .pet-slots {
        justify-content: space-between;
    }

    .pet-slot {
        flex: 1;
        max-width: 100px;
    }
}