/**
 * Minecraft Circle Generator 样式表
 * 现代化的响应式设计，支持深色主题和Minecraft风格
 */

/* 主要容器样式 */
.circle-generator-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 16px;
    margin: 20px 0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.circle-generator-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><rect width="20" height="20" fill="none"/><rect width="1" height="1" fill="rgba(255,255,255,0.1)"/></svg>');
    pointer-events: none;
}

/* 控制面板样式 */
.controls-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.controls-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-weight: 600;
    color: #34495e;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.control-input, .control-select {
    padding: 12px 16px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Minecraft', monospace;
    background: #ffffff;
    transition: all 0.3s ease;
}

.control-input:focus, .control-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.control-input:hover, .control-select:hover {
    border-color: #bdc3c7;
}

/* 复选框样式 */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    padding: 8px 0;
}

.checkbox-label input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: #ffffff;
    border: 2px solid #e0e6ed;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label:hover .checkmark {
    border-color: #3498db;
}

.checkbox-label input:checked + .checkmark {
    background: #3498db;
    border-color: #3498db;
}

.checkbox-label input:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* 缩放滑块样式 */
.zoom-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e0e6ed;
    outline: none;
    appearance: none;
    transition: all 0.3s ease;
}

.zoom-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
}

.zoom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(52, 152, 219, 0.4);
}

.zoom-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* 生成控制按钮 */
.generation-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.minecraft-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-family: 'Minecraft', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    min-width: 140px;
}

.minecraft-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.minecraft-btn:hover::before {
    left: 100%;
}

.minecraft-btn.primary {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.minecraft-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46, 204, 113, 0.4);
}

.minecraft-btn.success {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.minecraft-btn:not(.primary) {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.minecraft-btn:not(.primary):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

.minecraft-btn.builder {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.minecraft-btn.builder:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

.minecraft-btn.builder.active {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

/* 预览区域 */
.preview-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.preview-header h3 {
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
}

.preview-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.preview-stats span {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.preview-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    overflow: auto;
    margin-bottom: 20px;
}

.preview-container canvas {
    max-width: 100%;
    max-height: 600px;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* 建造者模式面板 */
.builder-panel {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.builder-panel h4 {
    margin: 0 0 15px 0;
    font-size: 1.3rem;
    text-align: center;
}

.builder-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.builder-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.builder-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.builder-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#step-counter {
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.step-instructions {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.step-instructions p {
    margin: 0 0 8px 0;
    line-height: 1.6;
}

.builder-progress {
    margin-top: 15px;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.2);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.progress-fill {
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    height: 100%;
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 4px;
}

/* 使用指南样式 */
.usage-guide {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 12px;
    margin: 30px 0;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.usage-guide h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
}

.usage-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.usage-section {
    background: #ffffff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
}

.usage-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.usage-section h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 700;
}

.usage-section p {
    color: #5a6c7d;
    line-height: 1.7;
    margin-bottom: 15px;
}

.usage-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.usage-section li {
    color: #5a6c7d;
    line-height: 1.6;
    margin-bottom: 10px;
    padding-left: 0;
    position: relative;
}

.usage-section a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.usage-section a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* 流行尺寸卡片 */
.popular-sizes {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 12px;
    margin: 30px 0;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.popular-sizes h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.6;
}

.sizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.size-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.size-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.1), transparent);
    transition: left 0.5s;
}

.size-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: #3498db;
}

.size-card:hover::before {
    left: 100%;
}

.size-card.selected {
    border-color: #27ae60;
    background: linear-gradient(135deg, #ffffff, #f0fff4);
    animation: select-pulse 0.6s ease-in-out;
}

@keyframes select-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.size-card h4 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.size-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: #3498db;
    margin: 10px 0;
    font-family: 'Minecraft', monospace;
}

.size-card p {
    color: #7f8c8d;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* 错误提示样式 */
.error-toast {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 装饰元素 */
.grass-block-decoration,
.diamond-ore-decoration {
    position: absolute;
    width: 32px;
    height: 32px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.1;
    z-index: 1;
}

.grass-block-decoration {
    top: 20px;
    right: 20px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect fill="%2327ae60" width="32" height="32"/><rect fill="%232ecc71" width="32" height="8"/></svg>');
}

.diamond-ore-decoration {
    bottom: 20px;
    left: 20px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect fill="%2395a5a6" width="32" height="32"/><polygon fill="%2374b9ff" points="16,8 20,12 16,16 12,12"/><polygon fill="%234834d4" points="16,16 20,20 16,24 12,20"/></svg>');
}

/* 响应式设计 */
@media (max-width: 768px) {
    .circle-generator-container {
        padding: 20px;
        margin: 10px 0;
    }
    
    .controls-section,
    .preview-section,
    .usage-guide,
    .popular-sizes {
        padding: 20px;
    }
    
    .controls-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .generation-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .minecraft-btn {
        width: 100%;
        min-width: unset;
    }
    
    .preview-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .preview-stats {
        width: 100%;
        justify-content: center;
    }
    
    .builder-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    #step-counter {
        order: -1;
    }
    
    .usage-sections {
        grid-template-columns: 1fr;
    }
    
    .sizes-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .usage-guide h2,
    .popular-sizes h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .controls-section h2,
    .preview-header h3 {
        font-size: 1.2rem;
    }
    
    .minecraft-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .usage-guide,
    .popular-sizes {
        margin: 20px 0;
    }
    
    .usage-guide h2,
    .popular-sizes h2 {
        font-size: 1.3rem;
    }
}