/* 导入Satoshi字体 */
@import url("https://fonts.cdnfonts.com/css/satoshi");

/* 基础样式重置 */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", "Roboto", sans-serif;
    line-height: 1.6;
}

/* Logo渐变效果 */
.logo-gradient {
    background: linear-gradient( 135deg, #ff6b35, #f7931e, #ffd23f, #06d6a0, #118ab2, #073b4c );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 4s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        background: linear-gradient( 135deg, #ff6b35, #f7931e, #ffd23f, #06d6a0, #118ab2, #073b4c );
        -webkit-background-clip: text;
        background-clip: text;
    }

    50% {
        background: linear-gradient( 135deg, #073b4c, #118ab2, #06d6a0, #ffd23f, #f7931e, #ff6b35 );
        -webkit-background-clip: text;
        background-clip: text;
    }
}

/* 登录艺术背景 */
.login-art {
    background-image: url("../images/my-design.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: all 0.3s ease;
}

    .login-art:hover {
        transform: scale(1.02);
    }

/* 浮动标签效果 */
.floating-label {
    position: relative;
}

    .floating-label input:focus + label,
    .floating-label input:not(:placeholder-shown) + label {
        transform: translateY(-12px) scale(0.85);
        color: #fb6c23;
        font-weight: 500;
    }

    .floating-label label {
        transition: all 0.2s ease;
        transform-origin: left top;
        pointer-events: none;
    }

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #fb6c23, #ff7f3f);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(251, 108, 35, 0.2);
}

    .btn-primary:hover {
        background: linear-gradient(135deg, #e55a1f, #f06d2b);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(251, 108, 35, 0.3);
    }

/* 社交按钮样式 */
.social-btn {
    transition: all 0.3s ease;
    border: 1px solid #e5e5e5;
}

    .social-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
        border-color: #fb6c23;
    }

/* 导航链接样式 */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

    .nav-link::after {
        content: "";
        position: absolute;
        width: 0;
        height: 2px;
        bottom: -5px;
        left: 0;
        background-color: #fb6c23;
        transition: width 0.3s ease;
    }

    .nav-link:hover::after {
        width: 100%;
    }

/* 表单验证状态 */
.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2) !important;
}

.input-success {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2) !important;
}

/* 加载动画 */
.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* 页面动画 */
.animate-fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-right {
    animation: slideRight 0.8s ease-out;
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-left {
    animation: slideLeft 0.8s ease-out;
}

@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-pulse-slow {
    animation: pulse 3s infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* 响应式断点自定义 */
@media (max-width: 768px) {
    .mobile-hidden {
        display: none !important;
    }

    .mobile-full {
        width: 100% !important;
    }

    .login-art {
        height: 300px !important;
        margin: 2rem 0;
    }

    /* 移动端字体调整 */
    .text-4xl {
        font-size: 2.5rem;
    }

    .text-5xl {
        font-size: 3rem;
    }
}

@media (max-width: 1024px) {
    .tablet-hidden {
        display: none !important;
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }

/* 键盘导航样式 */
.keyboard-nav *:focus {
    outline: 2px solid #fb6c23;
    outline-offset: 2px;
}

/* 屏幕阅读器专用样式 */
.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;
}

/* 错误消息样式 */
.error-message {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 1.25rem;
}

/* 卡片悬停效果 */
.group:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

/* 渐变背景 */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 玻璃形态效果 */
.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* 文本渐变 */
.text-gradient {
    background: linear-gradient(135deg, #fb6c23, #ff7f3f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 阴影效果 */
.shadow-soft {
    box-shadow: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
}

.shadow-strong {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* 动画延迟类 */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

/* 主题切换支持 */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
}

    [data-theme="dark"] body {
        background-color: var(--bg-primary);
        color: var(--text-primary);
    }

    [data-theme="dark"] .bg-white {
        background-color: var(--bg-secondary);
    }

    [data-theme="dark"] .text-gray-800 {
        color: var(--text-primary);
    }

    [data-theme="dark"] .text-gray-600 {
        color: var(--text-secondary);
    }

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    .logo-gradient {
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid #000;
    }

    .nav-link::after {
        height: 3px;
    }
}

/* 减少动画偏好支持 */
@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;
    }
}

/* 焦点样式优化 */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #9708cc;
    outline-offset: 2px;
    border-radius: 4px;
}

