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

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

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    transition: opacity 0.5s ease;
}

.screen.active {
    display: flex;
    opacity: 1;
}

#login-screen {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.login-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 50px 40px;
    width: 400px;
    text-align: center;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
}

.game-title h1 {
    font-size: 42px;
    color: #ff6b6b;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
    margin-bottom: 10px;
    font-weight: bold;
}

.game-title p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 40px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group input {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: #ff6b6b;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.3);
}

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

.btn-primary {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
}

.btn-wechat {
    background: linear-gradient(135deg, #07c160 0%, #06ad56 100%);
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-wechat:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(7, 193, 96, 0.4);
}

.wechat-icon {
    font-size: 20px;
}

.register-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.register-link button {
    background: none;
    border: none;
    color: #ff6b6b;
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
}

.register-link button:hover {
    color: #ee5a5a;
}

.version-info {
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
}

#game-screen {
    background: #2c3e50;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#game-ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hud-top {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 160px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    border-radius: 50%;
    border: 2px solid #fff;
}

.info .name {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
}

.info .level {
    color: #ffd700;
    font-size: 14px;
}

.stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 150px;
}

.stat .label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.bar-container {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    overflow: hidden;
}

.bar {
    height: 100%;
    border-radius: 5px;
    transition: width 0.3s ease;
}

.hp-bar {
    background: linear-gradient(90deg, #e74c3c 0%, #c0392b 100%);
}



.hud-bottom {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.skill-cooldowns {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    justify-content: center;
}

.skill-cd {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 6px 12px;
    min-width: 80px;
}

.skill-cd.ready {
    border-color: rgba(46, 204, 113, 0.6);
}

.skill-cd.cooling {
    border-color: rgba(231, 76, 60, 0.4);
    opacity: 0.7;
}

.skill-cd-key {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.skill-cd-time {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
}



#mini-map {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px;
}

#mini-map-canvas {
    width: 120px;
    height: 120px;
    border-radius: 5px;
}

#player-info-btn {
    cursor: pointer;
    pointer-events: auto;
}

.settings-icon {
    margin-left: 15px;
    font-size: 20px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

#player-info-btn:hover .settings-icon {
    opacity: 1;
}

#revive-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.revive-container {
    text-align: center;
    color: #fff;
}

.revive-container h2 {
    font-size: 36px;
    color: #e74c3c;
    margin-bottom: 20px;
}

.revive-container p {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.revive-bar-container {
    width: 300px;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
    margin: 0 auto;
}

.revive-bar {
    height: 100%;
    background: linear-gradient(90deg, #2ecc71 0%, #27ae60 100%);
    border-radius: 5px;
    transition: width 0.1s linear;
}

#settings-screen {
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.settings-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

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

.settings-header h2 {
    color: #fff;
    font-size: 24px;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 30px;
    cursor: pointer;
    transition: color 0.3s;
    line-height: 1;
}

.close-btn:hover {
    color: #fff;
}

.setting-section {
    margin-bottom: 30px;
}

.setting-section h3 {
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    margin-bottom: 20px;
}

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

.hero-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.hero-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.hero-card.active {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.hero-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 15px;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.hero-avatar.warrior {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.hero-avatar.mage {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
}

.hero-avatar.archer {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.hero-avatar.assassin {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
}

.hero-name {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.hero-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin-bottom: 10px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.hero-stats span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

.controls-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.control-item .key {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 5px;
    color: #ffd700;
    font-size: 14px;
    font-weight: bold;
    font-family: monospace;
}

.control-item .action {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.hud-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.equipment-bar {
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.equipment-bar .equip-slot {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.equipment-bar .equip-slot.main-hand {
    border-color: #e74c3c;
}

.equipment-bar .equip-slot.off-hand {
    border-color: #3498db;
}

.equipment-bar .equip-slot.armor {
    border-color: #27ae60;
}

.equipment-bar .equip-slot.helmet {
    border-color: #f39c12;
}

.equipment-bar .equip-slot.accessory1 {
    border-color: #9b59b6;
}

.equipment-bar .equip-slot.accessory2 {
    border-color: #1abc9c;
}

.equipment-bar .equip-slot:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

.function-bar {
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.func-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.func-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.stat.en {
    margin-top: 5px;
}

.en-bar {
    background: linear-gradient(90deg, #f39c12 0%, #e67e22 100%);
}

#crafting-screen, #backpack-screen, #talents-screen {
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.crafting-container, .talents-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    width: 700px;
    max-height: 80vh;
    overflow-y: auto;
}

.backpack-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

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

.screen-header h2 {
    color: #fff;
    font-size: 24px;
    margin: 0;
}

.crafting-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

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

.craft-recipe-info {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-top: 15px;
}

.craft-inventory-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.craft-inventory-section .inventory-grid-large {
    max-height: 300px;
    overflow-y: auto;
}

.slot {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.craft-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.craft-btn {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: #fff;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.craft-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(39, 174, 96, 0.4);
}

.arrow {
    font-size: 24px;
    color: #fff;
}

.result-slot {
    width: 80px;
    height: 80px;
    background: rgba(243, 156, 18, 0.2);
    border: 2px solid #f39c12;
    border-radius: 15px;
}



.backpack-content {
    display: flex;
    justify-content: center;
}

.inventory-grid-large {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.account-settings {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.talents-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.talent-trees {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.talent-tree {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
}

.talent-tree h3 {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    margin-bottom: 15px;
    text-align: center;
}

.talent-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.talent-row:last-child {
    margin-bottom: 0;
}

.talent-node {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.talent-node:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.talent-node.active {
    background: rgba(243, 156, 18, 0.3);
    border-color: #f39c12;
    color: #f39c12;
}

.talent-info {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
}

.talent-info h3 {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    margin-bottom: 10px;
}

.talent-points {
    font-size: 28px;
    font-weight: bold;
    color: #f39c12;
}

.talent-points .max {
    color: rgba(255, 255, 255, 0.5);
}

.talent-info p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    margin-top: 5px;
}