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

body {
    font-family: 'Inter', sans-serif;
    background: #0A0C10;
    min-height: 100vh;
    overflow-x: hidden;
    color: #E8EDF2;
}

/* 主布局 */
.app-container {
    display: flex;
    width: 100%;
    height: 100vh;
    background: radial-gradient(circle at 20% 30%, #11161f, #090b0f);
}

/* ========= 左侧边栏 15% ========= */
.sidebar {
    width: 15%;
    background: rgba(18, 22, 28, 0.9);
    backdrop-filter: blur(4px);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.8rem 1.2rem;
    transition: all 0.2s;
    box-shadow: 8px 0 20px rgba(0, 0, 0, 0.3);
    height: 100vh;
    overflow-y: auto;
    position: relative;
}

.sidebar > div:first-child {
    flex-shrink: 0;
}

.logo-area {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 1.2rem;
}
.logo-icon {
    background: linear-gradient(135deg, #3B82F6, #A855F7);
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 8px 16px -6px rgba(59,130,246,0.3);
}
.logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(120deg, #FFFFFF, #94A3B8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
}
.logo-badge {
    font-size: 0.6rem;
    background: rgba(59,130,246,0.2);
    padding: 2px 6px;
    border-radius: 40px;
    color: #60A5FA;
    margin-left: 4px;
}

/* 用户卡片 */
.user-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 1rem;
    margin-bottom: 1.6rem;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.2s;
}
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.avatar-placeholder {
    width: 48px;
    height: 48px;
    background: linear-gradient(145deg, #2d3748, #1a202c);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #cbd5e6;
    border: 2px solid rgba(59,130,246,0.5);
}
.user-details {
    flex: 1;
}
.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2px;
    color: #F1F5F9;
}
.user-email {
    font-size: 0.65rem;
    color: #94A3B8;
    word-break: break-all;
}
.login-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.btn-sm {
    flex: 1;
    background: rgba(59,130,246,0.15);
    border: 1px solid rgba(59,130,246,0.4);
    padding: 6px 0;
    border-radius: 40px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #E0F2FE;
    cursor: pointer;
    transition: 0.2s;
    text-align: center;
}
.btn-sm:hover {
    background: #3B82F6;
    color: white;
    border-color: #3B82F6;
    transform: translateY(-1px);
}
.logout-btn {
    background: rgba(239,68,68,0.15);
    border-color: rgba(239,68,68,0.4);
    color: #FECACA;
    margin-top: 10px;
    width: 100%;
}
.logout-btn:hover {
    background: #EF4444;
    border-color: #EF4444;
    color: white;
}

/* 导航菜单 */
.nav-menu {
    margin-top: 0.2rem;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.85rem;
    color: #B9C7D9;
    transition: 0.2s;
    cursor: pointer;
    text-decoration: none;
}
.nav-item i {
    width: 22px;
    font-size: 1.1rem;
}
.nav-item.active {
    background: rgba(59,130,246,0.2);
    color: #60A5FA;
    border-left: 3px solid #3B82F6;
    background: linear-gradient(90deg, rgba(59,130,246,0.15), rgba(59,130,246,0));
}
.nav-item:hover:not(.active) {
    background: rgba(255,255,255,0.05);
    color: #E2E8F0;
    transform: translateX(4px);
}

.footer-info {
    width: 90%;
    font-size: 0.6rem;
    color: #5C6B7E;
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 1rem;
    bottom: 50px;
    position: absolute;
}

/* 右侧主内容区 85% */
.main-content {
    width: 85%;
    overflow-y: auto;
    padding: 2rem 2.5rem;
    scroll-behavior: smooth;
    min-height: 100vh;
}
.main-content::-webkit-scrollbar {
    width: 6px;
}
.main-content::-webkit-scrollbar-track {
    background: #1e2430;
    border-radius: 10px;
}
.main-content::-webkit-scrollbar-thumb {
    background: #3B82F6;
    border-radius: 10px;
}

.hero-section {
    margin-bottom: 2rem;
}
.hero-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #FFFFFF, #A5B4FC);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
/* 信息卡片 */
.info-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}
.info-card {
    border-radius: 16px;
    padding: 1.25rem 1.25rem 1.25rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.info-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}
