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

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    padding: 20px;
    position: relative;
}

/* 背景动画效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 107, 107, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(78, 205, 196, 0.2) 0%, transparent 50%);
    z-index: -1;
    animation: bgAnimation 20s ease-in-out infinite;
}

@keyframes bgAnimation {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 25px 30px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

header h1 {
    color: #1a1a2e;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 1px;
    position: relative;
}

header h1::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #e94560, #7879c8);
    border-radius: 2px;
}

.btn-manage {
    padding: 14px 28px;
    background: linear-gradient(135deg, #e94560 0%, #7879c8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-manage::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn-manage:hover::before {
    left: 100%;
}

.btn-manage:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.5);
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.platform-btn {
    padding: 35px 25px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.platform-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #e94560, #7879c8, #4ecdc4);
    opacity: 0;
    transition: opacity 0.3s;
}

.platform-btn:hover::before {
    opacity: 1;
}

.platform-btn:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(233, 69, 96, 0.3);
    background: linear-gradient(135deg, #e94560 0%, #7879c8 100%);
    color: white;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 25px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    position: relative;
}

.modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #e94560, #7879c8, #4ecdc4);
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
}

.btn-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s;
}

.btn-close:hover {
    background: rgba(233, 69, 96, 0.8);
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    max-height: calc(85vh - 90px);
}

/* 添加平台表单 */
.add-platform-form {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    padding: 20px;
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.05) 0%, rgba(78, 205, 196, 0.05) 100%);
    border-radius: 15px;
    border: 1px solid rgba(233, 69, 96, 0.1);
}

.add-platform-form input {
    flex: 1;
    min-width: 150px;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s;
    background: white;
}

.add-platform-form input:focus {
    outline: none;
    border-color: #e94560;
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.btn-add {
    padding: 14px 28px;
    background: linear-gradient(135deg, #e94560 0%, #7879c8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
}

/* 表格样式 */
.platforms-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.platforms-table th,
.platforms-table td {
    padding: 15px 18px;
    text-align: left;
}

.platforms-table th {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    font-weight: 600;
    color: white;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.platforms-table tr {
    background: white;
    transition: all 0.3s;
}

.platforms-table tr:nth-child(even) {
    background: #f8f9fa;
}

.platforms-table tr:hover {
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.05) 0%, rgba(78, 205, 196, 0.05) 100%);
}

.platforms-table td {
    color: #555;
    border-bottom: 1px solid #eee;
}

.btn-edit,
.btn-delete {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    margin-right: 8px;
    transition: all 0.3s;
}

.btn-edit {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(78, 205, 196, 0.3);
}

.btn-delete {
    background: linear-gradient(135deg, #e94560 0%, #c73659 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(233, 69, 96, 0.3);
}

.btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.4);
}

.btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.4);
}

/* 编辑表单 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a1a2e;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: #e94560;
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn-save,
.btn-cancel {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-save {
    background: linear-gradient(135deg, #e94560 0%, #7879c8 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

.btn-cancel {
    background: #e0e0e0;
    color: #555;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
}

.btn-cancel:hover {
    background: #d0d0d0;
    transform: translateY(-2px);
}

/* 标签页样式 */
.tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    padding: 5px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 15px;
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: rgba(233, 69, 96, 0.1);
    color: #e94560;
}

.tab-btn.active {
    background: linear-gradient(135deg, #e94560 0%, #7879c8 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-content.active {
    display: block;
}

/* 大弹窗 */
.modal-content.modal-large {
    max-width: 850px;
}

/* 排序提示 */
.sort-hint {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
    padding: 15px;
    background: rgba(78, 205, 196, 0.1);
    border-radius: 10px;
    border-left: 4px solid #4ecdc4;
}

/* 可拖拽列表 */
.sortable-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.03) 0%, rgba(78, 205, 196, 0.03) 100%);
    border-radius: 15px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.sortable-item {
    display: flex;
    align-items: center;
    padding: 18px 25px;
    background: white;
    border: 2px solid transparent;
    border-radius: 15px;
    cursor: move;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.sortable-item:hover {
    border-color: #e94560;
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.2);
    transform: translateX(5px);
}

.sortable-item.dragging {
    opacity: 0.6;
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border-color: #7879c8;
}

.sortable-item.drag-over {
    border-color: #4ecdc4;
    border-style: dashed;
    background: rgba(78, 205, 196, 0.1);
}

.sort-handle {
    margin-right: 18px;
    color: #999;
    font-size: 22px;
    cursor: grab;
    transition: color 0.3s;
}

.sortable-item:hover .sort-handle {
    color: #e94560;
}

.sort-handle:active {
    cursor: grabbing;
}

.sort-number {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #e94560 0%, #7879c8 100%);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    margin-right: 18px;
    box-shadow: 0 3px 10px rgba(233, 69, 96, 0.3);
}

.sort-name {
    flex: 1;
    font-weight: 600;
    color: #1a1a2e;
    font-size: 15px;
}

.sort-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
}

.sort-actions .btn-save,
.sort-actions .btn-cancel {
    flex: 0 0 auto;
    min-width: 140px;
}

/* 密码相关样式 */
.password-modal .modal-content {
    max-width: 420px;
}

.password-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin: 15px 0;
    box-sizing: border-box;
    transition: all 0.3s;
    background: white;
}

.password-input:focus {
    outline: none;
    border-color: #e94560;
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

.password-error {
    color: #e94560;
    font-size: 14px;
    margin-top: 8px;
    display: none;
    padding: 10px;
    background: rgba(233, 69, 96, 0.1);
    border-radius: 8px;
    border-left: 3px solid #e94560;
}

.password-success {
    color: #4ecdc4;
    font-size: 14px;
    margin-top: 15px;
    text-align: center;
    padding: 10px;
    background: rgba(78, 205, 196, 0.1);
    border-radius: 8px;
    border-left: 3px solid #4ecdc4;
}

.password-form {
    max-width: 400px;
}

.password-section {
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.03) 0%, rgba(78, 205, 196, 0.03) 100%);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 1px solid rgba(233, 69, 96, 0.1);
}

.password-section h3 {
    color: #1a1a2e;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
}

.password-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #e94560, #7879c8);
    border-radius: 2px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .platforms-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    
    .platform-btn {
        padding: 25px 18px;
        font-size: 16px;
        border-radius: 15px;
    }
    
    header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 20px;
        border-radius: 15px;
    }
    
    header h1 {
        font-size: 24px;
    }
    
    header h1::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .add-platform-form {
        flex-direction: column;
        padding: 15px;
    }
    
    .platforms-table {
        font-size: 13px;
    }
    
    .platforms-table th,
    .platforms-table td {
        padding: 10px 12px;
    }
    
    .btn-edit,
    .btn-delete {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .modal-content {
        border-radius: 20px;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #e94560 0%, #7879c8 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #c73659 0%, #5a5a9a 100%);
}
