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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: linear-gradient(145deg, #f5f7fc 0%, #eef2f8 100%);
    min-height: 100vh;
    color: #1e293b;
}

/* 导航栏 */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0.75rem 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1e293b, #2563eb);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: 40px;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.nav-link:hover {
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
}

.nav-link.active {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f1f5f9;
    padding: 0.3rem 1rem;
    border-radius: 40px;
}

.user-info i {
    color: #2563eb;
}

.logout-btn {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-family: inherit;
    text-decoration: none;
}

/* 页面容器 */
.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* 首页样式 */
.hero {
    text-align: center;
    padding: 3rem 2rem 4rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.03), rgba(124, 58, 237, 0.02));
    border-radius: 2rem;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1e293b, #2563eb, #7c3aed);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
}

.hero p {
    color: #475569;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.product-card {
    background: white;
    border-radius: 1.5rem;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.3s;
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: #2563eb;
    box-shadow: 0 12px 24px -12px rgba(37, 99, 235, 0.2);
}

.product-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hs-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #ff2442, #ff6b3d);
    border-radius: 12px;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.product-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.product-card p {
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.4;
}

.status-badge {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.65rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}

.status-active {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.status-coming {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

/* DY工具箱 - 15宫格 */
.tools-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.tools-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e293b;
}

.tools-header span {
    background: #eef2ff;
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    font-size: 0.7rem;
    color: #2563eb;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.2rem;
}

.tool-card {
    background: white;
    border-radius: 1rem;
    padding: 1.4rem 1.2rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.2s;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.tool-card:hover {
    transform: translateY(-3px);
    border-color: #2563eb;
    box-shadow: 0 12px 24px -12px rgba(37, 99, 235, 0.15);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.avatar-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #2563eb;
    flex-shrink: 0;
}

.tool-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
}

.tool-role {
    font-size: 0.65rem;
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    margin-top: 0.2rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.8rem 0;
}

.skill-tag {
    background: #f1f5f9;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.65rem;
    color: #475569;
}

.tool-desc {
    font-size: 0.7rem;
    color: #64748b;
    line-height: 1.35;
    margin-bottom: 1rem;
}

.tool-btn {
    width: 100%;
    padding: 0.5rem;
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 40px;
    font-size: 0.7rem;
    cursor: pointer;
    color: #2563eb;
    text-align: center;
    transition: all 0.2s;
}

.tool-btn:hover {
    background: #2563eb;
    color: white;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 1.5rem;
    max-width: 400px;
    width: 90%;
    padding: 2rem;
    box-shadow: 0 20px 35px -15px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    font-size: 1.2rem;
    color: #1e293b;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
}

.modal-body {
    margin-bottom: 1.5rem;
}

.modal-body p {
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.5;
}

.modal-body .tool-detail-desc {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    font-size: 0.8rem;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group label {
    display: block;
    font-size: 0.75rem;
    color: #475569;
    margin-bottom: 0.25rem;
}

.input-group input {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.85rem;
}

.modal-btn {
    width: 100%;
    padding: 0.7rem;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.modal-error {
    background: rgba(239,68,68,0.1);
    color: #dc2626;
    padding: 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    margin-bottom: 1rem;
    text-align: center;
}

/* 占位页面 */
.placeholder-page {
    text-align: center;
    padding: 4rem 2rem;
}

.placeholder-icon {
    font-size: 4rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.placeholder-page h2 {
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.placeholder-page p {
    color: #64748b;
}

/* iframe 全屏 */
.iframe-fullscreen {
    width: 100%;
    height: calc(100vh - 140px);
    min-height: 550px;
    border: none;
    background: white;
    border-radius: 0;
}

/* 页脚 */
.footer {
    background: rgba(255, 255, 255, 0.8);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem;
    text-align: center;
    font-size: 0.7rem;
    color: #6c7a91;
    margin-top: 2rem;
}

/* 后台样式 */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.2rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.stat-card h3 {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.stat-card .value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1e293b;
}

.admin-table {
    background: white;
    border-radius: 1rem;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow-x: auto;
    margin-bottom: 1rem;
}

.admin-table table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th, .admin-table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.85rem;
}

.admin-table th {
    color: #475569;
    font-weight: 600;
}

.badge {
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
}

.badge-success {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.btn-small {
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    border: none;
    cursor: pointer;
    margin: 0 0.2rem;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.btn-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.btn-success {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
}

.form-group {
    display: inline-block;
    margin-right: 1rem;
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.7rem;
    color: #64748b;
    margin-bottom: 0.2rem;
}

.form-group input, .form-group select {
    padding: 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.4rem;
}

/* 响应式 */
@media (max-width: 1300px) {
    .tools-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1000px) {
    .tools-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
    .tools-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .navbar { padding: 0.75rem 1rem; }
    .hero h1 { font-size: 2rem; }
    .page-container { padding: 1rem; }
}
@media (max-width: 500px) {
    .tools-grid { grid-template-columns: 1fr; }
}