/* 工具提示样式 */
.tooltip {
    position: relative;
}

    .tooltip::after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: 125%;
        left: 50%;
        transform: translateX(-50%);
        background: #333;
        color: white;
        padding: 0.5rem;
        border-radius: 4px;
        font-size: 0.875rem;
        white-space: nowrap;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
        z-index: 1000;
    }

    .tooltip:hover::after {
        opacity: 1;
        visibility: visible;
    }

/* 骨架加载动画 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* 弹性布局工具类 */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 文本截断 */
.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-ellipsis-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-ellipsis-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.design-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

    .design-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

.design-edit-btn,
.design-delete-btn {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.2s ease;
}

    .design-edit-btn:hover,
    .design-delete-btn:hover {
        background-color: white;
    }

        .design-delete-btn:hover i {
            color: #e53e3e;
        }

/* Grid layout optimizations */
@media (max-width: 640px) {
    .grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-3 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1025px) {
    .grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* 消息中心面板样式 */
#message-panel-overlay {
    opacity: 0;
}

    #message-panel-overlay.opacity-100 {
        opacity: 1;
    }

#message-panel {
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
}

    #message-panel::-webkit-scrollbar {
        width: 6px;
    }

    #message-panel::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    #message-panel::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 3px;
    }

        #message-panel::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }

.message-link {
    transition: all 0.2s ease;
}

    .message-link:hover {
        color: #e55a1f;
        text-decoration: underline;
    }

/* 图像搜索分类选择样式 */
.category-item {
    transition: all 0.3s ease;
}

    .category-item:hover {
        transform: translateY(-2px);
    }

    .category-item > div {
        transition: all 0.3s ease;
    }

    .category-item p {
        transition: all 0.3s ease;
    }

/* 搜索模态框分类选择样式 */
.search-category-item {
    transition: all 0.3s ease;
}

    .search-category-item:hover {
        transform: translateY(-2px);
    }

    .search-category-item > div {
        transition: all 0.3s ease;
    }

    .search-category-item p {
        transition: all 0.3s ease;
    }

/* 单选框自定义样式 */
/*input[type="radio"] {
    accent-color: #fb6c23;
}

    input[type="radio"]:checked {
        background-color: #fb6c23;
        border-color: #fb6c23;
    }
*/
/* 下拉框自定义样式 */
select {
    cursor: pointer;
}

    select::-ms-expand {
        display: none;
    }

/* Firefox 下拉箭头隐藏 */
select {
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
}

    /* 优化下拉框选项样式 */
    select option {
        padding: 8px 12px;
    }

    select optgroup {
        font-weight: 600;
        color: #374151;
        background-color: #f9fafb;
    }

/* 产品分类单选框样式 */
.product-category-radio {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

    .product-category-radio:hover {
        border-color: #9ca3af;
    }

    .product-category-radio:checked {
        border-color: #fb6c23;
    }

        .product-category-radio:checked::after {
            content: "";
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 10px;
            height: 10px;
            background-color: #fb6c23;
            border-radius: 50%;
        }

/* 搜索面板遮罩层样式 */
#search-overlay {
    transition: opacity 0.3s ease-in-out;
}

#search-panel {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}



/* 占位 + 渐显效果 */
img.lazy,
img.lazy-placeholder {
    /* 保证图片作为块元素以便背景颜色覆盖并可设置宽高 */
    display: block;
    width: 100%;
    height: auto;
    background-color: #e6e6e6; /* 默认灰色占位 */
    object-fit: cover;
    opacity: 0;
    transition: opacity 300ms ease, background-color 300ms ease;
}

/* 当图片正式加载完成时移除占位并淡入 */
img.lazy-loaded {
    opacity: 1;
    background-color: transparent;
}