.info-card > * {
    position: relative;
    z-index: 1;
}
.info-card:nth-child(1) {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(99, 102, 241, 0.12));
    border-color: rgba(99, 102, 241, 0.2);
}
.info-card:nth-child(1)::before { background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(99, 102, 241, 0.2)); }
.info-card:nth-child(2) {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(5, 150, 105, 0.1));
    border-color: rgba(16, 185, 129, 0.18);
}
.info-card:nth-child(2)::before { background: linear-gradient(135deg, rgba(16, 185, 129, 0.38), rgba(5, 150, 105, 0.18)); }
.info-card:nth-child(3) {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(217, 119, 6, 0.1));
    border-color: rgba(245, 158, 11, 0.18);
}
.info-card:nth-child(3)::before { background: linear-gradient(135deg, rgba(245, 158, 11, 0.38), rgba(217, 119, 6, 0.18)); }
.info-card:nth-child(4) {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(168, 85, 247, 0.12));
    border-color: rgba(168, 85, 247, 0.18);
}
.info-card:nth-child(4)::before { background: linear-gradient(135deg, rgba(236, 72, 153, 0.36), rgba(168, 85, 247, 0.18)); }
.info-card:hover::before { opacity: 1; }

.info-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.5);
}
.info-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.35s ease;
}
.info-card:hover .info-card-icon {
    transform: scale(1.1) rotate(-5deg);
}
.info-card-content {
    flex: 1;
    min-width: 0;
}
.info-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #F1F5F9;
    margin-bottom: 0.25rem;
    letter-spacing: 0.3px;
}
.info-card-desc {
    font-size: 0.72rem;
    color: #7E8EA3;
    line-height: 1.5;
}
@media (max-width: 1100px) {
    .info-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .info-cards { grid-template-columns: 1fr; }
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}
.tool-card {
    background: rgba(22, 28, 36, 0.7);
    backdrop-filter: blur(4px);
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid rgba(255,255,255,0.08);
    transition: 0.25s;
}
.tool-card:hover {
    transform: translateY(-5px);
    background: rgba(30, 38, 48, 0.8);
    border-color: rgba(59,130,246,0.4);
}
.tool-icon {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
}
.tool-image {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9比例 */
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    margin-bottom: 1rem;
    background-color: rgba(255, 255, 255, 0.05);
}
.tool-title {
    font-size: 1.2rem;
    font-weight: 600;
}
.tool-tag {
    margin-top: 0.8rem;
    font-size: 0.7rem;
    color: #60A5FA;
    background: rgba(59,130,246,0.2);
    display: inline-block;
    padding: 4px 10px;
    border-radius: 50px;
}
.tool-license-status {
    margin-top: 0.8rem;
    font-size: 0.8rem;
}
.license-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
}
.license-tag.unauthenticated {
    color: #94A3B8;
    background: rgba(148, 163, 184, 0.2);
}
.license-tag.unauthorized {
    color: #F59E0B;
    background: rgba(245, 158, 11, 0.2);
}
.license-tag.authorized {
    color: #10B981;
    background: rgba(16, 185, 129, 0.2);
}
.license-tag.credit {
    color: #A78BFA;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
}
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 600px;
    text-align: center;
}

/* 模态框 - 登录/注册(含验证码风格) */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(12px);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-card {
    background: #12161F;
    border-radius: 32px;
    width: 90%;
    max-width: 440px;
    padding: 2rem;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 30px 50px rgba(0,0,0,0.5);
    animation: fadeUp 0.3s ease;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.modal-header {
    font-size: 1.7rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    text-align: center;
}
.input-group {
    margin-bottom: 1.2rem;
}
.input-group input {
    width: 100%;
    background: #1E2530;
    border: 1px solid #2d3748;
    padding: 12px 16px;
    border-radius: 24px;
    font-size: 0.9rem;
    color: white;
    outline: none;
    transition: 0.2s;
}
.input-group input:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.3);
}
.captcha-row {
    display: flex;
    gap: 12px;
    align-items: center;
}
.captcha-row input {
    flex: 1;
}
.send-code-btn {
    background: rgba(59,130,246,0.2);
    border: 1px solid #3B82F6;
    padding: 10px 16px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #93C5FD;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s;
}
.send-code-btn:hover:not(:disabled) {
    background: #3B82F6;
    color: white;
}
.send-code-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.modal-btn {
    background: #3B82F6;
    width: 100%;
    padding: 11px;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: 0.2s;
}
.modal-btn:hover {
    background: #2563EB;
}
.switch-modal {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #94A3B8;
}
.switch-modal span {
    color: #60A5FA;
    cursor: pointer;
    font-weight: 500;
}
.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    cursor: pointer;
    color: #aaa;
}
.toast-msg {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #bbf0ff;
    padding: 10px 24px;
    border-radius: 60px;
    font-size: 0.85rem;
    z-index: 1100;
    backdrop-filter: blur(12px);
    border-left: 4px solid #3B82F6;
    display: none;
}
/* 响应式：当屏幕小于900px时左侧稍微再紧凑 */
@media (max-width: 1000px) {
    .sidebar { width: 18%; padding: 1.2rem 0.8rem; }
    .main-content { width: 82%; padding: 1.5rem; }
    .logo-text { font-size: 1.1rem; }
    .nav-item { font-size: 0.75rem; gap: 6px; }
}
@media (max-width: 780px) {
    .sidebar { width: 22%; }
    .main-content { width: 78%; }
    .user-info { flex-direction: column; text-align: center; }
}
@media (max-width: 640px) {
    .app-container { flex-direction: column; height: auto; min-height: 100vh; }
    .sidebar { width: 100%; padding: 1rem; position: relative; }
    .sidebar > div:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
    .sidebar .logo-area { width: auto; }
    .sidebar .nav-menu { display: flex; gap: 0.5rem; margin: 0; }
    .sidebar .nav-item { padding: 0.4rem 0.6rem; font-size: 0.7rem; }
    .sidebar .user-card { margin: 0; flex: 1; min-width: 120px; }
    .sidebar .footer-info { display: none; }
    .main-content { width: 100%; padding: 1rem; }
    .tools-grid { grid-template-columns: 1fr; gap: 0.75rem; }
    .licensed-tools-widget { margin: 0.5rem 0; padding: 0.5rem; }
    .generate-btn { width: 100%; justify-content: center; }
}

