/* 全局通用样式 */
* {
    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: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0d1b2a 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: linear-gradient(145deg, #1a1f3a 0%, #0d1b2a 100%);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 150, 255, 0.15), inset 0 0 100px rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    padding-top: 10px;
    border-bottom: 3px solid #1e3c72;
    position: relative;
}

.header h1 {
    color: #ffffff;
    font-size: 32px;
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(100, 200, 255, 0.5);
    font-weight: 300;
    letter-spacing: 2px;
}

.header p {
    color: #b0bec5;
    font-size: 18px;
    margin-top: 8px;
}

/* 消息提示样式 */
.flash-messages {
    margin-bottom: 20px;
}

.flash {
    padding: 15px 25px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border-left: 5px solid;
    position: relative;
    animation: slideIn 0.5s ease-out;
}

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

.flash.success,
.flash-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(22, 163, 74, 0.2) 100%);
    color: #4ade80;
    border-left: 4px solid #4ade80;
    border-radius: 6px;
    font-weight: 600;
}

.flash.error,
.flash-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.2) 100%);
    color: #f87171;
    border-left: 4px solid #f87171;
    border-radius: 6px;
    font-weight: 600;
}

.flash.warning,
.flash-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.2) 100%);
    color: #fbbf24;
    border-left: 4px solid #fbbf24;
    border-radius: 6px;
    font-weight: 600;
}

/* 导航标签样式 */
.nav-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.nav-tab {
    padding: 10px 20px;
    background: rgba(30, 60, 114, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    color: #b0bec5;
    font-weight: 500;
    transition: all 0.3s;
}

.nav-tab:hover {
    background: #1e3c72;
    color: white;
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.3);
}

.nav-tab.active {
    background: #1e3c72;
    color: white;
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.3);
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

th {
    background: #1e3c72;
    color: white;
    font-weight: 500;
}

tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2a5298 0%, #3662a8 100%);
    box-shadow: 0 6px 20px rgba(30, 60, 114, 0.5);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #b0bec5;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    background: rgba(13, 27, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 14px;
    color: #ffffff;
}

.form-control:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.2);
}

/* 卡片样式 */
.card {
    background: rgba(26, 31, 58, 0.6);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-title {
    color: #ffffff;
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: 500;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.page-link {
    padding: 8px 16px;
    background: rgba(30, 60, 114, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    text-decoration: none;
    color: #b0bec5;
    transition: all 0.3s;
}

.page-link:hover,
.page-link.active {
    background: #1e3c72;
    color: white;
    border-color: #1e3c72;
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.3);
}

/* 比赛卡片样式 */
.match-card {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.match-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.match-info .player-name {
    flex: 1;
    text-align: center;
    padding: 10px 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    min-width: 0;
    word-break: break-all;
}

.player-name {
    font-size: 18px;
    font-weight: 500;
    padding: 10px 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
}

.winner-name {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.3) 0%, rgba(56, 142, 60, 0.4) 100%);
    color: #81c784;
    font-weight: 600;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.3);
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.loser-name {
    background: rgba(255, 255, 255, 0.05);
    color: #78909c;
    opacity: 0.7;
}

.vs {
    font-size: 24px;
    font-weight: bold;
    color: #64b5f6;
    flex-shrink: 0;
    min-width: 40px;
    text-align: center;
}

.match-result {
    text-align: center;
    margin-top: 10px;
    font-size: 20px;
    font-weight: bold;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.badge-success {
    background: #28a745;
    color: white;
}

.badge-danger {
    background: #dc3545;
    color: white;
}

.badge-warning {
    background: #ffc107;
    color: #212529;
}

/* 退出按钮样式 */
.logout-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(220, 53, 69, 0.2);
    color: #ef5350;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    border: 1px solid rgba(220, 53, 69, 0.3);
    transition: all 0.3s;
}

.logout-btn:hover {
    background: rgba(220, 53, 69, 0.3);
    box-shadow: 0 0 15px rgba(220, 53, 69, 0.4);
}

/* 职业图标样式 */
.class-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(145deg, #1a1f3a 0%, #0d1b2a 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s;
}

.class-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.class-icon img {
    width: 35px;
    height: 35px;
    border-radius: 3px;
}

.class-icon.banned {
    opacity: 0.5;
    filter: grayscale(100%);
    border: 2px solid #f44336;
}

.class-icon.available {
    opacity: 1;
    filter: grayscale(0%);
    border: 2px solid #4caf50;
}

/* 卡组详情模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
}

.modal-content {
    max-width: 500px;
    margin: 50px auto;
    background: linear-gradient(145deg, #1a1f3a 0%, #0d1b2a 100%);
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #00bcd4;
    box-shadow: 0 20px 60px rgba(0, 188, 212, 0.3);
}

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

.modal-title {
    color: #00bcd4;
    font-size: 20px;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #ef5350;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
}

.modal-body {
    color: #fff;
    max-height: 600px;
    overflow-y: auto;
}

/* 卡牌列表样式 */
.card-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    margin-bottom: 4px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.card-item:hover {
    transform: translateX(2px);
}

.card-item.common {
    background: linear-gradient(90deg, #ffffff15 0%, rgba(0,0,0,0.3) 100%);
    border-left: 3px solid #ffffff;
}

.card-item.rare {
    background: linear-gradient(90deg, #3b82f615 0%, rgba(0,0,0,0.3) 100%);
    border-left: 3px solid #3b82f6;
}

.card-item.epic {
    background: linear-gradient(90deg, #ab47bc15 0%, rgba(0,0,0,0.3) 100%);
    border-left: 3px solid #ab47bc;
}

.card-item.legendary {
    background: linear-gradient(90deg, #f59e0b15 0%, rgba(0,0,0,0.3) 100%);
    border-left: 3px solid #f59e0b;
}

/* 法力水晶样式 */
.mana-crystal {
    position: relative;
    width: 26px;
    height: 30px;
    margin-right: 8px;
    flex-shrink: 0;
}

.mana-crystal-inner {
    position: absolute;
    width: 26px;
    height: 30px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid;
}

.mana-crystal.common .mana-crystal-inner {
    background: linear-gradient(135deg, #ffffff 0%, #ebebeb 100%);
    border-color: #ffffff;
}

.mana-crystal.rare .mana-crystal-inner {
    background: linear-gradient(135deg, #3b82f6 0%, #276ee2 100%);
    border-color: #3b82f6;
}

.mana-crystal.epic .mana-crystal-inner {
    background: linear-gradient(135deg, #ab47bc 0%, #8e44ad 100%);
    border-color: #ab47bc;
}

.mana-crystal.legendary .mana-crystal-inner {
    background: linear-gradient(135deg, #f59e0b 0%, #e18a00 100%);
    border-color: #f59e0b;
}

.mana-text {
    color: white;
    font-weight: bold;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* 套牌代码按钮 */
.deck-code-btn {
    width: 100%;
    padding: 7px;
    background: linear-gradient(135deg, #06b6d4 0%, #0891b1 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.deck-code-btn:hover {
    background: linear-gradient(135deg, #0891b1 0%, #0a7c91 100%);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
}
