/**
 * Minecraft Effect 工具样式
 */

/* 主容器样式 */
.tool-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--minecraft-panel);
    border-radius: 2px;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    overflow: hidden;
    z-index: 1;
}

/* 装饰元素 */
.grass-block-decoration,
.diamond-ore-decoration {
    position: absolute;
    width: 64px;
    height: 64px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.1;
    pointer-events: none;
    z-index: 1;
}

.grass-block-decoration {
    background-image: url('../images/blocks/grass.png');
    top: 20px;
    right: 20px;
}

.diamond-ore-decoration {
    background-image: url('../images/blocks/diamond-ore.png');
    bottom: 20px;
    left: 20px;
}

/* 搜索容器 */
.effect-search-container {
    background: var(--minecraft-panel);
    padding: 2rem;
    border-radius: 2px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    position: relative;
    z-index: 1;
}

.effect-search-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;
}

.effect-search-container h2 {
    color: var(--minecraft-green);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: bold;
    border-bottom: 2px solid var(--minecraft-secondary);
    padding-bottom: 0.5rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.search-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-input-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

#effect-search {
    flex: 1;
    padding: 0.75rem 1rem;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--minecraft-secondary);
    border-radius: 2px;
    color: white;
    font-family: 'Noto Sans Mono', monospace;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#effect-search:focus {
    outline: none;
    border-color: var(--minecraft-green);
    box-shadow: 0 0 0 2px rgba(68, 189, 50, 0.2);
}

.filter-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: bold;
    color: #E0E0E0;
    font-size: 0.9rem;
}

.filter-group select {
    padding: 0.5rem;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--minecraft-secondary);
    border-radius: 2px;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--minecraft-green);
    box-shadow: 0 0 0 2px rgba(68, 189, 50, 0.2);
}

/* 按钮样式 */
.minecraft-btn {
    background: var(--minecraft-green);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 2px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'VT323', monospace;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
}

.minecraft-btn:hover {
    background: var(--minecraft-secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3);
}

.minecraft-btn.secondary {
    background: var(--minecraft-gray);
}

.minecraft-btn.secondary:hover {
    background: var(--minecraft-stone);
}

/* 统计卡片 */
.effect-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--minecraft-panel);
    padding: 1.5rem;
    border-radius: 2px;
    text-align: center;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--minecraft-green);
}

.stat-card.positive::before {
    background: var(--minecraft-green);
}

.stat-card.negative::before {
    background: var(--minecraft-accent);
}

.stat-card.neutral::before {
    background: var(--minecraft-dirt);
}

.stat-card.total::before {
    background: var(--minecraft-secondary);
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: var(--minecraft-green);
    line-height: 1;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.stat-label {
    font-size: 1rem;
    color: #AAAAAA;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 效果容器 */
.effects-container {
    background: var(--minecraft-panel);
    padding: 2rem;
    border-radius: 2px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    position: relative;
    z-index: 1;
}

.effects-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;
}

.effects-container h2 {
    color: var(--minecraft-green);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: bold;
    border-bottom: 2px solid var(--minecraft-secondary);
    padding-bottom: 0.5rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

/* 效果网格 */
.effects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

/* 效果卡片 */
.effect-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
    padding: 1.5rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.effect-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3);
    border-color: var(--minecraft-green);
}

.effect-card.positive {
    border-left: 5px solid var(--minecraft-green);
}

.effect-card.negative {
    border-left: 5px solid var(--minecraft-accent);
}

.effect-card.neutral {
    border-left: 5px solid var(--minecraft-dirt);
}

/* 效果头部 */
.effect-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.effect-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 2px;
    background: rgba(0,0,0,0.3);
    border: 2px solid var(--minecraft-secondary);
}

.effect-icon img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    image-rendering: pixelated;
    -ms-interpolation-mode: nearest-neighbor;
}

.effect-basic-info {
    flex: 1;
}

