@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400;14..32,500;14..32,600;14..32,700&family=Outfit:wght@500;600;700&display=swap');

/* 图标字体 - 内嵌确保所有页面加载 */
@font-face {
  font-family: "iconfont";
  src: url('/font/iconfont.ttf') format('truetype');
}

.iconfont {
  font-family: "iconfont" !important;
  font-size: 16px;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon-a-438417605:before { content: "\e615"; }
.icon-a-438417606:before { content: "\e616"; }
.icon-a-438417609:before { content: "\e617"; }
.icon-a-438417608:before { content: "\e618"; }
.icon-a-438417610:before { content: "\e619"; }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    touch-action: manipulation;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f6f7fb;
    color: #1e1f2e;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    height: 100vh;
    display: flex;
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 258px;
    min-width: 258px;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    background: #ffffff;
    border-right: 1px solid #eaecf2;
    display: flex;
    flex-direction: column;
    padding: 1.6rem 0 1rem;
    box-shadow: 2px 0 24px rgba(0, 0, 0, 0.03);
    z-index: 1000;
    transition: all 0.3s ease;
    overflow: hidden;
}

.sidebar-logo {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    padding: 0 1.5rem 1.4rem;
    border-bottom: 1px solid #f1f3f7;
    margin-bottom: 0.6rem;
    text-decoration: none;
}

.logo-text {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: #1a1b2e;
}

.logo-accent {
    font-weight: 700;
    background: linear-gradient(135deg, #e07b2a 0%, #f0a050 50%, #d49b30 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-dot {
    width: 7px;
    height: 7px;
    background: #e07b2a;
    border-radius: 50%;
    margin-left: 0.15rem;
    margin-bottom: 0.25rem;
    display: inline-block;
}

.logo-sub {
    font-size: 0.75rem;
    font-weight: 600;
    color: #8b8fa8;
    letter-spacing: 0.4px;
    margin-left: 0.4rem;
}

.nav-menu {
    flex: 1;
    height: 0;
    padding: 0 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    overflow-y: auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.nav-menu::-webkit-scrollbar {
    width: 5px;
}

.nav-menu::-webkit-scrollbar-track {
    background: transparent;
}

.nav-menu::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(0,0,0,0.06);
}

.nav-menu:hover::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
}

.nav-section-label {
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #a4a8bc;
    padding: 0.6rem 0.75rem 0.2rem;
    margin-top: 0.1rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.58rem 0.75rem;
    border-radius: 0.7rem;
    font-size: 0.87rem;
    font-weight: 500;
    color: #4b4e62;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: 0.1px;
    text-decoration: none;
    border: none;
}

