/* Minecraft Achievement Generator Styles - 完全基于color-codes工具风格 */

/* ===== 继承color-codes工具的完全统一变量系统 ===== */
/* 使用与color-codes工具完全相同的Minecraft主题变量 */

/* 全局字体应用 - 与color-codes完全一致 */
body, .achievement-generator-container, .main-content, .info-section {
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== 基础样式 - 完全参考color-codes工具 ===== */
.tool-container {
    position: relative;
    overflow: hidden;
}

/* 装饰元素 - 与color-codes工具完全一致 */
.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; /* 在大屏幕上才显示 */
}

.achievement-generator-container {
    text-align: center;
    padding: 2rem;
    background: var(--minecraft-panel);
    border: 2px solid var(--minecraft-secondary);
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    border-radius: 2px;
}

.tool-description {
    font-size: 1.1rem;
    color: #e5e7eb;
    max-width: 800px;
    margin: 0 auto 1rem;
    line-height: 1.6;
}

.achievement-generator-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;
}

.achievement-generator-container h2 {
    font-size: 2rem;
    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);
    font-family: var(--font-family);
    position: relative;
    z-index: 1;
}

.instructions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
    position: relative;
    z-index: 1;
}

.instructions p {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem;
    border-radius: 6px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e5e7eb;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ===== 主要内容区域 ===== */
.main-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* ===== 创建者面板 - 与color-codes工具完全一致 ===== */
.creator-panel {
    background: var(--minecraft-panel);
    padding: 2rem;
    border: 2px solid var(--minecraft-secondary);
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border-radius: 2px;
    position: relative;
    z-index: 1;
}

.creator-panel::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;
}

.input-section,
.icon-section {
    margin-bottom: 2rem;
}

.input-section h3,
.icon-section h3 {
    color: var(--minecraft-green);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}

.input-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.input-group label {
    display: block;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.input-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--minecraft-secondary);
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.3);
    color: #E0E0E0;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.input-group input:focus {
    outline: none;
    border-color: var(--minecraft-green);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.4);
}

.char-counter {
    position: absolute;
    right: 0.75rem;
    top: 2.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--input-bg);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* ===== 图标选择器 ===== */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.category-tab {
    padding: 0.5rem 1rem;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.category-tab:hover {
    background: var(--hover-bg);
}

.category-tab.active {
    background: var(--minecraft-green);
    color: white;
    border-color: var(--minecraft-green);
}

.icon-search {
    margin-bottom: 1rem;
}

.icon-search input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-color);
}

.icon-grid-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--secondary-bg);
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
    padding: 1rem;
}

.icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--card-bg);
}

.icon-item:hover {
    border-color: var(--minecraft-yellow);
    background: var(--hover-bg);
    transform: translateY(-2px);
}

.icon-item.selected {
    border-color: var(--minecraft-green);
    background: rgba(74, 222, 128, 0.1);
}

.icon-placeholder {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
    position: relative;
}

.icon-placeholder img {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.icon-emoji {
    font-size: 24px;
}

.icon-name {
    font-size: 0.7rem;
    text-align: center;
    color: var(--text-muted);
    line-height: 1.2;
}

/* ===== 预览面板 - 与color-codes工具完全一致 ===== */
.preview-panel {
    background: var(--minecraft-panel);
    border: 2px solid var(--minecraft-secondary);
    border-radius: 2px;
    padding: 1.5rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 2rem;
    height: fit-content;
    position: relative;
    z-index: 1;
}

.preview-panel::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;
}

.preview-panel h3 {
    color: var(--minecraft-green);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}

.achievement-preview {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.achievement-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><rect width="20" height="20" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></svg>');
    z-index: 0;
}

.achievement-toast {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(16, 16, 16, 0.95), rgba(32, 32, 32, 0.9));
    border: 2px solid #ffff55;
    border-radius: 8px;
    padding: 0.75rem;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 20px rgba(255, 255, 85, 0.3);
}

.achievement-icon {
    width: 32px;
    height: 32px;
    margin-right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.achievement-icon img {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
}

.preview-emoji {
    font-size: 24px;
}

.achievement-text {
    flex: 1;
}

.achievement-header {
    color: #ffff55;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.achievement-title {
    color: white;
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.achievement-desc {
    color: #aaaaaa;
    font-size: 0.85rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* ===== 按钮样式 - 与color-codes工具完全一致 ===== */
.preview-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--minecraft-secondary);
    border-radius: 2px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 48px;
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: var(--minecraft-green);
    color: white;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.btn-primary:hover {
    background: var(--minecraft-secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.3);
    color: #E0E0E0;
    border: 2px solid var(--minecraft-secondary);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--minecraft-green);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 1.2rem;
}

/* ===== 生成状态 ===== */
.generation-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid var(--minecraft-green);
    border-radius: 8px;
    margin-top: 1rem;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--minecraft-green);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.status-text {
    color: var(--minecraft-green);
    font-weight: 600;
}

