/* LifeSkillTree - 我的世界风格技能成就系统 */

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

body {
    font-family: 'Minecraft', 'Arial', sans-serif;
    background: #F7F8FA;
    min-height: 100vh;
    overflow: hidden;
}

/* 我的世界风格字体 */
@font-face {
    font-family: 'Minecraft';
    src: url('https://fonts.googleapis.com/css2?family=VT323&display=swap');
}

body {
    font-family: 'VT323', monospace;
    font-size: 18px;
}

/* 应用容器 */
.app-container {
    display: flex;
    height: 100vh;
    background: #FFFFFF;
    border: 1px solid #E0E0E0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 左侧属性栏 */
.left-panel {
    width: 300px;
    background: #F8F9FA;
    border-right: 1px solid #E0E0E0;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0,0,0,0.05);
}

.panel-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 15px;
    background: #4A90E2;
    border: 1px solid #357ABD;
    color: #FFF;
    border-radius: 8px;
}

.panel-header h1 {
    font-size: 28px;
    margin-bottom: 5px;
    font-weight: bold;
}

.panel-header p {
    font-size: 16px;
    opacity: 0.9;
}

.panel-section {
    margin-bottom: 25px;
    padding: 15px;
    background: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.panel-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: bold;
    border-bottom: 2px solid #4A90E2;
    padding-bottom: 5px;
}

.control-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'VT323', monospace;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s ease;
    position: relative;
}

.btn-primary {
    background: #4A90E2;
    color: white;
    border: 1px solid #357ABD;
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
}

.btn-primary:hover {
    background: #357ABD;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.4);
}

.btn-secondary {
    background: #6C757D;
    color: white;
    border: 1px solid #545B62;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background: #545B62;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.4);
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

.danger {
    background: #DC3545;
    color: white;
    border: 1px solid #C82333;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.danger:hover {
    background: #C82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4);
}

/* 技能信息面板 */
.skill-info {
    background: #F8F9FA;
    padding: 15px;
    border-radius: 8px;
    color: #333;
    min-height: 120px;
    border: 1px solid #E0E0E0;
}

.skill-info h4 {
    color: #4A90E2;
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: bold;
}

.skill-info p {
    margin-bottom: 8px;
    line-height: 1.4;
}

.skill-info .skill-status {
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 5px;
    font-size: 12px;
}

.skill-info .status-completed {
    background: #4A90E2;
    color: white;
}

.skill-info .status-locked {
    background: #6C757D;
    color: white;
}

/* 统计信息 - 右下角定位 */
.statistics {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #F8F9FA;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #E0E0E0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
    min-width: 180px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #333;
}

.stat-label {
    font-weight: bold;
}

.stat-value {
    color: #4A90E2;
    font-weight: bold;
}

/* 中间画布区域 */
.canvas-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #F7F8FA;
    position: relative;
}

.canvas-header {
    background: #4A90E2;
    padding: 15px 20px;
    border-bottom: 1px solid #357ABD;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.canvas-header h2 {
    color: #FFF;
    font-size: 24px;
    font-weight: bold;
}

.canvas-controls {
    display: flex;
    gap: 10px;
}

.skill-canvas {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #F7F8FA;
    cursor: grab;
}

.skill-canvas:active {
    cursor: grabbing;
}

/* 技能节点 - 蓝色系现代风格 */
.skill-node {
    position: absolute;
    width: 120px;
    height: 120px;
    background: #D9E8FF;
    border: 2px solid #4A90E2;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    padding: 10px;
    box-shadow: 
        0 4px 12px rgba(74, 144, 226, 0.2),
        0 2px 4px rgba(0,0,0,0.1);
    user-select: none;
}

.skill-node:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 8px 24px rgba(74, 144, 226, 0.3),
        0 4px 8px rgba(0,0,0,0.15);
}

