/* 全局样式 */
:root {
    /* 主色调 */
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --primary-color: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    
    /* 辅助色 */
    --secondary-color: #8b5cf6;
    --accent-color: #d946ef;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    /* 中性色 */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    
    /* 过渡 */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--primary-gradient);
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* 控制面板样式 */
.control-panel {
    height: 100vh;
    overflow-y: auto;
    border-right: none;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-2xl);
    padding-bottom: 30px;
    position: relative;
}

.control-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

.control-panel h2 {
    color: var(--gray-800);
    font-weight: 800;
    text-align: center;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 20px 0 15px;
    margin-bottom: 30px;
    position: relative;
    font-size: 28px;
    letter-spacing: -0.5px;
}

.control-panel h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* 卡片样式 */
.card {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-2xl);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    transition: all var(--transition-normal);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    z-index: 1;
}

.card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-2xl);
    border-color: rgba(99, 102, 241, 0.2);
}

.card-header {
    background: var(--primary-gradient);
    color: white;
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0 !important;
    padding: 18px 24px;
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, rgba(255,255,255,0.15) 0%, transparent 50%),
        linear-gradient(-45deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.card-header h5 {
    margin: 0;
    font-weight: 700;
    font-size: 17px;
    position: relative;
    z-index: 1;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.card-body {
    padding: 24px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
    position: relative;
}

.card-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    pointer-events: none;
    border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
}

/* 表单控件样式 */
.form-control, .form-select {
    border-radius: var(--radius-xl);
    border: 2px solid var(--gray-200);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 500;
    transition: all var(--transition-normal);
    position: relative;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 
        0 0 0 3px rgba(99, 102, 241, 0.1),
        var(--shadow-lg);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    outline: none;
}

.form-control:hover:not(:focus), .form-select:hover:not(:focus) {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.form-range {
    margin-bottom: 12px;
    height: 8px;
    background: var(--primary-gradient);
    border-radius: var(--radius-sm);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: white;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    position: relative;
}

.form-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 
        var(--shadow-xl),
        0 0 0 4px rgba(99, 102, 241, 0.1);
    border-color: var(--primary-dark);
}

.form-range::-webkit-slider-thumb:active {
    transform: scale(1.05);
    box-shadow: 
        var(--shadow-md),
        0 0 0 6px rgba(99, 102, 241, 0.15);
}

.form-range::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: white;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
}