.effect-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--minecraft-green);
    margin: 0 0 0.5rem 0;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.effect-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.effect-id,
.effect-max-level {
    background: rgba(0, 0, 0, 0.3);
    color: #E0E0E0;
    padding: 0.25rem 0.5rem;
    border-radius: 2px;
    font-size: 0.8rem;
    font-weight: bold;
    border: 1px solid var(--minecraft-secondary);
}

.effect-type {
    padding: 0.25rem 0.75rem;
    border-radius: 2px;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}

.effect-type.positive {
    background: var(--minecraft-green);
}

.effect-type.negative {
    background: var(--minecraft-accent);
}

.effect-type.neutral {
    background: var(--minecraft-dirt);
}

/* 效果描述 */
.effect-description {
    margin-bottom: 1.5rem;
    color: #AAAAAA;
    line-height: 1.6;
    font-size: 1rem;
}

/* 效果详情 */
.effect-details {
    margin-bottom: 1.5rem;
}

.detail-section {
    margin-bottom: 1rem;
}

.detail-section h4 {
    color: var(--minecraft-green);
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
    font-weight: bold;
}

.sources-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sources-list li {
    background: var(--minecraft-secondary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 2px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}

.brewing-recipe {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem;
    border-radius: 2px;
    border-left: 4px solid var(--minecraft-green);
    font-family: 'Noto Sans Mono', monospace;
    font-size: 0.9rem;
    color: var(--minecraft-accent);
    border: 1px solid var(--minecraft-secondary);
}

.uses-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.use-tag {
    background: var(--minecraft-dirt);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 2px;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}

.effect-notes {
    background: rgba(59, 133, 38, 0.1);
    border: 1px solid var(--minecraft-green);
    border-radius: 2px;
    padding: 0.75rem;
    color: #AAAAAA;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    border-left: 4px solid var(--minecraft-green);
}

/* 效果操作按钮 */
.effect-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    flex: 1;
    background: var(--minecraft-secondary);
    color: white;
    border: none;
    padding: 0.6rem;
    border-radius: 2px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'VT323', monospace;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}

.action-btn:hover {
    background: var(--minecraft-gray);
    transform: translateY(-1px);
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3);
}

.action-btn.copy-command {
    background: var(--minecraft-green);
}

.action-btn.copy-command:hover {
    background: var(--minecraft-secondary);
}

/* 命令指南 */
.command-guide {
    background: var(--minecraft-panel);
    padding: 2rem;
    border-radius: 2px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    position: relative;
    z-index: 1;
}

.command-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;
}

.command-guide h2 {
    color: var(--minecraft-green);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: bold;
    border-bottom: 2px solid var(--minecraft-secondary);
    padding-bottom: 0.5rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.command-examples {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.command-example {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 2px;
    border-left: 5px solid var(--minecraft-green);
    border: 1px solid var(--minecraft-secondary);
}

.command-example h3 {
    color: var(--minecraft-green);
    font-size: 1.3rem;
    margin: 0 0 1rem 0;
    font-weight: bold;
}

.command-example code {
    background: rgba(0, 0, 0, 0.3);
    color: var(--minecraft-accent);
    padding: 0.75rem 1rem;
    border-radius: 2px;
    display: block;
    font-family: 'Noto Sans Mono', monospace;
    font-size: 0.9rem;
    margin: 0.5rem 0;
    overflow-x: auto;
    border: 1px solid var(--minecraft-secondary);
}

.command-example p {
    color: #AAAAAA;
    margin: 0.5rem 0 0 0;
    line-height: 1.5;
}

.command-tips {
    background: rgba(59, 133, 38, 0.1);
    padding: 1.5rem;
    border-radius: 2px;
    border-left: 5px solid var(--minecraft-green);
    border: 1px solid var(--minecraft-secondary);
}

.command-tips h3 {
    color: var(--minecraft-green);
    font-size: 1.3rem;
    margin: 0 0 1rem 0;
    font-weight: bold;
}

.command-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.command-tips li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(59, 133, 38, 0.2);
    color: #AAAAAA;
    line-height: 1.5;
}

.command-tips li:last-child {
    border-bottom: none;
}

.command-tips strong {
    color: var(--minecraft-green);
    font-weight: bold;
}

/* 酿造指南 */
.brewing-guide {
    background: var(--minecraft-panel);
    padding: 2rem;
    border-radius: 2px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    position: relative;
    z-index: 1;
}

.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-guide h2 {
    color: var(--minecraft-green);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: bold;
    border-bottom: 2px solid var(--minecraft-secondary);
    padding-bottom: 0.5rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.brewing-categories {
    display: grid;
    gap: 2rem;
}

.brewing-category h3 {
    color: var(--minecraft-green);
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
    font-weight: bold;
    border-bottom: 3px solid var(--minecraft-secondary);
    padding-bottom: 0.5rem;
}

.brewing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.brewing-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 2px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid var(--minecraft-secondary);
}

.brewing-item:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border-color: var(--minecraft-green);
}