.skill-node.completed {
    background: #4A90E2;
    border-color: #357ABD;
    box-shadow: 
        0 6px 16px rgba(74, 144, 226, 0.4),
        0 4px 8px rgba(0,0,0,0.2);
}

.skill-node.completed:hover {
    box-shadow: 
        0 8px 24px rgba(74, 144, 226, 0.5),
        0 6px 12px rgba(0,0,0,0.25);
}

.skill-node.locked {
    background: #E0E0E0;
    border-color: #BDBDBD;
    opacity: 0.7;
    cursor: not-allowed;
}

.skill-node.locked:hover {
    transform: none;
    box-shadow: 
        0 4px 12px rgba(74, 144, 226, 0.2),
        0 2px 4px rgba(0,0,0,0.1);
}

.skill-node .skill-icon {
    font-size: 32px;
    margin-bottom: 8px;
    color: #4A90E2;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.2));
}

.skill-node .skill-name {
    font-weight: bold;
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.skill-node.completed .skill-name {
    color: #FFFFFF;
}

.skill-node .skill-desc {
    font-size: 11px;
    color: #666;
    line-height: 1.2;
}

.skill-node.completed .skill-desc {
    color: rgba(255,255,255,0.9);
}

/* 连接线 */
.connection-line {
    position: absolute;
    background: #BDBDBD;
    z-index: 1;
    height: 2px;
    border-radius: 1px;
    border: 1px dashed #BDBDBD;
    box-shadow: none;
}

.connection-line.active {
    background: #4A90E2;
    border: 2px solid #4A90E2;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    background: linear-gradient(145deg, #4A90E2, #357ABD);
    margin: 5% auto;
    padding: 0;
    border: 4px solid #2E5C8A;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.4);
}

.modal-header {
    background: #2E5C8A;
    color: white;
    padding: 15px 20px;
    border-bottom: 2px solid #357ABD;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 22px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.close-btn {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

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

.modal-content form {
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #FFF;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #2E5C8A;
    border-radius: 4px;
    font-family: 'VT323', monospace;
    font-size: 16px;
    background: rgba(255,255,255,0.95);
    box-shadow: inset 0 2px 4px rgba(46, 92, 138, 0.2);
}

.form-group select option {
    padding: 5px;
}

.form-group select option:disabled {
    font-weight: bold;
    color: #2E5C8A;
    background: rgba(46, 92, 138, 0.1);
}

.form-group select option[value=""] {
    font-weight: bold;
    color: #4A90E2;
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* 解锁动画 */
@keyframes unlock {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.2) rotate(5deg); }
    50% { transform: scale(1.3) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(3deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.skill-node.unlocking {
    animation: unlock 0.6s ease-in-out;
}

/* 选中效果 */
.skill-node.selected {
    border-color: #FFD700;
    box-shadow: 
        0 0 20px rgba(255,215,0,0.6),
        0 6px 0 rgba(0,0,0,0.3),
        0 8px 16px rgba(0,0,0,0.3);
}

/* 欢迎模态框样式 */
.welcome-modal {
    background: linear-gradient(145deg, #4A90E2, #357ABD);
    border: 4px solid #2E5C8A;
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.4);
}

.welcome-content {
    padding: 30px;
    text-align: center;
}

.welcome-message {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.welcome-message p {
    color: #FFF;
    font-size: 18px;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    margin: 0;
}

.welcome-actions {
    margin-top: 20px;
}

.welcome-actions .btn {
    padding: 12px 30px;
    font-size: 18px;
    min-width: 150px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    
    .left-panel {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 4px solid #654321;
    }
    
    .canvas-container {
        min-height: 500px;
    }
    
    .skill-node {
        width: 100px;
        height: 100px;
    }
    
    .skill-node .skill-icon {
        font-size: 24px;
    }
    
    .skill-node .skill-name {
        font-size: 12px;
    }
    
    .skill-node .skill-desc {
        font-size: 10px;
    }
}