:root {
    --primary: #165DFF;
    --primary-light: #4080FF;
    --primary-dark: #0E42D2;
    --white: #FFFFFF;
    --gray-100: #F2F3F5;
    --gray-200: #E5E6EB;
    --gray-300: #C9CDD4;
    --gray-400: #86909C;
    --gray-500: #4E5969;
    --gray-600: #272E3B;
    --gray-700: #1D2129;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

@media screen and (min-width: 1200px) {
    .container {
        padding: 0;
    }
}

header {
    background-color: var(--white);
    padding: 24px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 32px;
}

header h1 {
    color: var(--primary);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

header h1 i {
    margin-right: 8px;
    font-size: 32px;
}

header p {
    color: var(--gray-500);
    font-size: 16px;
    text-align: center;
}

.banner {
    background: linear-gradient(135deg, #0E42D2, #165DFF, #36CFC9, #722ED1, #F5222D);
    background-size: 600% 600%;
    animation: gradient 15s ease infinite;
    color: var(--white);
    padding: 25px 20px;
    margin-bottom: 32px;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.banner::before, .banner::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    opacity: 0.2;
    z-index: 0;
}

.banner::before {
    background: rgba(255, 255, 255, 0.3);
    top: -50px;
    right: -50px;
    animation: float 8s ease-in-out infinite;
}

.banner::after {
    background: rgba(255, 255, 255, 0.2);
    bottom: -50px;
    left: -50px;
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(20px, 20px) scale(1.1);
    }
    100% {
        transform: translate(0, 0) scale(1);
    }
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.banner h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.banner i {
    margin-bottom: 24px;
    display: block;
}

main {
    padding-bottom: 40px;
    font-size: 16px;
    text-align: center;
    flex: 1;
}

footer {
    background-color: var(--white);
    padding: 20px 0;
    margin-top: auto;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    width: 100%;
}

footer p {
    color: var(--gray-500);
    font-size: 14px;
    text-align: center;
}

body {
    background-color: var(--gray-100);
    color: var(--gray-700);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.agent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

@media screen and (min-width: 992px) {
    .agent-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.agent-card {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    padding: 24px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
}

.agent-icon {
    background: linear-gradient(135deg, #0E42D2, #165DFF);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(14, 66, 210, 0.2);
}

.agent-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(22, 93, 255, 0.1);
}

.agent-card h2 {
    color: var(--primary-dark);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.agent-card h2::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 24px;
    background-color: var(--primary);
    border-radius: 4px;
    margin-right: 12px;
}

.agent-card p {
    color: var(--gray-500);
    font-size: 14px;
    flex-grow: 1;
    margin-bottom: 16px;
}

.agent-card .btn {
    background-color: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    text-align: center;
}

.agent-card .btn:hover {
    background-color: var(--primary-dark);
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: hidden;
}

.modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: var(--white);
}

.close-btn {
    position: absolute;
    top: 16px;
    width: 40px;
    height: 40px;
    right: 64px;
    
    @media (max-width: 768px) {
        top: 10px;
        width: 36px;
        height: 36px; 
        right: 48px; 
    }
    
    font-size: 24px;
    color: var(--white);
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

#agentFrame {
    width: 100%;
    height: 100%;
}

/* 媒体查询 - 响应式布局 */
@media screen and (max-width: 768px) {
    header {
        padding: 16px 0;
        margin-bottom: 24px;
    }

    header h1 {
        font-size: 24px;
    }

    header h1 i {
        font-size: 28px;
    }

    header p {
        font-size: 14px;
    }

    .banner {
        padding: 40px 16px;
        margin-bottom: 24px;
    }

    .banner h2 {
        font-size: 20px;
    }

    .banner i {
        font-size: 2.5rem;
        margin-bottom: 16px;
    }

    .agent-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }

    .agent-card {
        padding: 16px;
    }

    .agent-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 12px;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    header {
        padding: 16px 0;
    }

    header h1 {
        font-size: 20px;
    }

    header h1 i {
        font-size: 24px;
    }

    .banner h2 {
        font-size: 18px;
    }

    .banner i {
        font-size: 2rem;
    }

    .agent-grid {
        grid-template-columns: 1fr;
    }

    .agent-card {
        padding: 16px;
    }
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(22, 93, 255, 0.1);
    border-left-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 骨架屏样式 */
.skeleton-card {
    background-color: var(--white);
    border-radius: 12px;
    padding: 24px;
    height: 200px;
    position: relative;
    overflow: hidden;
}

.skeleton-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 1.5s infinite;
}

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

.skeleton-title {
    width: 60%;
    height: 24px;
    background-color: var(--gray-200);
    margin-bottom: 16px;
    border-radius: 4px;
}

.skeleton-content {
    width: 100%;
    height: 16px;
    background-color: var(--gray-200);
    margin-bottom: 8px;
    border-radius: 4px;
}

.skeleton-content.short {
    width: 80%;
}

.skeleton-button {
    width: 100%;
    height: 36px;
    background-color: var(--gray-200);
    margin-top: 16px;
    border-radius: 8px;
}