.brewing-item strong {
    display: block;
    color: var(--minecraft-green);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.brewing-item p {
    color: var(--minecraft-accent);
    font-size: 0.9rem;
    margin: 0.5rem 0;
    font-weight: 500;
}

.brewing-item span {
    color: #AAAAAA;
    font-size: 0.8rem;
    font-style: italic;
}

.brewing-item.modifier {
    border-color: var(--minecraft-dirt);
    background: rgba(139, 69, 19, 0.1);
}

.brewing-item.modifier:hover {
    border-color: var(--minecraft-accent);
    background: rgba(139, 69, 19, 0.2);
}

/* 模态框 */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--minecraft-panel);
    margin: 5% auto;
    padding: 0;
    border-radius: 2px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 2px solid var(--minecraft-secondary);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: var(--minecraft-green);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 2px 2px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
}

.modal-close {
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    border: 2px solid transparent;
}

.modal-close:hover {
    background: var(--minecraft-secondary);
    border-color: white;
    transform: scale(1.1);
}

.modal-body {
    padding: 2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tool-container {
        padding: 1rem;
        margin: 1rem;
    }
    
    .effects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .effect-card {
        padding: 1rem;
    }
    
    .effect-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .effect-meta {
        justify-content: center;
    }
    
    .search-controls {
        gap: 1rem;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        justify-content: space-between;
    }
    
    .effect-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .brewing-grid {
        grid-template-columns: 1fr;
    }
    
    .command-example code {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .effect-stats {
        grid-template-columns: 1fr;
    }
    
    .effect-actions {
        flex-direction: column;
    }
    
    .search-input-container {
        flex-direction: column;
    }
    
    #effect-search {
        margin-bottom: 0.5rem;
    }
}

/* 动画和过渡效果 */
.effect-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 为不同序号的卡片添加延迟动画 */
.effect-card:nth-child(1) { animation-delay: 0.1s; }
.effect-card:nth-child(2) { animation-delay: 0.2s; }
.effect-card:nth-child(3) { animation-delay: 0.3s; }
.effect-card:nth-child(4) { animation-delay: 0.4s; }
.effect-card:nth-child(5) { animation-delay: 0.5s; }
.effect-card:nth-child(6) { animation-delay: 0.6s; }

/* 搜索高亮 */
.highlight {
    background: yellow;
    font-weight: bold;
    padding: 2px 4px;
    border-radius: 3px;
}

/* 加载状态 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top: 3px solid var(--minecraft-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 隐藏元素 */
.hidden {
    display: none !important;
}

/* 复制成功提示 */
.copy-success {
    background: var(--minecraft-green) !important;
    animation: copyPulse 0.6s ease-out;
}

@keyframes copyPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 工具提示 */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.5rem;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin-bottom: 5px;
}

.tooltip:hover::after {
    opacity: 1;
}
