:root {
    --primary: #2d87cf;
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

body {
    margin: 0;
    padding: 40px;
    background: #f8f9fb;
    font-family: -apple-system, system-ui;
}

/* 标题系统 */
.header {
    text-align: center;
    margin-top: 8rem;   /* 上边距调整为 2rem */
    margin-right: auto;
    margin-bottom: 5rem;
    margin-left: auto;
    padding: 0 20px;
    max-width: 800px;
}

.main-title {
    font-size: 28px;
    color: #222;
    text-align: center;
    margin-bottom: 12px;
}

.sub-title {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* 主容器 */
.dashboard {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 60px;
    max-width: 1280px;
    margin: 0 auto;
}

/* 内容面板 */
.content-panel {
    padding-right: 40px;
}

/* 内容项 */
.content-item {
    background: #fff;
    border-left: 4px solid transparent;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.06);
    transition: var(--transition);
    cursor: pointer;
}

.content-item.active,
.content-item:hover {
    transform: translateX(10px);
    border-color: var(--primary);
    box-shadow: 0 12px 32px rgba(45,135,207,0.12);
}

.item-title {
    color: #1a1a1a;
    font-size: 20px;
    margin: 0 0 12px;
    position: relative;
}

.item-title::before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    left: -18px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: var(--transition);
}

.content-item.active .item-title::before,
.content-item:hover .item-title::before {
    opacity: 1;
    left: -14px;
}

.item-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
    color: #444;
    line-height: 1.6;
}

.content-item.active .item-detail,
.content-item:hover .item-detail {
    max-height: 200px;
}

/* 设备容器 */
.device-container {
    position: sticky;
    top: 40px;
    width: 320px;
    height: 640px;
    background: #1a1a1a;
    border-radius: 40px;
    padding: 24px;
    box-shadow: 16px 16px 40px rgba(0,0,0,0.2);
}

.device-screen {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
}

/* 屏幕内容 */
.screen-content {
    position: absolute;
    width: calc(100% - 4px);
    height: calc(100% - 4px);
    left: 2px;
    top: 2px;
    opacity: 0;
    transition: var(--transition);
}

.screen-content.active {
    opacity: 1;
}

.content-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f0f0f0;
}

/* 响应式布局 */
@media (max-width: 1024px) {
    .dashboard {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .device-container {
        width: 280px;
        height: 560px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    body {
        padding: 20px;
    }
    .device-container {
        display: none;
    }
    .main-title {
        font-size: 1.8rem;
    }
    .content-item:hover {
        transform: translateX(5px);
    }
}