﻿/**
 * Minecraft Banner Generator 样式文件
 */

/* 工具头部样式 */
.tool-header {
    position: relative;
    overflow: hidden;
}

/* 装饰元素 */
.banner-decoration {
    position: absolute;
    width: 60px;
    height: 60px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: 0;
}

.banner-decoration.left {
    top: 20px;
    left: 20px;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjQiIGhlaWdodD0iNjQiIHZpZXdCb3g9IjAgMCA2NCA2NCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0IiBmaWxsPSIjNDRCRDMyIi8+CjxyZWN0IHg9IjgiIHk9IjgiIHdpZHRoPSI0OCIgaGVpZ2h0PSI0OCIgZmlsbD0iIzJBNzAyMCIvPgo8L3N2Zz4K');
    transform: rotate(-15deg);
}

.banner-decoration.right {
    bottom: 20px;
    right: 20px;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjQiIGhlaWdodD0iNjQiIHZpZXdCb3g9IjAgMCA2NCA2NCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjY0IiBoZWlnaHQ9IjY0IiBmaWxsPSIjOEM4QzhDIi8+CjxyZWN0IHg9IjgiIHk9IjgiIHdpZHRoPSI0OCIgaGVpZ2h0PSI0OCIgZmlsbD0iIzY2NjY2NiIvPgo8L3N2Zz4K');
    transform: rotate(15deg);
}

/* 工具容器 */
.tool-container {
    background-color: var(--minecraft-panel);
    border: 2px solid var(--minecraft-secondary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    padding: 2rem;
    margin-bottom: 2rem;
}

/* 功能亮点标签 */
.feature-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.feature-tag {
    background: linear-gradient(135deg, var(--minecraft-primary), var(--minecraft-secondary));
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.feature-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.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: 0;
    pointer-events: none;
}

/* Banner生成器布局 */
.banner-generator {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

@media (max-width: 1200px) {
    .banner-generator {
        gap: 1.5rem;
    }
}

.generator-panel h2 {
    color: var(--minecraft-green);
    margin-bottom: 1rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
    font-family: 'VT323', monospace;
    font-size: 1.8rem;
}

.generator-panel p {
    color: #E0E0E0;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* 表单样式 */
.banner-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-section {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--minecraft-secondary);
    border-radius: 6px;
    padding: 1.5rem;
    position: relative;
}

.section-title {
    color: var(--minecraft-green);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'VT323', monospace;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    color: #E0E0E0;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-family: 'VT323', monospace;
    font-size: 1.1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* 输入框样式 */
input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--minecraft-secondary);
    border-radius: 4px;
    color: #FFFFFF;
    font-size: 1rem;
    transition: all 0.2s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--minecraft-green);
    box-shadow: 0 0 0 2px rgba(68, 189, 50, 0.3);
}

input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* 颜色选择器 */
.color-picker-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

input[type="color"] {
    width: 60px;
    height: 40px;
    border: 2px solid var(--minecraft-secondary);
    border-radius: 4px;
    background: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="color"]:hover {
    border-color: var(--minecraft-green);
    transform: scale(1.05);
}

.color-presets {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.color-preset {
    width: 30px;
    height: 30px;
    border: 2px solid var(--minecraft-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-size: cover;
}

.color-preset:hover {
    border-color: var(--minecraft-green);
    transform: scale(1.1);
}

.color-preset.active {
    border-color: var(--minecraft-green);
    box-shadow: 0 0 0 2px rgba(68, 189, 50, 0.3);
}

/* 复选框样式 */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #E0E0E0;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.checkbox-label:hover {
    color: var(--minecraft-green);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    border-radius: 3px;
    margin-right: 0.5rem;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--minecraft-green);
    border-color: var(--minecraft-green);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 14px;
}

/* 背景选择器 */
.background-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.75rem;
}