.nav-item .nav-icon {
    font-size: 0.9rem;
    width: 20px;
    text-align: center;
    color: #9498b0;
    transition: color 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item .nav-icon .iconfont {
    font-size: 1.1rem !important;
    line-height: 1;
}

.nav-item:hover {
    background: #f5f3ff;
    color: #3d3588;
}

.nav-item:hover .nav-icon {
    color: #6c5ce7;
}

.nav-item.active {
    background: #f0edff;
    color: #4b3fd9;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(100, 80, 220, 0.1);
}

.nav-item.active .nav-icon {
    color: #5b4ae0;
}

.nav-item-restricted {
    opacity: 0.6;
    position: relative;
}

.nav-item-restricted::after {
    content: '🔒';
    position: absolute;
    right: 0.75rem;
    font-size: 0.8rem;
}

.nav-item-restricted:hover {
    background: #fef2f2;
    color: #dc2626;
}

.nav-badge {
    margin-left: auto;
    background: #fff3db;
    color: #c47d1a;
    font-size: 0.63rem;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: 1rem;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.sidebar-system-wrap {
    flex-shrink: 0;
    padding: 0 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    border-top: 1px solid #f1f3f7;
    padding-top: 0.4rem;
}

.sidebar-footer {
    margin-top: auto;
    padding: 0.5rem 0.8rem 0.3rem;
    border-top: 1px solid #f1f3f7;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex-shrink: 0;
    position: relative;
}

.sidebar-system-label {
    margin-top: 0.2rem;
}

.user-card {
    margin: 0.3rem 0 0;
    padding: 0.65rem 0.8rem;
    background: #f9fafc;
    border-radius: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border: 1px solid #eef0f5;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
    position: relative;
}

.user-card:hover {
    background: #f0edff;
    border-color: #dcd6f5;
}

.user-avatar {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #5b4ae0, #d49b30);
    border-radius: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: #1a1b2e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-role {
    font-size: 0.68rem;
    color: #8388a0;
}

.user-settings {
    color: #8388a0;
    cursor: pointer;
    transition: color 0.2s;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.user-settings:hover {
    color: #5b4ae0;
}

.sidebar-auth-entry {
    margin-top: 0;
    padding-top: 0.3rem;
    border-top: 1px solid #f1f3f7;
}

.sidebar-auth-entry .nav-item {
    margin: 0;
}

.sidebar-user-menu {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 0.8rem 0.6rem;
    pointer-events: none;
}

.sidebar-user-menu.show {
    display: block;
    pointer-events: auto;
}

.user-menu-card {
    border: 1px solid #eef0f5;
    border-radius: 0.8rem;
    padding: 0.6rem;
    background: #f9fafc;
}

.user-menu-row,
.user-menu-balance {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #eef0f5;
    border-radius: 0.6rem;
    padding: 0.45rem 0.6rem;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    color: #4b4e62;
}

.user-menu-add-btn,
.user-menu-logout {
    width: 100%;
    border: none;
    border-radius: 0.6rem;
    height: 34px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.user-menu-add-btn {
    color: #fff;
    background: linear-gradient(135deg, #5b4ae0, #8c7af0);
}

.user-menu-upgrade-btn {
    width: 100%;
    border: none;
    border-radius: 0.6rem;
    height: 34px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 0.5rem;
    color: #fff;
    background: linear-gradient(135deg, #10b981, #22c55e);
}

.user-menu-logout {
    color: #4b4e62;
    background: #eef0f5;
    margin-bottom: 0;
}

.user-menu-link {
    display: block;
    padding: 0.35rem 0.15rem;
    color: #4b4e62;
    font-size: 0.8rem;
    text-decoration: none;
}

.user-menu-link:hover {
    color: #5b4ae0;
}

.theme-night .sidebar {
    background: #0f1123;
    border-right: 1px solid rgba(45, 212, 191, 0.18);
}

.theme-night .sidebar-logo {
    border-bottom: 1px solid rgba(45, 212, 191, 0.15);
}

.theme-night .logo-text {
    color: #e2e8f0;
}

.theme-night .logo-sub {
    color: #94a3b8;
}

.theme-night .nav-section-label {
    color: #64748b;
}

.theme-night .nav-item {
    color: #cbd5e1;
}

.theme-night .nav-item .nav-icon {
    color: #64748b;
}

.theme-night .nav-item:hover {
    background: rgba(34, 211, 238, 0.08);
    color: #7dd3fc;
}

.theme-night .nav-item:hover .nav-icon {
    color: #38bdf8;
}

.theme-night .nav-item.active {
    background: rgba(34, 211, 238, 0.12);
    color: #38bdf8;
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.18);
}

.theme-night .nav-item.active .nav-icon {
    color: #22d3ee;
}

.theme-night .nav-badge {
    background: rgba(34, 211, 238, 0.15);
    color: #7dd3fc;
}

.theme-night .sidebar-auth-entry {
    border-top-color: rgba(45, 212, 191, 0.12);
}

.theme-night .sidebar-footer {
    border-top-color: rgba(45, 212, 191, 0.12);
}

.theme-night .user-card {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(45, 212, 191, 0.15);
}

.theme-night .user-card:hover {
    background: rgba(34, 211, 238, 0.08);
    border-color: rgba(45, 212, 191, 0.3);
}

.theme-night .user-name {
    color: #e2e8f0;
}

.theme-night .user-role {
    color: #64748b;
}

.theme-night .user-settings {
    color: #64748b;
}

.theme-night .user-settings:hover {
    color: #38bdf8;
}

.theme-night .user-menu-card {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(45, 212, 191, 0.18);
}

.theme-night .user-menu-row,
.theme-night .user-menu-balance {
    border-color: rgba(45, 212, 191, 0.15);
    color: #cbd5e1;
}

.theme-night .user-menu-add-btn {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.4), rgba(139, 92, 246, 0.4));
    color: #fff;
}

.theme-night .user-menu-upgrade-btn {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.4), rgba(34, 197, 94, 0.4));
    color: #fff;
}

.theme-night .user-menu-logout {
    background: rgba(45, 212, 191, 0.1);
    color: #cbd5e1;
}

.theme-night .user-menu-link {
    color: #cbd5e1;
}

.theme-night .user-menu-link:hover {
    color: #38bdf8;
}

.theme-toggle-btn {
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 16px;
    padding: 0;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.theme-toggle-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.5);
}