/* 按钮样式 */
.btn {
    border-radius: var(--radius-xl);
    font-weight: 600;
    padding: 14px 28px;
    font-size: 15px;
    border: none;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    cursor: pointer;
    letter-spacing: 0.3px;
    text-transform: none;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.btn:hover::before {
    left: 100%;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
    z-index: 0;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-2xl);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.btn-outline-primary:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.btn-outline-primary:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-outline-secondary {
    color: var(--gray-600);
    border: 2px solid var(--gray-400);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.btn-outline-secondary:hover {
    background: var(--gray-600);
    color: white;
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--gray-600);
}

.btn-outline-secondary:active {
    transform: translateY(-1px) scale(0.98);
}

/* 按钮组样式 */
.btn-group .btn {
    margin: 0 4px;
}

.btn-group .btn:first-child {
    margin-left: 0;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* 按钮加载状态 */
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading::before {
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* 页面加载和过渡动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 页面元素动画应用 */
.control-panel {
    animation: fadeInLeft 0.8s ease-out;
}

.preview-container {
    animation: fadeInRight 0.8s ease-out 0.2s both;
}

.card {
    animation: fadeInUp 0.6s ease-out;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

.canvas-container {
    animation: scaleIn 0.8s ease-out 0.4s both;
}

.icon-item {
    animation: bounceIn 0.5s ease-out;
}

.icon-item:nth-child(1) { animation-delay: 0.1s; }
.icon-item:nth-child(2) { animation-delay: 0.15s; }
.icon-item:nth-child(3) { animation-delay: 0.2s; }
.icon-item:nth-child(4) { animation-delay: 0.25s; }
.icon-item:nth-child(5) { animation-delay: 0.3s; }
.icon-item:nth-child(6) { animation-delay: 0.35s; }
.icon-item:nth-child(7) { animation-delay: 0.4s; }
.icon-item:nth-child(8) { animation-delay: 0.45s; }

/* 加载状态动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 状态切换动画 */
.fade-transition {
    transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.fade-transition.fade-enter {
    opacity: 0;
    transform: translateY(10px);
}

.fade-transition.fade-enter-active {
    opacity: 1;
    transform: translateY(0);
}

.fade-transition.fade-exit {
    opacity: 1;
    transform: translateY(0);
}

.fade-transition.fade-exit-active {
    opacity: 0;
    transform: translateY(-10px);
}

/* 页面滚动时的视差效果 */
@media (prefers-reduced-motion: no-preference) {
    .parallax-element {
        transform: translateZ(0);
        will-change: transform;
    }
}

/* 减少动画的用户偏好设置 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 预览区域样式 */
.preview-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 30px;
    position: fixed;
    right: 0;
    top: 0;
}

/* 响应式设计优化 */

/* 大屏幕 (桌面) */
@media (min-width: 1200px) {
    .preview-container {
        width: 75%;
    }
    
    .control-panel {
        padding-bottom: 40px;
    }
    
    .card {
        margin-bottom: 28px;
    }
    
    .canvas-container {
        padding: 50px;
    }
}

/* 中等屏幕 (平板横屏) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .preview-container {
        width: 75%;
    }
    
    .canvas-container {
        padding: 35px;
    }
    
    .preview-container h3 {
        font-size: 28px;
    }
}

/* 小屏幕 (平板竖屏) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .preview-container {
        width: 66.666667%;
    }
    
    .control-panel {
        padding-bottom: 25px;
    }
    
    .card {
        margin-bottom: 20px;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .canvas-container {
        padding: 25px;
    }
    
    .preview-container h3 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .icon-item {
        height: 80px;
        padding: 10px;
    }
    
    .icon-item iconify-icon {
        font-size: 30px;
    }
}

/* 超小屏幕 (手机) */
@media (max-width: 767.98px) {
    .preview-container {
        position: relative;
        width: 100%;
        height: auto;
        min-height: 60vh;
        padding: 20px;
    }
    
    .control-panel {
        height: auto;
        min-height: auto;
        padding: 15px;
        padding-bottom: 20px;
        margin-bottom: 20px;
        border-radius: var(--radius-2xl);
        box-shadow: var(--shadow-lg);
    }
    
    .control-panel h2 {
        font-size: 22px;
        margin-bottom: 20px;
        padding: 15px 0 10px;
    }
    
    .card {
        margin-bottom: 16px;
        border-radius: var(--radius-xl);
    }
    
    .card-header {
        padding: 14px 18px;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0 !important;
    }
    
    .card-header h5 {
        font-size: 15px;
    }
    
    .card-body {
        padding: 18px;
    }
    
    .form-control, .form-select {
        padding: 12px 16px;
        font-size: 16px; /* 防止iOS缩放 */
        border-radius: var(--radius-lg);
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 15px;
        border-radius: var(--radius-lg);
        width: 100%;
        margin-bottom: 8px;
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-group .btn {
        margin: 0;
        width: 100%;
    }
    
    .canvas-container {
        padding: 20px;
        border-radius: var(--radius-2xl);
        margin-bottom: 16px;
    }
    
    .preview-container h3 {
        font-size: 20px;
        margin-bottom: 16px;
        text-align: center;
    }
    
    .icon-item {
        height: 75px;
        padding: 8px;
        border-radius: var(--radius-xl);
    }
    
    .icon-item iconify-icon {
        font-size: 28px;
        margin-bottom: 4px;
    }
    
    .icon-item .icon-name {
        font-size: 10px;
        margin-top: 2px;
    }
    
    .credit-overlay {
        bottom: 8px;
        right: 8px;
        padding: 6px 10px;
        font-size: 11px;
    }
    
    /* 触摸优化 */
    .icon-item:hover {
        transform: none; /* 移动端不需要hover效果 */
    }
    
    .icon-item:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    .btn:hover {
        transform: none;
    }
    
    .btn:active {
        transform: scale(0.98);
    }
    
    .card:hover {
        transform: none;
    }
}

/* 超小屏幕优化 (小手机) */
@media (max-width: 480px) {
    .preview-container {
        padding: 15px;
    }
    
    .control-panel {
        padding: 12px;
    }
    
    .control-panel h2 {
        font-size: 20px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .canvas-container {
        padding: 15px;
    }
    
    .preview-container h3 {
        font-size: 18px;
    }
    
    .icon-item {
        height: 70px;
        padding: 6px;
    }
    
    .icon-item iconify-icon {
        font-size: 24px;
    }
}

/* 横屏手机优化 */
@media (max-width: 767.98px) and (orientation: landscape) {
    .preview-container {
        min-height: 40vh;
    }
    
    .control-panel {
        max-height: 100vh;
        overflow-y: auto;
    }
    
    .canvas-container {
        padding: 15px;
    }
    
    .preview-container h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .icon-item iconify-icon {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    .card-header h5,
    .control-panel h2,
    .preview-container h3 {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

.preview-container h3 {
    color: white;
    font-weight: 800;
    margin-bottom: 30px;
    font-size: 32px;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.canvas-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    border-radius: var(--radius-3xl);
    box-shadow: var(--shadow-2xl);
    padding: 40px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all var(--transition-normal);
}

.canvas-container:hover {
    box-shadow: 
        var(--shadow-2xl),
        0 0 0 1px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

/* 版权信息覆盖层样式 */
.credit-overlay {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: var(--radius-lg);
    font-size: 12px;
    z-index: 10;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.credit-overlay:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.credit-text {
    margin: 0;
    line-height: 1.3;
    font-weight: 500;
}

.credit-text a {
    color: var(--primary-300);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-weight: 600;
}

.credit-text a:hover {
    color: #ffffff;
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
}

.canvas-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, rgba(255,255,255,0.15) 0%, transparent 30%, rgba(255,255,255,0.15) 100%),
        linear-gradient(-45deg, rgba(99, 102, 241, 0.03) 0%, transparent 50%);
    pointer-events: none;
    border-radius: var(--radius-3xl);
}

#coverCanvas {
    max-width: 100%;
    max-height: 100%;
    border: none;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
    transition: all var(--transition-normal);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#coverCanvas:hover {
    transform: scale(1.03) translateY(-2px);
    box-shadow: 
        var(--shadow-2xl),
        0 0 0 2px rgba(99, 102, 241, 0.1);
}

/* 图标搜索结果样式 */
#iconResults, #unsplashResults {
    /* 移除滚动条，让内容自然展示 */
}

.icon-item {
    border: 2px solid transparent;
    border-radius: var(--radius-2xl);
    padding: 14px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    opacity: 0.85;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.icon-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    opacity: 0;
    transition: all var(--transition-normal);
    border-radius: var(--radius-2xl);
}

.icon-item::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
    z-index: 0;
}

.icon-item:hover {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-xl);
    opacity: 1;
}

.icon-item:hover::before {
    opacity: 1;
}

.icon-item:hover::after {
    width: 100px;
    height: 100px;
}

.icon-item:active {
    transform: translateY(-2px) scale(0.98);
    box-shadow: var(--shadow-lg);
}

.icon-item.selected {
    border-color: var(--primary-500);
    background: var(--primary-gradient);
    color: white;
    box-shadow: 
        var(--shadow-xl),
        0 0 0 3px rgba(99, 102, 241, 0.2);
    opacity: 1;
    transform: translateY(-2px);
}

.icon-item.selected::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    opacity: 1;
}

.icon-item.selected iconify-icon {
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.icon-item iconify-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 6px;
    color: var(--gray-700);
    transition: all var(--transition-normal);
    min-height: 36px;
    min-width: 36px;
    position: relative;
    z-index: 1;
}

.icon-item:hover iconify-icon {
    color: var(--primary-600);
    transform: scale(1.1);
}

.icon-item .icon-name {
    font-size: 11px;
    color: var(--gray-600);
    text-align: center;
    word-break: break-all;
    line-height: 1.3;
    max-width: 100%;
    margin-top: 4px;
    display: block;
    font-weight: 500;
    position: relative;
    z-index: 1;
    transition: all var(--transition-normal);
}

.icon-item:hover .icon-name {
    color: var(--primary-700);
    font-weight: 600;
}

.icon-item.selected .icon-name {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 上传图标样式 */
.uploaded-icon {
    background: var(--primary-gradient);
    color: white;
    border-color: var(--primary-500);
    box-shadow: var(--shadow-lg);
    opacity: 1;
}

.uploaded-icon:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
}

.uploaded-icon-indicator {
    font-size: 20px;
    margin-bottom: 4px;
    opacity: 0.9;
}

.uploaded-icon .icon-name {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
}

.unsplash-item {
    position: relative;
    cursor: pointer;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.unsplash-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border-color: rgba(102, 126, 234, 0.3);
}

.unsplash-item.selected {
    border-color: #667eea;
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.bg-item {
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
    text-align: center;
}

.bg-item:hover {
    background-color: #f8f9fa;
}

.bg-item.selected {
    background-color: #e3f2fd;
    border: 2px solid #3498db;
}

.icon-item svg {
    width: 32px;
    height: 32px;
}

.unsplash-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.unsplash-credit {
    position: absolute;
    bottom: 25px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unsplash-info {
    padding: 8px;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.unsplash-info small {
    font-size: 11px;
    color: #6c757d;
}

/* 警告提示框样式 */
.alert {
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    border-radius: 8px;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.alert strong {
    font-weight: 600;
}

.alert small {
    display: block;
    margin-top: 4px;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    }
    
    .control-panel {
        height: auto;
        border-right: none;
        border-bottom: none;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(15px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        margin: 10px;
        border-radius: 20px;
    }
    
    .control-panel h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .preview-container {
        height: auto;
        min-height: 60vh;
        padding: 15px;
    }
    
    .preview-container h3 {
        font-size: 22px;
        margin-bottom: 15px;
    }
    
    .canvas-container {
        padding: 15px;
        border-radius: 16px;
        margin: 10px;
    }
    
    .card {
        margin-bottom: 15px;
        border-radius: 12px;
    }
    
    .card-header {
        padding: 12px 16px;
        border-radius: 12px 12px 0 0 !important;
    }
    
    .card-body {
        padding: 16px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .icon-item {
        height: 75px;
        padding: 8px;
    }
    
    #iconResults, #unsplashResults {
        max-height: 150px;
    }
}

@media (max-width: 480px) {
    .preview-container {
        padding: 10px;
    }
    
    .canvas-container {
        padding: 10px;
        margin: 5px;
    }
    
    .control-panel {
        margin: 5px;
        border-radius: 16px;
    }
    
    .card {
        border-radius: 10px;
    }
    
    .form-control, .form-select {
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* 滚动条样式 */
.control-panel::-webkit-scrollbar,
#iconResults::-webkit-scrollbar,
#unsplashResults::-webkit-scrollbar {
    width: 8px;
}

.control-panel::-webkit-scrollbar-track,
#iconResults::-webkit-scrollbar-track,
#unsplashResults::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.control-panel::-webkit-scrollbar-thumb,
#iconResults::-webkit-scrollbar-thumb,
#unsplashResults::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.6) 0%, rgba(118, 75, 162, 0.6) 100%);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.control-panel::-webkit-scrollbar-thumb:hover,
#iconResults::-webkit-scrollbar-thumb:hover,
#unsplashResults::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 工具提示样式 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 颜色选择器样式 */
.form-control-color {
    width: 100%;
    height: 45px;
    border-radius: 12px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.form-control-color:hover {
    border-color: rgba(102, 126, 234, 0.4);
    transform: scale(1.02);
}

.form-control-color:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    outline: none;
}

/* 范围滑块标签 */
.range-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.range-value {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    min-width: 55px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
    transition: all 0.2s ease;
}

.range-value:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 字体预览样式 */
.font-preview option {
    padding: 8px 12px;
    font-size: 14px;
}

.font-status {
    padding: 4px 8px;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.font-status.loading {
    background-color: #fff3cd;
    color: #856404;
}

.font-status.loaded {
    background-color: #d1edff;
    color: #0c5460;
}

.font-status.error {
    background-color: #f8d7da;
    color: #721c24;
}

.font-status.fallback {
    background-color: #ffeaa7;
    color: #6c5ce7;
}

/* 九宫格布局选择器样式 */
.grid-layout-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    width: 120px;
    height: 120px;
    margin: 8px 0;
    padding: 8px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    background: var(--gray-50);
}

.grid-item {
    width: 100%;
    height: 100%;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    background: white;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.grid-item:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    opacity: 0.7;
    transform: scale(1.05);
}

.grid-item.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
.grid-item.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* 滑块磁吸效果样式 */
.range-input {
    position: relative;
    transition: all 0.2s ease;
}

.range-input::-webkit-slider-thumb {
    transition: all 0.15s ease;
    cursor: pointer;
}

.range-input::-moz-range-thumb {
    transition: all 0.15s ease;
    cursor: pointer;
}

/* 磁吸效果 - 当接近0%时的视觉反馈 */
.range-input.snap-to-zero::-webkit-slider-thumb {
    transform: scale(1.2);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.range-input.snap-to-zero::-moz-range-thumb {
    transform: scale(1.2);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}
}