:root {
    --primary-color: var(--ut-color-primary-500);
    --secondary-color: #11998e;
    --dark-color: var(--ut-color-text);
    --light-color: var(--ut-color-surface-muted);
}

.main-container {
    flex: 1;
    padding: 2rem 0;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.page-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--dark-color);
}

.layout-wrapper {
    display: flex;
    gap: 2rem;
    width: 100%;
}

.operation-panel {
    flex: 1;
    min-width: 300px;
}

.preview-panel {
    flex: 1;
    min-width: 400px;
}

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    height: 100%;
    background-color: white;
}

.card-title {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    font-size: 1.25rem;
}

/* Tab样式 */
.favicon-tabs {
    border-bottom: 2px solid #e2e8f0;
}

.favicon-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: #64748b;
    font-weight: 500;
    transition: all var(--ut-transition-fast);
}

.favicon-tabs .nav-link:hover {
    border-color: transparent;
    color: var(--primary-color);
}

.favicon-tabs .nav-link.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

/* 文字输入 */
.favicon-text-input {
    font-size: 2rem;
    height: 3.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color var(--ut-transition-fast);
}

.favicon-text-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 颜色选择器 */
.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-picker-wrapper .form-control-color {
    width: 40px;
    height: 38px;
    padding: 2px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
}

.color-hex-input {
    font-size: 0.85rem;
    font-family: monospace;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.375rem 0.5rem;
}

.color-hex-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 滑块 */
.slider-value {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* Emoji选择器 */
.emoji-picker {
    /* 容器，包含切换按钮和面板 */
}

.emoji-toggle-btn {
    border-color: #e2e8f0;
    color: #64748b;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.emoji-toggle-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.emoji-toggle-arrow {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.emoji-arrow-up {
    transform: rotate(180deg);
}

.emoji-panel {
    border: 1px solid #e2e8f0;
    border-radius: 0 0 8px 8px;
    margin-top: -1px;
    overflow: hidden;
}

.emoji-categories {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    overflow-x: auto;
    scrollbar-width: thin;
}

.emoji-category-btn {
    flex: 1;
    min-width: 36px;
    padding: 6px 4px;
    border: none;
    background: transparent;
    font-size: 1.15rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    line-height: 1;
}

.emoji-category-btn:hover {
    background: #e2e8f0;
}

.emoji-category-btn.active {
    background: white;
    border-bottom-color: var(--primary-color);
}

.emoji-grid-wrapper {
    max-height: 180px;
    overflow-y: auto;
    padding: 6px;
    scrollbar-width: thin;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
    gap: 2px;
}

.emoji-item {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
    padding: 0;
    line-height: 1;
}

.emoji-item:hover {
    background: #e2e8f0;
    transform: scale(1.2);
}

/* 拖放区域 */
.drop-area {
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 2.5rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 1rem;
}

.drop-area.active {
    border-color: var(--primary-color);
    background-color: rgba(59, 130, 246, 0.05);
}

.drop-area i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.browse-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.browse-btn input[type="file"] {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 100%;
    min-height: 100%;
    font-size: 100px;
    opacity: 0;
    cursor: pointer;
}

.browse-btn i {
    color: var(--light-color);
}

.uploaded-info {
    background: #f8fafc;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
}

/* 按钮样式 */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-success {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-success:hover {
    background-color: #059669;
    border-color: #059669;
}

/* 预览区域 */
.preview-main-area {
    display: flex;
    justify-content: center;
    align-items: center;
}

.preview-canvas-wrapper {
    width: 180px;
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    background: repeating-conic-gradient(#e2e8f0 0% 25%, #fff 0% 50%) 50% / 16px 16px;
}

.preview-canvas-wrapper canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* 多尺寸缩略图 */
.size-thumbnails {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1rem 0;
}

.size-thumb-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.size-thumb-item canvas {
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: repeating-conic-gradient(#f1f5f9 0% 25%, #fff 0% 50%) 50% / 8px 8px;
}

.size-thumb-item span {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

/* HTML代码区域 */
.html-code-section {
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
}

.html-code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
    line-height: 1.6;
    overflow-x: auto;
    margin: 0;
    max-height: 200px;
}

.html-code-block code {
    color: #e2e8f0;
    white-space: pre;
}

.hidden {
    display: none;
}

/* 响应式布局 */
@media (max-width: 900px) {
    .layout-wrapper {
        flex-direction: column;
    }

    .operation-panel,
    .preview-panel {
        min-width: auto;
        width: 100%;
    }

    .preview-canvas-wrapper {
        width: 140px;
        height: 140px;
    }

    .size-thumbnails {
        gap: 1rem;
    }
}