/* 授权工具组件样式 */
.licensed-tools-widget {
    margin: 1rem 0;
    padding: 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

#modelsWidget.licensed-tools-widget {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.2);
}

#modelsWidget .licensed-tools-title {
    color: #A78BFA;
}

.licensed-tools-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #3B82F6;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.licensed-tools-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.licensed-tool-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(26, 31, 46, 0.6);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.licensed-tool-item:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateX(4px);
}

.licensed-tool-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #3B82F6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: white;
    flex-shrink: 0;
}

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

.licensed-tool-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: #E5E7EB;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.licensed-tool-usage {
    font-size: 0.65rem;
    color: #64748B;
    margin-top: 2px;
}

.licensed-tool-usage.days {
    color: #10B981;
}

.licensed-tool-usage.count {
    color: #F59E0B;
}

.licensed-tools-empty {
    font-size: 0.7rem;
    color: #64748B;
    text-align: center;
    padding: 0.5rem;
}

.licensed-tools-loading {
    text-align: center;
    padding: 0.5rem;
    color: #64748B;
}

/* ===== 加载更多按钮 ===== */
.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 32px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 10px;
    color: #93C5FD;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s;
}
.load-more-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}
.load-more-btn i {
    font-size: 0.72rem;
    transition: transform 0.25s;
}
.load-more-btn:hover i {
    transform: translateY(2px);
}
.load-more-btn:active {
    transform: scale(0.97);
}
.load-more-end {
    color: #64748B;
    font-size: 0.78rem;
    padding: 6px 0;
}

/* 计费方式页面 */
.pricing-container {
    max-width: 640px;
}
.pricing-card {
    background: rgba(22, 28, 36, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.5rem;
    margin: 1.5rem 0 2rem;
    text-align: center;
}
.pricing-card-header {
    margin-bottom: 1rem;
}
.pricing-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    margin: 0 auto 0.75rem;
    box-shadow: 0 8px 20px -6px rgba(59, 130, 246, 0.4);
}
.pricing-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #F1F5F9;
    margin-bottom: 0.5rem;
}
.pricing-rate {
    font-size: 1.8rem;
    font-weight: 700;
    color: #F59E0B;
}
.pricing-rate strong {
    font-size: 2rem;
    color: #F59E0B;
}
.pricing-card-body {
    color: #94A3B8;
    font-size: 0.9rem;
}
.pricing-card-body p {
    margin-bottom: 0.5rem;
}
.pricing-contact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    color: #93C5FD;
    margin-top: 0.5rem;
}
.pricing-contact .contact-val {
    color: #60A5FA;
    font-weight: 600;
}
.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #E2E8F0;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.pricing-table-wrap {
    background: rgba(22, 28, 36, 0.4);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}
.pricing-table {
    width: 100%;
    border-collapse: collapse;
}
.pricing-table thead th {
    background: rgba(30, 38, 48, 0.6);
    color: #94A3B8;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.pricing-table tbody td {
    padding: 12px 16px;
    font-size: 0.9rem;
    color: #E2E8F0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.pricing-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.05);
}
.pricing-table tbody tr:last-child td {
    border-bottom: none;
}
.pricing-badge {
    display: inline-block;
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.pricing-badge-yellow {
    display: inline-block;
    background: linear-gradient(135deg, #BFA87B, #EFEAD3);
    color: #4D4024;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.loading-cell {
    text-align: center;
    padding: 2rem !important;
    color: #64748B;
}