.global-theme-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
    width: auto;
}

/* ====== 底部语言切换按钮（位于联系客服按钮上方） ====== */
.global-lang-toggle {
    position: fixed;
    right: 20px;
    bottom: 96px; /* 56px 客服按钮 + 20px 间距 */
    z-index: 1000;
    width: auto;
}
.lang-toggle-btn {
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 16px;
    padding: 0;
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    position: relative;
    overflow: hidden;
}
.lang-toggle-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5);
}
.lang-toggle-btn .lang-toggle-label {
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    font-size: 9px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.5px;
    opacity: 0.95;
    line-height: 1;
    text-transform: uppercase;
}
.lang-toggle-btn .lang-toggle-icon {
    display: block;
    margin-top: -6px;
    line-height: 1;
}
.lang-dropdown {
    position: absolute;
    right: 0;
    bottom: calc(100% + 12px);
    width: 200px;
    background: #ffffff;
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease;
    z-index: 1050;
    max-height: 70vh;
    overflow-y: auto;
}
.global-lang-toggle.lang-open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.lang-dropdown-arrow {
    position: absolute;
    right: 22px;
    bottom: -8px;
    width: 16px;
    height: 16px;
    background: #ffffff;
    transform: rotate(45deg);
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
    z-index: -1;
}
.lang-item {
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.15s;
    user-select: none;
}
.lang-item:hover {
    background: #f1f5f9;
}
.lang-item.lang-active {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: #5b21b6;
    font-weight: 600;
}
.lang-item .lang-check {
    font-size: 12px;
    color: #7c3aed;
    opacity: 0;
}
.lang-item.lang-active .lang-check {
    opacity: 1;
}
@media (max-width: 768px) {
    .global-lang-toggle { bottom: 88px; right: 14px; }
    .lang-toggle-btn { width: 48px; height: 48px; border-radius: 14px; font-size: 1.2rem; }
    .lang-dropdown { width: 180px; }
}

.contact-trigger {
    position: relative;
}

.contact-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 12px);
    width: 280px;
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1050;
}

.contact-trigger:hover .contact-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.contact-panel-arrow {
    position: absolute;
    right: 20px;
    bottom: -6px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    transform: rotate(45deg);
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.08);
}

.contact-panel .contact-qrcode {
    margin-bottom: 14px;
}

.contact-panel .qrcode-placeholder {
    width: 160px;
    height: 160px;
    margin: 0 auto;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
}

.contact-panel .qrcode-whatsapp {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    z-index: 10;
    opacity: 0.8;
}

.contact-panel .qrcode-grid {
    display: grid;
    grid-template-columns: repeat(21, 1fr);
    gap: 0;
    width: 100%;
    height: 100%;
}

.contact-panel .qrcode-cell {
    aspect-ratio: 1;
    background: transparent;
}

.contact-panel .qrcode-cell.fill {
    background: #1a1a1a;
}

.contact-panel .contact-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
    text-align: center;
}

.contact-panel .contact-desc {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 6px;
    text-align: center;
}

.contact-panel .contact-email {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.contact-panel .email-label {
    display: block;
    font-size: 11px;
    color: #ef4444;
    font-weight: 600;
    margin-bottom: 6px;
}

.contact-panel .email-link {
    font-size: 12px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.auth-modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.26);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.auth-modal-mask.show {
    display: flex;
}

.auth-modal {
    width: min(460px, 100%);
    background: #ffffff;
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
    padding: 18px 18px 16px;
}

.auth-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.auth-modal-title {
    font-size: 28px;
    color: #111827;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.auth-close-btn {
    border: none;
    background: rgba(15, 23, 42, 0.05);
    font-size: 22px;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
}

.auth-close-btn:hover {
    background: rgba(15, 23, 42, 0.1);
    color: #334155;
}

.auth-tab-bar {
    display: flex;
    gap: 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    margin-bottom: 16px;
}

.auth-tab-btn {
    border: none;
    background: transparent;
    padding: 10px 0 9px;
    font-size: 17px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.auth-tab-btn.active {
    color: #007aff;
    border-bottom-color: #007aff;
}

.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
}

.auth-input {
    height: 46px;
    font-size: 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: #fff;
}

.auth-input:focus {
    border-color: rgba(0, 122, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.12);
}

.auth-code-row {
    display: grid;
    grid-template-columns: 1fr 132px;
    gap: 10px;
    margin-bottom: 12px;
}

.auth-code-btn {
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    padding: 0;
    height: 46px;
    border-color: rgba(148, 163, 184, 0.45);
    color: #334155;
    background: rgba(255, 255, 255, 0.88);
}

.auth-link {
    display: inline-block;
    color: #007aff;
    font-size: 14px;
    margin-bottom: 14px;
}

.auth-mode-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-bottom: 14px;
}

