/**
 * Required Experience Calculator 样式文件
 * 统一的Minecraft主题配色和布局
 */

/* 主容器样式 */
.tool-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* 装饰元素 */
.experience-orb-decoration {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #00ff88 0%, #00cc66 50%, #009944 100%);
    border-radius: 50%;
    opacity: 0.8;
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.enchanting-table-decoration {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #8B4513 0%, #D2691E  50%, #DEB887 100%);
    border-radius: 8px;
    opacity: 0.7;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(139, 69, 19, 0.4);
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.1); opacity: 0.9; }
}

/* 计算器容器 */
.calculator-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.calculator-container h2 {
    color: #2c3e50;
    font-family: 'Minecraft', monospace;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* 输入区域样式 */
.calculator-input {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.calculator-input label {
    font-weight: 600;
    color: #34495e;
    font-size: 1.1rem;
}

.calculator-input input {
    padding: 12px 16px;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    font-size: 1.1rem;
    font-family: 'Minecraft', monospace;
    transition: all 0.3s ease;
    background: #fff;
}

.calculator-input input:focus {
    border-color: #3498db;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
    outline: none;
}

/* 按钮样式 */
.minecraft-btn {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-family: 'Minecraft', monospace;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.minecraft-btn:hover {
    background: linear-gradient(135deg, #229954 0%, #27ae60 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

.minecraft-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(46, 204, 113, 0.3);
}

/* 结果显示区域 */
.result-display {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 25px;
    border: 2px solid #dee2e6;
}

.total-xp-result h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.xp-value {
    text-align: center;
    margin: 20px 0;
}

.xp-number {
    font-size: 3rem;
    font-weight: 800;
    color: #e74c3c;
    font-family: 'Minecraft', monospace;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    display: block;
}

.xp-label {
    font-size: 1.2rem;
    color: #7f8c8d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.level-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #dee2e6;
}

.current-level-xp h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.level-xp-value {
    font-size: 1.4rem;
    color: #27ae60;
    font-weight: 700;
    font-family: 'Minecraft', monospace;
}

/* 范围计算器 */
.range-calculator {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.range-calculator h2 {
    color: #2c3e50;
    font-family: 'Minecraft', monospace;
    font-size: 1.8rem;
    margin-bottom: 10px;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 25px;
    font-style: italic;
}

.range-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 20px;
    align-items: end;
    margin-bottom: 25px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 600;
    color: #34495e;
}

.input-group input {
    padding: 10px 14px;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Minecraft', monospace;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    border-color: #3498db;
    outline: none;
}

.range-result {
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
    border-radius: 10px;
    padding: 20px;
    border: 2px solid #c3e6cb;
    text-align: center;
}

.range-result h3 {
    color: #155724;
    margin-bottom: 15px;
}

.range-description {
    color: #6c757d;
    margin-top: 10px;
    font-style: italic;
}

/* 等级分解表 */
.level-breakdown {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.level-breakdown h2 {
    color: #2c3e50;
    font-family: 'Minecraft', monospace;
    font-size: 1.8rem;
    margin-bottom: 10px;
    text-align: center;
}

.breakdown-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.breakdown-controls label {
    font-weight: 600;
    color: #34495e;
}

.breakdown-controls input {
    width: 80px;
    padding: 8px 12px;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    font-family: 'Minecraft', monospace;
    text-align: center;
}

.breakdown-table-container {
    max-height: 500px;
    overflow-y: auto;
    border-radius: 8px;
    border: 2px solid #dee2e6;
}

.breakdown-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Minecraft', monospace;
    background: white;
}

.breakdown-table th {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.breakdown-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s ease;
}

.breakdown-table tbody tr:hover {
    background-color: #f8f9fa;
}

.breakdown-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.breakdown-table tbody tr:nth-child(even):hover {
    background-color: #f0f0f0;
}

/* 经验指南 */
.experience-guide {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.experience-guide h2 {
    color: #2c3e50;
    font-family: 'Minecraft', monospace;
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
}

.guide-sections {
    display: grid;
    gap: 30px;
}

.guide-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    border-left: 5px solid #3498db;
}

.guide-section h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-family: 'Minecraft', monospace;
}

.guide-section > p {
    color: #6c757d;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* XP目标 */
.xp-targets {
    display: grid;
    gap: 20px;
}

.xp-target {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

.xp-target:hover {
    border-color: #3498db;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.1);
}

.xp-target strong {
    color: #2c3e50;
    font-size: 1.2rem;
}

.xp-amount {
    color: #e74c3c;
    font-weight: 700;
    font-family: 'Minecraft', monospace;
    float: right;
    font-size: 1.1rem;
}

.xp-target p {
    margin: 10px 0 0 0;
    color: #6c757d;
    line-height: 1.5;
}

/* 农场方法 */
.farming-methods {
    display: grid;
    gap: 20px;
}

.farming-method {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 2px solid #dee2e6;
}

.farming-method h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.farming-method p {
    margin: 8px 0;
    color: #6c757d;
    line-height: 1.5;
}

.farming-method p strong {
    color: #2c3e50;
}

/* 附魔策略 */
.enchanting-strategies {
    display: grid;
    gap: 20px;
}

.strategy {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 2px solid #dee2e6;
    border-left: 5px solid #9b59b6;
}

.strategy h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.strategy p {
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
}

/* 公式分解 */
.formula-breakdown {
    display: grid;
    gap: 20px;
}

.formula {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 2px solid #dee2e6;
    border-left: 5px solid #f39c12;
}

.formula h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.formula code {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    display: block;
    margin: 10px 0;
    text-align: center;
}

.formula p {
    color: #6c757d;
    line-height: 1.6;
    margin: 10px 0 0 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tool-container {
        padding: 15px;
        margin: 10px;
    }
    
    .range-inputs {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .breakdown-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .breakdown-controls input {
        width: 100%;
    }
    
    .xp-number {
        font-size: 2.5rem;
    }
    
    .xp-amount {
        float: none;
        display: block;
        margin-top: 5px;
    }
    
    .farming-methods,
    .enchanting-strategies,
    .formula-breakdown,
    .xp-targets {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .calculator-container,
    .range-calculator,
    .level-breakdown,
    .experience-guide {
        padding: 20px;
    }
    
    .tool-container h2 {
        font-size: 1.4rem;
    }
    
    .xp-number {
        font-size: 2rem;
    }
    
    .breakdown-table {
        font-size: 0.9rem;
    }
    
    .breakdown-table th,
    .breakdown-table td {
        padding: 8px 10px;
    }
}
