/**
 * Potion Chart Tool 样式
 */

/* 通用样式与color-codes保持一致 */
.tool-container {
    position: relative;
    background: var(--minecraft-panel);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    z-index: 1;
    border-radius: 2px;
    overflow: hidden;
}

.tool-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAEklEQVQImWNgYGD4z8DAwMAAADgDAKdD8tMAAAAASUVORK5CYII=');
    background-size: 2px 2px;
    opacity: 0.05;
    z-index: -1;
}

.tool-container h2 {
    color: var(--minecraft-green);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--minecraft-secondary);
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.section-subtitle {
    color: #CCCCCC;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-style: italic;
    opacity: 0.9;
}

/* 装饰元素 */
.grass-block-decoration {
    position: absolute;
    top: 20px;
    left: -20px;
    width: 80px;
    height: 80px;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAA7klEQVRYhe2XMQ7CMAxFXzN0YekROAE34QQMnIuJiYGJgYmJlSNwBA7AAVjKgFo1VdM4aZGKJUt/cPLlO3acCPwTCnAFHsAZGAKhxvlb4r9KAAfDHKAHzIE18AC2wBiIFP4VMAdK4A7MgF7dgnGvp2QsExjV+KcGO7XBNW8JXNJkAuwa5qwU/0yYQA6cFH8T0uCo+JtQvucmToWCEeBXwSiQyVwmqlEQ41bB1fX8Vi2ZMQp6zv2XgnwPHQWZo6DG5Ypw9/xKyecK9kmDRiiZr9LEDzKRKbiSuVsXvO1kpKyC02ve+gqWoODzf+CvPAFUVvdRnE1w7QAAAABJRU5ErkJggg==');
    background-size: cover;
    transform: rotate(-15deg);
    opacity: 0.8;
    z-index: 0;
    image-rendering: pixelated;
    display: none; /* 在大屏幕上才显示 */
}

.diamond-ore-decoration {
    position: absolute;
    bottom: 30px;
    right: -15px;
    width: 70px;
    height: 70px;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA1klEQVQ4y83TMUoDQRTG8d/GQrCxVBCxSBFIYWMjeIFcQG+QK3iEXMAT2HkA02lI6QWsUqS1SGGRQrGwsfCzsJFld2Z3C/3gwQzD+/7vzTCpVqsI4hjbmHc5/sYAE/iqC2pJTGunMNFiPsA++jjAVdF8lKOvchXrBVTxlRVzknNgU0u5H0DI3J4aAOXC+CnvwDGupeBrPOI9ZD7MqLnDFt7yCrjNqOliA5M8AkJTb3RwhnbMXOAZRw14nOAhZN7AKe5rAr5xjlFsE5WYwgzP+V3/v3TxiAs8pVzfogKMEF94h+YAAAAASUVORK5CYII=');
    background-size: cover;
    transform: rotate(10deg);
    opacity: 0.8;
    z-index: 0;
    image-rendering: pixelated;
    display: none; /* 在大屏幕上才显示 */
}

/* 药水介绍区域 */
.potion-intro {
    position: relative;
    background: var(--minecraft-panel);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    z-index: 1;
    border-radius: 2px;
}

.potion-intro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAEklEQVQImWNgYGD4z8DAwMAAADgDAKdD8tMAAAAASUVORK5CYII=');
    background-size: 2px 2px;
    opacity: 0.05;
    z-index: -1;
}

/* 视图切换按钮 */
.view-toggle {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: center;
}

.minecraft-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--minecraft-green);
    color: white;
    border: none;
    border-radius: 2px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    position: relative;
    text-align: center;
    text-decoration: none;
    outline: none;
}

.minecraft-btn:hover {
    background-color: var(--minecraft-green-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3);
}

.minecraft-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}

.minecraft-btn.active {
    background-color: var(--minecraft-green-hover);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
    transform: translateY(2px);
}

/* 过滤器 */
.potion-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    border: 1px solid var(--minecraft-secondary);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 180px;
}

.filter-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--minecraft-green);
}

.filter-group select,
.filter-group input {
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid var(--minecraft-secondary);
    background: var(--minecraft-panel-light);
    color: white;
}

/* 修改下拉菜单的选项样式 */
.filter-group select option {
    background-color: #222;
    color: white;
    padding: 5px;
}

/* 高亮当前选中的选项 */
.filter-group select option:checked {
    background-color: var(--minecraft-green);
    color: white;
}

/* 鼠标悬停时的样式 */
.filter-group select option:hover {
    background-color: var(--minecraft-green);
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--minecraft-green);
}

/* 效果类型颜色指示器 */
.effect-color-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    padding: 5px 0;
}

.effect-color-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
}

.color-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.color-label {
    color: #CCC;
}

/* 效果类型标识圆点 */
.effect-type-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 5px;
    vertical-align: middle;
}