/* ===== 信息区域 ===== */
.info-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.usage-tips,
.popular-combinations {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

.usage-tips h3,
.popular-combinations h3 {
    color: var(--minecraft-yellow);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.usage-tips ul {
    list-style: none;
    padding: 0;
}

.usage-tips li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.usage-tips li:last-child {
    border-bottom: none;
}

.usage-tips li strong {
    color: var(--minecraft-green);
}

/* ===== 信息面板统一样式 ===== */
.info-panel {
    background: var(--minecraft-panel);
    border: 2px solid var(--minecraft-secondary);
    border-radius: 2px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.info-panel::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;
}

.info-panel h3 {
    color: var(--minecraft-green);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
    text-align: center;
    border-bottom: 2px solid var(--minecraft-secondary);
    padding-bottom: 0.5rem;
}

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

.info-card {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--minecraft-secondary);
    border-radius: 2px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.info-card:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
    border-color: var(--minecraft-green);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.info-icon {
    font-size: 2rem;
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(68, 189, 50, 0.1);
    border: 2px solid var(--minecraft-green);
    border-radius: 2px;
}

.info-content {
    flex: 1;
}

.info-content h4 {
    color: var(--minecraft-green);
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.info-content p {
    color: #CCCCCC;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* ===== 预设按钮特殊样式 ===== */
.preset-button {
    border: none;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.preset-button:hover {
    background: rgba(68, 189, 50, 0.1);
    border-color: var(--minecraft-green);
}

.preset-button:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===== 预设模板网格 ===== */
.preset-section {
    margin-top: 2rem;
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.preset-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.preset-card:hover {
    background: var(--hover-bg);
    border-color: var(--minecraft-yellow);
    transform: scale(1.02);
}

.preset-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.preset-content strong {
    display: block;
    color: var(--text-color);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.preset-content span {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ===== 实时预览图片 ===== */
.live-preview-container {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--primary-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
}

.live-preview-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease;
}

.preview-placeholder {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.preview-placeholder:hover {
    border-color: var(--minecraft-green);
    color: var(--text-color);
}

.placeholder-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.preview-placeholder p {
    margin: 0;
    font-size: 0.9rem;
}

/* ===== 图片链接区域 ===== */
.image-link-section,
.html5-link-section {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--minecraft-panel);
    border: 2px solid var(--minecraft-secondary);
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.image-link-section h4,
.html5-link-section h4 {
    color: var(--minecraft-yellow);
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
}

.link-display {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.image-link-input,
.html5-link-input {
    flex: 1;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--minecraft-secondary);
    border-radius: 2px;
    color: white;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 2.5rem;
}

.html5-link-input {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.4;
    word-break: break-all;
}

.image-link-input:focus,
.html5-link-input:focus {
    border-color: var(--minecraft-green);
    box-shadow: 0 0 0 2px rgba(68, 189, 50, 0.2);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    min-width: auto;
    align-self: flex-start;
}

.link-description {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}

/* ===== 动画效果 ===== */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes float {
    from { transform: translateX(-50px) translateY(-50px); }
    to { transform: translateX(-50px) translateY(-50px) translateX(40px); }
}

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

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* ===== 响应式设计 ===== */
@media (min-width: 1200px) {
    .grass-block-decoration,
    .diamond-ore-decoration {
        display: block !important;
    }
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .preview-panel {
        position: static;
    }
    
    .info-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .feature-highlights {
        grid-template-columns: 1fr;
    }
    
    .category-tabs {
        justify-content: center;
    }
    
    .category-tab {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .icon-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
    
    .achievement-toast {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .achievement-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .preset-card {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .tip-grid {
        grid-template-columns: 1fr;
    }
    
    .preset-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .link-display {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-small {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }
    
    .creator-panel,
    .preview-panel,
    .usage-tips,
    .popular-combinations {
        padding: 1rem;
    }
    
    .icon-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 0.25rem;
        padding: 0.5rem;
    }
    
    .icon-placeholder {
        width: 24px;
        height: 24px;
    }
    
    .icon-placeholder img {
        width: 24px;
        height: 24px;
    }
    
    .icon-emoji {
        font-size: 18px;
    }
    
    .icon-name {
        font-size: 0.6rem;
    }
}

/* ===== 工具提示 ===== */
.tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

/* ===== 无障碍支持 ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== 高对比度模式 ===== */
@media (prefers-contrast: high) {
    .achievement-toast {
        border-width: 3px;
    }
    
    .btn {
        border-width: 2px;
    }
    
    .icon-item:hover,
    .icon-item.selected {
        border-width: 3px;
    }
}

/* ===== 减少动画模式 ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-section::before {
        animation: none;
    }
}