.bg-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid var(--minecraft-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bg-option:hover {
    border-color: var(--minecraft-green);
    transform: translateY(-2px);
}

.bg-option.active {
    border-color: var(--minecraft-green);
    background: rgba(68, 189, 50, 0.1);
}

.bg-preview {
    width: 50px;
    height: 30px;
    border-radius: 3px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.bg-preview.grass {
    background: linear-gradient(to bottom, #44BD32 0%, #2A7020 100%);
}

.bg-preview.stone {
    background: linear-gradient(to bottom, #8C8C8C 0%, #666666 100%);
}

.bg-preview.wood {
    background: linear-gradient(to bottom, #8B4513 0%, #654321 100%);
}

.bg-preview.nether {
    background: linear-gradient(to bottom, #8B0000 0%, #4B0000 100%);
}

.bg-preview.end {
    background: linear-gradient(to bottom, #2F1B69 0%, #1A0F3A 100%);
}

.bg-preview.custom {
    background: linear-gradient(45deg, #333 25%, transparent 25%), 
                linear-gradient(-45deg, #333 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #333 75%), 
                linear-gradient(-45deg, transparent 75%, #333 75%);
    background-size: 10px 10px;
    background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
}

.bg-option span {
    color: #E0E0E0;
    font-size: 0.9rem;
    font-family: 'VT323', monospace;
    text-align: center;
}

/* 自定义背景上传 */
.custom-bg-upload {
    margin-top: 1rem;
}

input[type="file"] {
    width: 100%;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed var(--minecraft-secondary);
    border-radius: 6px;
    color: #E0E0E0;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="file"]:hover {
    border-color: var(--minecraft-green);
    background: rgba(68, 189, 50, 0.1);
}

.help-text {
    color: #AAAAAA;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-style: italic;
}

/* 预览面板 */
.preview-panel {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--minecraft-secondary);
    border-radius: 6px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.preview-panel h3 {
    color: var(--minecraft-green);
    margin-bottom: 1rem;
    font-family: 'VT323', monospace;
    font-size: 1.3rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.banner-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.banner-preview {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    border-radius: 4px;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}

#preview-canvas {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    background: #000;
}

.preview-info {
    color: #AAAAAA;
    font-size: 0.9rem;
    font-family: 'VT323', monospace;
}

/* 按钮样式 */
.minecraft-btn {
    background: var(--minecraft-green);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    box-shadow: 0 4px 0 var(--minecraft-secondary);
    position: relative;
    top: 0;
    font-family: 'VT323', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.minecraft-btn:hover {
    background: #3da82a;
    transform: translateY(1px);
    box-shadow: 0 3px 0 var(--minecraft-secondary);
}

.minecraft-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--minecraft-secondary);
}

.minecraft-btn.secondary {
    background: #666;
    box-shadow: 0 4px 0 #444;
}

.minecraft-btn.secondary:hover {
    background: #777;
    box-shadow: 0 3px 0 #444;
}

.minecraft-btn.primary {
    background: var(--minecraft-green);
    box-shadow: 0 4px 0 var(--minecraft-secondary);
}

/* 表单操作按钮 */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
    }
    
    .minecraft-btn {
        width: 100%;
    }
}

/* 加载状态 */
.btn-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 结果区域 */
.banner-result {
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid var(--minecraft-green);
    border-radius: 6px;
    padding: 2rem;
    margin-top: 2rem;
    text-align: center;
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.banner-result h3 {
    color: var(--minecraft-green);
    margin-bottom: 1.5rem;
    font-family: 'VT323', monospace;
    font-size: 1.5rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.result-preview {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--minecraft-secondary);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.result-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 2px;
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

/* 代码容器 */
.code-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--minecraft-secondary);
    border-radius: 4px;
    padding: 1rem;
    margin-top: 1rem;
    text-align: left;
}

.code-container h4 {
    color: var(--minecraft-green);
    margin-bottom: 0.5rem;
    font-family: 'VT323', monospace;
}

.code-container textarea {
    width: 100%;
    height: 100px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--minecraft-secondary);
    border-radius: 2px;
    color: #E0E0E0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    padding: 0.5rem;
    resize: vertical;
    margin-bottom: 0.5rem;
}

/* 使用指南 */
.usage-guide {
    background: var(--minecraft-panel);
    border: 2px solid var(--minecraft-secondary);
    border-radius: 6px;
    padding: 2rem;
    margin-top: 2rem;
    position: relative;
}

.usage-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: 0;
    pointer-events: none;
}

.usage-guide h2 {
    color: var(--minecraft-green);
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
    font-family: 'VT323', monospace;
    font-size: 1.8rem;
    position: relative;
    z-index: 1;
}

.guide-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.guide-section {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--minecraft-secondary);
    border-radius: 4px;
    padding: 1.5rem;
}

.guide-section h3 {
    color: var(--minecraft-green);
    margin-bottom: 1rem;
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guide-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guide-section li {
    color: #E0E0E0;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.guide-section li::before {
    content: '▸';
    color: var(--minecraft-green);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.guide-section strong {
    color: var(--minecraft-green);
}

/* 工具状态 */
.hidden {
    display: none !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tool-container {
        padding: 1rem;
    }
    
    .banner-generator {
        grid-template-columns: 1fr;
    }
    
    .preview-panel {
        position: static;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .background-selector {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .guide-sections {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .background-selector {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .color-presets {
        justify-content: center;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section {
    animation: fadeIn 0.6s ease-out;
}

.form-section:nth-child(1) { animation-delay: 0.1s; }
.form-section:nth-child(2) { animation-delay: 0.2s; }
.form-section:nth-child(3) { animation-delay: 0.3s; }

/* 成功提示 */
.success-message {
    background: rgba(68, 189, 50, 0.2);
    border: 1px solid var(--minecraft-green);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: var(--minecraft-green);
    text-align: center;
    font-family: 'VT323', monospace;
    animation: fadeIn 0.5s ease-out;
}

/* 错误提示 */
.error-message {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid #e74c3c;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #e74c3c;
    text-align: center;
    font-family: 'VT323', monospace;
    animation: fadeIn 0.5s ease-out;
}

/* Related Tools Section */
.related-tools-section {
    background: var(--minecraft-panel);
    padding: 2rem;
    margin: 2rem auto;
    border: 2px solid var(--minecraft-secondary);
    border-radius: 8px;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    max-width: 1400px;
    width: 100%;
}

.related-tools-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: 0;
    pointer-events: none;
}

.related-tools-section h2 {
    color: var(--minecraft-green);
    margin-bottom: 0.5rem;
    text-align: center;
    font-size: 1.8rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}

.related-tools-subtitle {
    text-align: center;
    color: #AAAAAA;
    margin-bottom: 2rem;
    font-size: 1rem;
    position: relative;
    z-index: 1;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.related-tool-card {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    border-radius: 6px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.related-tool-card:hover {
    transform: translateY(-3px);
    border-color: var(--minecraft-green);
    background: rgba(68, 189, 50, 0.1);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.4), 0 0 20px rgba(68, 189, 50, 0.3);
}

.related-tool-card .tool-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.related-tool-card:hover .tool-icon {
    transform: scale(1.1);
}

.related-tool-card h3 {
    color: var(--minecraft-green);
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.related-tool-card p {
    color: #E0E0E0;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.relation-tag {
    background: linear-gradient(45deg, var(--minecraft-green), var(--minecraft-secondary));
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 鍝嶅簲寮忚璁?*/
@media (max-width: 768px) {
    .related-tools-section {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .related-tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .related-tool-card {
        padding: 1.2rem;
    }
    
    .related-tool-card .tool-icon {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .related-tools-grid {
        grid-template-columns: 1fr;
    }
    
    .related-tools-section h2 {
        font-size: 1.5rem;
    }
}