.auth-submit-btn {
    width: 100%;
    height: 48px;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 650;
    background: #007aff;
    box-shadow: 0 10px 22px rgba(0, 122, 255, 0.22);
}

.auth-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.auth-tip {
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    margin: 10px 0 12px;
}

.auth-agreement {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 12px;
}

.auth-agreement a {
    color: #3b82f6;
}

.auth-qrcode-box {
    border: 1px dashed rgba(148, 163, 184, 0.45);
    border-radius: 14px;
    padding: 34px 12px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
    margin-bottom: 12px;
    background: rgba(248, 250, 252, 0.7);
}

.theme-toggle-btn:hover {
    background: rgba(99, 102, 241, 0.18);
    transform: translateY(-1px);
}

.theme-day .sidebar {
    background: #ffffff;
    border-right: 1px solid #eaecf2;
}

.theme-night .sidebar {
    background: #0f1123;
    border-right: 1px solid rgba(45, 212, 191, 0.18);
}

.main-content {
    margin-left: 258px;
    flex: 1;
    min-height: 100vh;
    overflow-y: auto;
    background: #f8f9fc;
}

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2.5rem;
}

.page-header {
    margin-bottom: 30px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
}

.breadcrumb a {
    color: #6366f1;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.page-desc {
    font-size: 15px;
    color: #6b7280;
}

.tool-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.tool-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

.tool-card-desc {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
}

.upload-area {
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background: #f9fafb;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #6366f1;
    background: #f0f1ff;
}

.upload-area.dragover {
    border-color: #6366f1;
    background: #eef2ff;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.upload-text {
    font-size: 16px;
    color: #374151;
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 13px;
    color: #9ca3af;
}

.upload-preview {
    display: none;
    margin-top: 20px;
}

.upload-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
}

.upload-preview-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px;
    height: 150px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
    display: block;
}

.replace-upload-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid #c7d2fe;
    background: rgba(99, 102, 241, 0.9);
    color: #fff;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.replace-upload-btn:hover {
    background: rgba(67, 56, 202, 0.95);
    border-color: #a5b4fc;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: white;
    color: #6366f1;
    border: 2px solid #6366f1;
}

.btn-secondary:hover {
    background: #f0f1ff;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 6px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #6366f1;
}

.form-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.result-area {
    margin-top: 30px;
    padding: 24px;
    background: #f9fafb;
    border-radius: 12px;
    display: none;
}

.result-area.show {
    display: block;
}

.result-title {
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 16px;
}

.result-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.result-image {
    background: white;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.result-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.related-tools {
    margin-top: 40px;
}

.related-tools-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.related-tool-card {
    background: white;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.related-tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.related-tool-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.related-tool-name {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.related-tool-desc {
    font-size: 13px;
    color: #6b7280;
}

.footer {
    background: #1f2937;
    color: white;
    padding: 40px 0;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    transition: color 0.3s;
    font-size: 14px;
}

.footer-links a:hover {
    color: white;
}

.footer-copyright {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
}

.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    background: #5b4ae0;
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    font-size: 1.1rem;
    transition: left 0.3s ease, right 0.3s ease, opacity 0.3s ease;
}

@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
        min-width: 220px;
    }
    
    .page-container {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        transform: translateX(-100%);
        width: 258px;
        min-width: 258px;
        z-index: 1100;
        overflow-y: auto;
        padding: 1rem 0 0.5rem;
    }

    .sidebar-logo {
        padding: 0 1.2rem 0.8rem;
        margin-bottom: 0.2rem;
    }

    .sidebar-auth-entry {
        padding-top: 0.2rem;
    }

    .user-card {
        margin: 0.2rem 0 0;
        padding: 0.5rem 0.8rem;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mobile-menu-btn {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .page-container {
        padding: 1.2rem;
        margin-left: 0;
    }
    
    .ios-wrap {
        margin-left: 0 !important;
    }
    
    .upload-area {
        padding: 30px 20px;
    }
    
    body.sidebar-open {
        overflow: hidden;
    }
}

@media (max-width: 400px) {
    .sidebar {
        width: 100vw;
        min-width: 100vw;
        max-width: 100vw;
    }
}