/* 主药水图表 */
.potion-chart {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.potion-chart th {
    background-color: var(--minecraft-green);
    color: white;
    padding: 12px;
    font-size: 0.9rem;
    text-align: center;
    text-transform: uppercase;
}

.potion-chart td {
    padding: 12px;
    font-size: 0.9rem;
    text-align: center;
    border: 1px solid var(--minecraft-secondary);
    vertical-align: middle;
    background-color: var(--minecraft-panel-light);
}

.potion-chart tr:nth-child(odd) td {
    background-color: var(--minecraft-panel);
}

.potion-chart tr:hover td {
    background-color: rgba(46, 125, 50, 0.1);
}

.potion-type {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    gap: 8px;
}

.potion-symbol {
    font-size: 24px;
    display: inline-block;
    width: 32px;
    height: 32px;
    text-align: center;
    line-height: 32px;
}

.potion-ingredients {
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.ingredient {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--minecraft-secondary);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.8rem;
    margin: 2px;
}

.ingredient-symbol {
    margin-right: 4px;
    font-size: 18px;
}

/* 药水树视图 - 使用图片 */
.potion-tree {
    display: none;
    padding: 20px 0;
}

.potion-tree.active {
    display: block;
}

.brewing-chart {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid var(--minecraft-secondary);
}

.brewing-chart img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* 修饰符部分 */
.modifiers-section {
    margin-top: 40px;
    background: var(--minecraft-panel);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    z-index: 1;
    border-radius: 2px;
    position: relative;
}

.modifiers-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAEklEQVQImWNgYGD4z8DAwMAAADgDAKdD8tMAAAAASUVORK5CYII=');
    background-size: 2px 2px;
    opacity: 0.05;
    z-index: -1;
}

.modifiers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.modifier-card {
    display: flex;
    background: var(--minecraft-panel-light);
    border: 1px solid var(--minecraft-secondary);
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.modifier-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modifier-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.modifier-symbol {
    font-size: 24px;
}

.modifier-info {
    flex-grow: 1;
}

.modifier-info h3 {
    color: var(--minecraft-green);
    margin: 0 0 5px 0;
    font-size: 1rem;
}

.modifier-effect {
    font-weight: bold;
    color: #FFFFFF;
    margin: 0 0 5px 0;
    font-size: 0.9rem;
}

.modifier-description {
    color: #CCCCCC;
    font-size: 0.8rem;
    margin: 0;
}

/* 酿造指南 */
.brewing-guide {
    margin-top: 40px;
    background: var(--minecraft-panel);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    z-index: 1;
    border-radius: 2px;
    position: relative;
}

.brewing-guide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAEklEQVQImWNgYGD4z8DAwMAAADgDAKdD8tMAAAAASUVORK5CYII=');
    background-size: 2px 2px;
    opacity: 0.05;
    z-index: -1;
}

.brewing-steps {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.brewing-step {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 15px;
    border: 1px solid var(--minecraft-secondary);
    border-radius: 4px;
    background: var(--minecraft-panel-light);
}

.step-number {
    background: var(--minecraft-green);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.brewing-step-content {
    flex-grow: 1;
}

.brewing-step strong {
    color: var(--minecraft-green);
}

/* 最佳实践部分 */
.best-practices {
    margin-top: 40px;
    background: var(--minecraft-panel);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    z-index: 1;
    border-radius: 2px;
    position: relative;
}

.best-practices::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAEklEQVQImWNgYGD4z8DAwMAAADgDAKdD8tMAAAAASUVORK5CYII=');
    background-size: 2px 2px;
    opacity: 0.05;
    z-index: -1;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tip-card {
    background: var(--minecraft-panel-light);
    border: 1px solid var(--minecraft-secondary);
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.tip-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.tip-card h4 {
    color: var(--minecraft-green);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tip-card h4 span {
    font-size: 1.2em;
}

.tip-card p {
    margin: 0;
    color: #CCCCCC;
    font-size: 0.9rem;
}

/* 复制配方按钮 */
.copy-recipe {
    background: var(--minecraft-green);
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.copy-recipe:hover {
    background: var(--minecraft-green-hover);
}

/* 工具提示 */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 100;
    pointer-events: none;
    white-space: nowrap;
    animation: tooltip-appear 0.2s ease;
}

@keyframes tooltip-appear {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 响应式设计 */
@media (min-width: 992px) {
    .grass-block-decoration,
    .diamond-ore-decoration {
        display: block;
    }
}

@media (max-width: 768px) {
    .potion-intro,
    .modifiers-section,
    .brewing-guide,
    .best-practices {
        padding: 1.5rem;
    }
    
    .potion-chart th, 
    .potion-chart td {
        padding: 8px 4px;
        font-size: 0.8rem;
    }
    
    .potion-type {
        flex-direction: column;
        text-align: center;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .view-toggle {
        flex-direction: column;
        gap: 10px;
    }
    
    .potion-ingredients {
        flex-direction: column;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .modifiers-grid {
        grid-template-columns: 1fr;
    }
    
    .brewing-base {
        flex-direction: column;
    }
    
    .primary-effects {
        flex-direction: column;
    }
    
    .effect-column {
        width: 100%;
    }
    
    .modifier-row {
        flex-direction: column;
        align-items: center;
    }
} 