
.layout-section {
    border-radius: 15px;
    margin-bottom: 40px;
    transition: transform 0.3s ease;
}

.layout-section:hover {
    transform: translateY(-5px);
}

.layout-title {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    position: relative;
    padding-bottom: 15px;
}

.layout-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 2px;
}

/* 布局1：磁性网格 */


.magnetic-item {
    height: 80px;
    width: 14.5%;
    margin: 0 1%;
    margin-top: 30px;
    float: left;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.magnetic-item:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.magnetic-item:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.magnetic-item:hover:before {
    opacity: 1;
}

/* 布局2：层叠卡片 */
.stack-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
    perspective: 1000px;
    padding: 40px 20px;
}

.stack-item {
    width: 200px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.5s ease;
    position: relative;
    transform-style: preserve-3d;
}

.stack-item:nth-child(1) {
    transform: rotate(-5deg) translateY(10px);
    z-index: 3;
}

.stack-item:nth-child(2) {
    transform: rotate(2deg) translateY(5px);
    z-index: 2;
}

.stack-item:nth-child(3) {
    transform: rotate(-3deg) translateY(0);
    z-index: 1;
}

.stack-item:nth-child(4) {
    transform: rotate(4deg) translateY(8px);
    z-index: 4;
}

.stack-item:hover {
    transform: rotate(0) translateY(-20px) scale(1.05);
    z-index: 10;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* 布局3：渐变显现 */
.reveal-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 30px;
}

.reveal-item {
    width: 160px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 12px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.1),
    -5px -5px 15px rgba(255, 255, 255, 0.8);
    opacity: 0.7;
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
}

.reveal-item:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transition: all 0.6s ease;
}

.reveal-item:hover {
    opacity: 1;
    transform: scale(1.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.reveal-item:hover:before {
    left: 100%;
}

/* 布局4：浮动气泡 */
.bubble-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1200px;
    gap: 30px;
    position: relative;
}

.bubble-item {
    height: 160px;
    width: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    animation: float 5s ease-in-out infinite;
    position: relative;
}

.bubble-item:nth-child(2) {
    animation-delay: 0.5s;
}

.bubble-item:nth-child(3) {
    animation-delay: 1s;
}

.bubble-item:nth-child(4) {
    animation-delay: 1.5s;
}

.bubble-item:nth-child(5) {
    animation-delay: 2s;
}
.bubble-item:nth-child(6) {
    animation-delay: 2.5s;
}

.bubble-item:nth-child(7) {
    animation-delay: 0s;
}

.bubble-item:nth-child(8) {
    animation-delay: 0.5s;
}

.bubble-item:nth-child(9) {
    animation-delay: 1s;
}

.bubble-item:nth-child(10) {
    animation-delay: 1.5s;
}
.bubble-item:nth-child(11) {
    animation-delay: 2s;
}
.bubble-item:nth-child(12) {
    animation-delay: 2.5s;
}
.bubble-item:nth-child(13) {
    animation-delay: 0s;
}
.bubble-item:nth-child(14) {
    animation-delay: 0.5s;
}
.bubble-item:nth-child(15) {
    animation-delay: 1s;
}
.bubble-item:nth-child(16) {
    animation-delay: 1.5s;
}
.bubble-item:nth-child(17) {
    animation-delay: 2s;
}
.bubble-item:nth-child(18) {
    animation-delay: 2.5s;
}
.bubble-item:hover {
    animation-play-state: paused;
    transform: scale(1.15);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* 布局5：动态拼图 */
.puzzle-container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 5px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
}

.puzzle-item {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.puzzle-item:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.puzzle-item:hover {
    transform: scale(1.05);
    z-index: 2;
}

.puzzle-item:hover:before {
    opacity: 1;
}

/* Logo图片样式 */
.logo-img {
    max-width: 80%;
    max-height: 100%;
    text-align: center;
    line-height: 100%;
    margin-top: 10px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.magnetic-item:hover .logo-img,
.stack-item:hover .logo-img,
.reveal-item:hover .logo-img,
.bubble-item:hover .logo-img,
.puzzle-item:hover .logo-img {
    transform: scale(1.1);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .puzzle-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .magnetic-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .stack-item {
        width: 170px;
        height: 150px;
    }

    .reveal-item {
        width: 140px;
        height: 120px;
    }

    .bubble-item {
        width: 120px;
        height: 120px;
    }

    .puzzle-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .magnetic-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .stack-container {
        gap: 20px;
    }

    .stack-item {
        width: 140px;
        height: 120px;
    }

    .reveal-container {
        gap: 15px;
    }

    .reveal-item {
        width: 120px;
        height: 100px;
    }

    .bubble-container {
        gap: 20px;
    }

    .bubble-item {
        width: 100px;
        height: 100px;
    }

    .puzzle-container {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    .magnetic-item{
        width: 30%;
        height: 90px;
    }
}