/* 像素骑士团 - 游戏样式文件 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: #ffffff;
    min-height: 100vh;
    padding: 15px;
    line-height: 1.5;
}

/* API状态 */
.api-status {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(39, 174, 96, 0.9);
    padding: 8px 15px;
    border-radius: 10px;
    border: 2px solid #27ae60;
    color: white;
    font-size: 0.9rem;
    z-index: 1000;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.api-status.offline {
    background: rgba(231, 76, 60, 0.9);
    border-color: #e74c3c;
}

/* 游戏容器 */
.game-container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(20, 20, 30, 0.85);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    border: 2px solid #3498db;
}

/* 游戏头部 */
.game-header {
    background: linear-gradient(90deg, #1a2980, #26d0ce);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #2ecc71;
}

.game-header h1 {
    font-size: 2.8rem;
    background: linear-gradient(45deg, #f6d365, #fda085);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: flex;
    align-items: center;
    gap: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.beta {
    font-size: 0.9rem;
    background: #e74c3c;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
}

.site-badge {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 5px 15px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-left: 10px;
    display: inline-block;
}

/* 用户信息 */
.header-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.user-id {
    background: rgba(52, 152, 219, 0.2);
    padding: 5px 15px;
    border-radius: 10px;
    border: 1px solid #3498db;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.username {
    color: #f1c40f;
    font-size: 1.1rem;
    font-weight: bold;
}

/* VIP信息区域 */
.vip-info {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 215, 0, 0.15);
    padding: 12px 25px;
    border-radius: 15px;
    border: 2px solid #ffd700;
}

.vip-badge {
    font-weight: bold;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.vip-badge.vip-0 { background: linear-gradient(45deg, #95a5a6, #7f8c8d); }
.vip-badge.vip-1 { background: linear-gradient(45deg, #27ae60, #2ecc71); }
.vip-badge.vip-2 { background: linear-gradient(45deg, #2980b9, #3498db); }
.vip-badge.vip-3 { background: linear-gradient(45deg, #8e44ad, #9b59b6); }
.vip-badge.vip-4 { background: linear-gradient(45deg, #e74c3c, #ff7979); }
.vip-badge.vip-5 { background: linear-gradient(45deg, #d35400, #e67e22); }

.vip-progress {
    width: 250px;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.2);
}

.vip-bar {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71, #1abc9c);
    width: 0%;
    transition: width 0.5s ease;
}

.vip-exp {
    font-weight: bold;
    color: #f1c40f;
    font-size: 1.1rem;
    min-width: 80px;
    text-align: center;
}

.total-recharged {
    background: rgba(46, 204, 113, 0.2);
    padding: 5px 15px;
    border-radius: 10px;
    border: 1px solid #2ecc71;
    color: #2ecc71;
    font-weight: bold;
    min-width: 100px;
    text-align: center;
}

.profile-btn {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    color: white;
    padding: 8px 15px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(155, 89, 182, 0.4);
}

/* 游戏主体布局 */
.game-main {
    display: flex;
    min-height: 750px;
    padding: 25px;
    gap: 25px;
}

.left-panel {
    flex: 3;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.right-panel {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* 战斗区域 */
.battle-area {
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border-radius: 20px;
    padding: 25px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
    border: 2px solid #1abc9c;
}

.hero-section {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    align-items: center;
}

.hero-avatar {
    position: relative;
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, #2c3e50, #4a69bd);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #3498db;
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.3);
}

.avatar-placeholder {
    font-size: 6rem;
    filter: drop-shadow(3px 3px 5px rgba(0,0,0,0.5));
}

.level-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #e74c3c;
    color: white;
    padding: 8px 16px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.hero-stats {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #9b59b6;
}

.hero-stats h3 {
    color: #f1c40f;
    font-size: 2rem;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* HP和EXP条 */
.hp-bar, .exp-bar {
    height: 28px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 14px;
    margin: 20px 0;
    overflow: hidden;
    position: relative;
    border: 2px solid rgba(255,255,255,0.1);
}

.hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #e74c3c, #ff7979);
    width: 100%;
    border-radius: 14px;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.2);
}

.exp-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #00cec9);
    width: 0%;
    border-radius: 14px;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.2);
}

.hp-bar span, .exp-bar span {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1rem;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    color: white;
    z-index: 1;
}

/* 怪物区域 */
.monster-section {
    display: flex;
    gap: 30px;
}

.monster-frame {
    flex: 1;
    background: linear-gradient(145deg, #e74c3c, #c0392b);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    border: 4px solid #ff9f43;
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.3);
    position: relative;
}

.monster-placeholder {
    font-size: 8rem;
    margin: 20px 0;
    filter: drop-shadow(5px 5px 8px rgba(0,0,0,0.5));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.monster-hp-bar {
    height: 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    margin: 20px 0;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.1);
}

.monster-hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71, #1abc9c);
    width: 100%;
    border-radius: 10px;
}

.monster-info {
    margin-top: 15px;
}

.monster-info h4 {
    color: #ff9f43;
    font-size: 1.8rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.monster-info p {
    font-size: 1.2rem;
    color: #f1f2f6;
}

/* 战斗日志 */
.battle-log {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    padding: 20px;
    height: 250px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    border: 2px solid #00cec9;
}

.battle-log p {
    margin: 8px 0;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid #3498db;
    animation: fadeIn 0.3s ease;
}

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

/* 状态显示 */
.stats-display {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    background: rgba(44, 62, 80, 0.7);
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #9b59b6;
}

.stat-item {
    background: linear-gradient(135deg, #2c3e50, #4a69bd);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #3498db;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(52, 152, 219, 0.3);
}

.stat-item i {
    font-size: 2rem;
    color: #f1c40f;
    margin-bottom: 10px;
    display: block;
}

.stat-item span {
    display: block;
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffffff;
    margin-top: 5px;
}

/* 控制面板 */
.control-panel {
    background: linear-gradient(145deg, #34495e, #2c3e50);
    border-radius: 20px;
    padding: 25px;
    border: 2px solid #1abc9c;
}

.control-panel h3 {
    color: #f1c40f;
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
}

.button-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.btn {
    padding: 20px;
    border: none;
    border-radius: 15px;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover:not(:disabled) {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.attack-btn {
    background: linear-gradient(45deg, #e74c3c, #ff7979);
    color: white;
}

.skill-btn {
    background: linear-gradient(45deg, #3498db, #00cec9);
    color: white;
}

.auto-btn {
    background: linear-gradient(45deg, #2ecc71, #1abc9c);
    color: white;
}

.upgrade-btn {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    color: white;
}

.xsolla-btn {
    background: linear-gradient(45deg, #1abc9c, #16a085);
    color: white;
    grid-column: span 2;
}

/* 商店面板 */
.shop-panel {
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border-radius: 20px;
    padding: 25px;
    border: 2px solid #f1c40f;
}

.shop-panel h3 {
    color: #f1c40f;
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
}

.shop-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.shop-item {
    background: linear-gradient(135deg, #34495e, #4a69bd);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid #27ae60;
    transition: all 0.3s ease;
}

.shop-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(39, 174, 96, 0.3);
}

.shop-item i {
    font-size: 3rem;
    color: #f1c40f;
    margin-bottom: 15px;
}

.shop-item h4 {
    color: #ffffff;
    font-size: 1.5rem;
    margin: 10px 0;
}

.shop-item p {
    color: #bdc3c7;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.buy-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.buy-btn:hover {
    background: #219653;
    transform: scale(1.05);
}

/* VIP面板（核心） */
.vip-panel {
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border-radius: 20px;
    padding: 25px;
    border: 3px solid #ffd700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
}

.vip-panel h3 {
    color: #ffd700;
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.vip-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.vip-option {
    background: rgba(30, 30, 45, 0.9);
    padding: 25px;
    border-radius: 15px;
    border: 2px solid;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.vip-option:nth-child(1) { border-color: #27ae60; }
.vip-option:nth-child(2) { border-color: #3498db; }
.vip-option:nth-child(3) { border-color: #9b59b6; }

.vip-option:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.vip-option h4 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
}

.vip-option:nth-child(1) h4 { color: #27ae60; }
.vip-option:nth-child(2) h4 { color: #3498db; }
.vip-option:nth-child(3) h4 { color: #9b59b6; }

.vip-option ul {
    list-style: none;
    margin-bottom: 25px;
    padding: 0;
}

.vip-option li {
    padding: 8px 0;
    color: #ecf0f1;
    font-size: 1rem;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
}

.vip-option li:last-child {
    border-bottom: none;
}

.vip-buy-btn {
    background: linear-gradient(45deg, #ffd700, #ff9f43);
    color: #000;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.vip-buy-btn:hover {
    background: linear-gradient(45deg, #ff9f43, #ffd700);
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(255, 159, 67, 0.4);
}

/* 主充值按钮 */
.recharge-main {
    text-align: center;
    padding: 30px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 15px;
    border: 2px dashed #ffd700;
}

.recharge-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24, #ffd700);
    color: white;
    border: none;
    padding: 25px 50px;
    border-radius: 30px;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
    text-transform: uppercase;
    letter-spacing: 2px;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7); }
    70% { box-shadow: 0 0 0 25px rgba(255, 107, 107, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0); }
}

.recharge-btn:hover {
    transform: translateY(-5px) scale(1.05);
    animation: none;
    box-shadow: 0 20px 40px rgba(255, 107, 107, 0.5);
}

.recharge-tip {
    margin-top: 15px;
    color: #f1c40f;
    font-size: 1.1rem;
    font-style: italic;
}

.recharge-domain {
    margin-top: 10px;
    color: #3498db;
    font-size: 0.9rem;
    font-weight: bold;
}

/* 游戏页脚 */
.game-footer {
    background: rgba(20, 20, 30, 0.9);
    padding: 20px;
    text-align: center;
    border-top: 2px solid #3498db;
}

.game-footer p {
    color: #bdc3c7;
    font-size: 1.1rem;
    margin: 5px 0;
}

.game-footer span {
    color: #f1c40f;
    font-weight: bold;
}

/* 模态框（充值弹窗） */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    width: 90%;
    max-width: 500px;
    border-radius: 25px;
    overflow: hidden;
    border: 3px solid #3498db;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
    animation: modalAppear 0.4s ease;
}

@keyframes modalAppear {
    from { opacity: 0; transform: scale(0.8) translateY(-50px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    background: linear-gradient(90deg, #1a2980, #26d0ce);
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #3498db;
}

.modal-header h2 {
    color: #f1c40f;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.modal-close {
    color: white;
    font-size: 3rem;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    color: #e74c3c;
}

.modal-body {
    padding: 40px;
}

.amount-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.amount-option {
    background: linear-gradient(135deg, #2c3e50, #4a69bd);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
    color: #ffd700;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.amount-option:hover {
    transform: translateY(-5px);
    border-color: #3498db;
    background: linear-gradient(135deg, #3498db, #2980b9);
    box-shadow: 0 15px 30px rgba(52, 152, 219, 0.3);
}

.recharge-info {
    background: rgba(241, 196, 15, 0.1);
    border: 1px solid #f1c40f;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    color: #f1c40f;
    font-size: 1.1rem;
}

.recharge-info p {
    margin: 10px 0;
}

.recharge-info i {
    margin-right: 10px;
}

/* 个人资料弹窗 */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.profile-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-item label {
    display: block;
    color: #bdc3c7;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.profile-item span {
    display: block;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: bold;
}

/* XSolla支付弹窗 */
.xsolla-payment {
    padding: 20px;
}

.payment-input {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    align-items: center;
}

.payment-input label {
    color: #f1c40f;
    font-size: 1.2rem;
    min-width: 100px;
}

.payment-input input {
    flex: 1;
    padding: 12px 20px;
    border-radius: 10px;
    border: 2px solid #3498db;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 1.2rem;
    text-align: center;
}

.payment-input select {
    padding: 12px 20px;
    border-radius: 10px;
    border: 2px solid #9b59b6;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 1.2rem;
}

.xsolla-widget {
    min-height: 400px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    margin: 20px 0;
    border: 1px dashed #3498db;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bdc3c7;
}

.payment-actions {
    text-align: center;
    margin-top: 30px;
}

.payment-btn {
    background: linear-gradient(45deg, #27ae60, #219653);
    color: white;
    padding: 15px 40px;
    font-size: 1.3rem;
}

.payment-tip {
    margin-top: 15px;
    color: #f1c40f;
    font-size: 1rem;
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .game-main {
        flex-direction: column;
    }
    
    .vip-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .amount-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
    }
    
    .monster-section {
        flex-direction: column;
    }
    
    .stats-display {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .shop-items {
        grid-template-columns: 1fr;
    }
    
    .vip-options {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        grid-template-columns: 1fr;
    }
    
    .amount-options {
        grid-template-columns: 1fr;
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .payment-input {
        flex-direction: column;
        align-items: stretch;
    }
    
    .game-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .vip-info {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .api-status {
        top: auto;
        bottom: 10px;
        right: 10px;
        font-size: 0.8rem;
    }
}