/* 入口框容器 - 宽度与副标题匹配 */
.portal-container {
    display: flex;
    justify-content: center;
    gap: 80px;
    margin-top: 1rem;
    width: 100%;
    max-width: 800px;
    /* 确保在任何分辨率下都水平排列 */
    flex-wrap: nowrap;
}

/* 入口卡片样式 - 高度减小 */
.entry-card {
    /* 宽度减少5% */
    width: 240px; /* 原宽度260px的95% */
    height: 200px;
    perspective: 1000px;
    position: relative;
    /* 确保卡片不换行 */
    flex-shrink: 0;
}

.entry-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s;
    animation: float 5s infinite ease-in-out;
}

.entry-card:hover .entry-inner {
    transform: rotateY(180deg);
}

.entry-front, .entry-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(16, 18, 40, 0.6);
    border: 1px solid rgba(64, 224, 208, 0.5);
    box-shadow: 0 0 20px rgba(64, 224, 208, 0.3);
    padding: 15px;
    overflow: hidden;
}

.entry-back {
    transform: rotateY(180deg);
    justify-content: center;
    align-items: center;
}

/* 新增：双圆形遮罩容器 */
.image-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

/* 图片区域 - 修改为圆形遮罩 */
.image-container {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(64, 224, 208, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

.entry-image {
    width: 90%;
    height: 90%;
    object-fit: cover;
    transition: transform 0.6s;
}

.entry-card:hover .entry-image {
    transform: scale(1.1);
}

/* 入口按钮 */
.entry-button {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 2px solid #00e5ff;
    border-radius: 30px;
    color: #00e5ff;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s;
    outline: none;
    position: relative;
    overflow: hidden;
}

.entry-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.4), transparent);
    transition: all 0.6s;
}

.entry-button:hover {
    background: rgba(0, 229, 255, 0.15);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.6);
    transform: translateY(-3px);
}

.entry-button:hover:before {
    left: 100%;
}

.entry-button.green:hover {
    background: rgba(94, 255, 172, 0.15);
    box-shadow: 0 0 20px rgba(94, 255, 172, 0.6);
    border-color: #5effac;
    color: #5effac;
}

.entry-button.green:hover:before {
    background: linear-gradient(90deg, transparent, rgba(94, 255, 172, 0.4), transparent);
}

/* 科幻风格特效 */
.entry-tech-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, rgba(34, 40, 91, 0.1) 1px, transparent 1px),
        linear-gradient(rgba(34, 40, 91, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: -1;
}

.entry-scan-line {
    position: absolute;
    top: 0;
    left: 0;
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.8), transparent);
    animation: scanLine 4s linear infinite;
    opacity: 0.7;
}

/* 动态悬浮效果 */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotateX(0) rotateY(0);
    }
    50% {
        transform: translateY(-15px) rotateX(2deg) rotateY(1deg);
    }
}

/* 扫描线动画 */
@keyframes scanLine {
    0% {
        top: 0;
        opacity: 0.4;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        top: 100%;
        opacity: 0.4;
    }
}

/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 900px) {
    .main-title {
        font-size: 3.5rem;
    }
    
    .subtitle {
        font-size: 1.3rem;
        letter-spacing: 5px;
    }
    
    .portal-container {
        gap: 40px;
    }
    
    .entry-card {
        /* 宽度减少5% */
        width: 228px; /* 原宽度240px的95% */
        height: 200px;
    }
}

/* 确保任何分辨率下都水平排列 */
@media (max-width: 768px) {
    .main-title {
        font-size: 3rem;
        margin-top: 20px;
    }
    
    .subtitle {
        font-size: 1.1rem;
        letter-spacing: 3px;
    }
    
    .portal-container {
        /* 关键修改：始终保持水平排列 */
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 30px;
        overflow-x: visible;
        justify-content: center;
        align-items: center;
    }
    
    .entry-card {
        /* 宽度减少5% */
        width: 190px; /* 原宽度200px的95% */
        height: 180px;
    }
    
    .info-bar {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px;
    }
    
    .info-bar span {
        padding: 0 10px;
    }
}

@media (max-width: 720px) {
    .portal-container {
        gap: 20px;
    }
    
    .entry-card {
        /* 宽度减少5% */
        width: 190px; /* 原宽度200px的95% */
        height: 180px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
        letter-spacing: 2px;
        padding: 8px 15px;
    }
    
    .container {
        padding: 10px;
        margin-top: -30px;
    }
    
    .portal-container {
        gap: 15px;
    }
    
    .entry-card {
        /* 宽度减少5% */
        width: 171px; /* 原宽度180px的95% */
        height: 160px;
    }
    
    .entry-button {
        font-size: 0.9rem;
        padding: 10px;
    }
    
    .info-bar {
        font-size: 0.7rem;
        gap: 5px;
    }
    
    .info-bar span {
        padding: 0 5px;
    }
    
    .info-bar span::after {
        display: none;
    }
}