/* 阿里云风格IDC页顶样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    line-height: 1.5;
}

/* 顶部导航栏样式 */
.idc-header {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    padding: 0 20px;
}

/* Logo区域样式 */
.header-logo {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.logo-image {
    width: 40px;
    height: 40px;
    margin-right: 12px;
}

.company-name {
    font-size: 18px;
    font-weight: 600;
    color: rgb(8, 84, 220);
}

/* 导航菜单样式 */
.header-nav {
    flex: 1;
    margin-left: 60px;
}

.nav-list {
    display: flex;
    list-style: none;
}

.nav-item {
    margin-right: 40px;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-size: 14px;
    padding: 20px 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: rgb(8, 84, 220);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: rgb(8, 84, 220);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-link:hover::after {
    transform: scaleX(1);
}

/* 用户操作区域样式 */
.header-actions {
    display: flex;
    align-items: center;
}

.action-link {
    text-decoration: none;
    margin-left: 24px;
    font-size: 14px;
    color: #666;
    transition: color 0.3s ease;
}

.action-link:hover {
    color: rgb(8, 84, 220);
}

.register-btn {
    background-color: rgb(8, 84, 220);
    color: #fff;
    padding: 6px 16px;
    transition: background-color 0.3s ease;
}

.register-btn:hover {
    background-color: rgb(10, 100, 240);
    color: #fff;
}

/* 用户下拉菜单样式 */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-dropdown-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #666;
    font-size: 14px;
    padding: 8px 12px;
    transition: all 0.3s ease;
}

.user-dropdown-btn:hover {
    background-color: #f0f0f0;
    color: rgb(8, 84, 220);
}

.user-email {
    margin-right: 4px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.user-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    border: 1px solid #e8e8e8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    z-index: 1000;
    display: none;
    margin-top: 4px;
}

.user-dropdown:hover .user-dropdown-menu {
    display: block;
}

.user-info {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.user-details p {
    margin: 8px 0;
    color: #666;
    font-size: 14px;
}

.user-credit {
    font-weight: 600 !important;
    color: #ff4d4f !important;
    margin-top: 12px !important;
}

.dropdown-divider {
    height: 1px;
    background-color: #f0f0f0;
    margin: 0;
}

.dropdown-item {
    display: block;
    padding: 10px 16px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
    color: rgb(8, 84, 220);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .user-email {
        max-width: 120px;
    }
    
    .user-dropdown-menu {
        min-width: 250px;
    }
}

/* 主导航条样式 */
.main-nav {
    background-color: rgb(8, 84, 220);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-container {
    width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-nav-list {
    display: flex;
    list-style: none;
    height: 40px;
    align-items: center;
}

.main-nav-item {
    margin-right: 30px;
    position: relative;
}

.main-nav-link {
    text-decoration: none;
    color: #fff;
    font-size: 14px;
    padding: 10px 0;
    display: inline-block;
    transition: opacity 0.3s ease;
}

.main-nav-link:hover {
    opacity: 0.8;
}

/* 下拉菜单指示器 */
.main-nav-item:last-child::after {
    content: '▼';
    font-size: 10px;
    margin-left: 4px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .header-container,
    .nav-container {
        width: 100%;
    }
}

@media (max-width: 992px) {
    .header-nav {
        display: none;
    }
    
    .header-container {
        padding: 0 16px;
    }
    
    .main-nav-list {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .main-nav-item {
        white-space: nowrap;
        margin-right: 20px;
    }
}

@media (max-width: 576px) {
    .logo-image {
        width: 32px;
        height: 32px;
    }
    
    .company-name {
        font-size: 16px;
    }
    
    .action-link {
        margin-left: 16px;
        font-size: 13px;
    }
    
    .register-btn {
        padding: 4px 12px;
    }
}