* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.header {
    text-align: center;
    padding: 40px 20px 30px;
    color: #333;
}

.header h1 {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 10px;
    color: #13c2c2;
}

.header p {
    font-size: 1.1em;
    color: #666;
    font-weight: 400;
}


.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 25px;
    padding: 20px;
    justify-items: center;
}

.app-icon {
    width: 140px;
    height: 140px;
    background: white;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.app-icon.hidden {
    display: none;
}

.app-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #13c2c2;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s;
}

.app-icon:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(19, 194, 194, 0.2);
    border-color: #13c2c2;
}

.app-icon:hover::before {
    transform: scaleX(1);
}

.app-icon:active {
    transform: translateY(-4px);
}

.icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 36px;
    font-weight: 600;
    position: relative;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center;
}

.app-icon:hover .icon-wrapper {
    transform: scale(1.1);
}

@keyframes iconBounce {
    0%, 100% {
        transform: scale(1.1) translateY(0);
    }
    50% {
        transform: scale(1.15) translateY(-3px);
    }
}

.app-icon:hover .icon-wrapper.icon-bmi {
    animation: iconBounce 0.6s ease-in-out;
}

.app-icon:hover .icon-wrapper.icon-calorie {
    animation: iconBounce 0.6s ease-in-out 0.1s;
}

.app-icon:hover .icon-wrapper.icon-water {
    animation: iconBounce 0.6s ease-in-out 0.2s;
}

.app-icon:hover .icon-wrapper.icon-protein {
    animation: iconBounce 0.6s ease-in-out 0.3s;
}

.app-icon:hover .icon-wrapper.icon-diet {
    animation: iconBounce 0.6s ease-in-out 0.4s;
}

.app-icon:hover .icon-wrapper.icon-exercise {
    animation: iconBounce 0.6s ease-in-out 0.5s;
}

.app-icon:hover .icon-wrapper.icon-nutrition {
    animation: iconBounce 0.6s ease-in-out 0.6s;
}

.app-icon:hover .icon-wrapper.icon-health {
    animation: iconBounce 0.6s ease-in-out 0.7s;
}

.app-name {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    padding: 0 8px;
    position: relative;
    z-index: 2;
    color: #333;
    transition: all 0.3s ease;
}

.app-icon:hover .app-name {
    color: #13c2c2;
    font-weight: 600;
}

/* 不同工具的颜色主题 - 青绿色医疗风格 */
.icon-bmi {
    background: #13c2c2;
    color: white;
}

.icon-calorie {
    background: #ff7875;
    color: white;
}

.icon-water {
    background: #36cfc9;
    color: white;
}

.icon-protein {
    background: #ffa940;
    color: white;
}

.icon-diet {
    background: #ff85c0;
    color: white;
}

.icon-exercise {
    background: #40a9ff;
    color: white;
}

.icon-nutrition {
    background: #95de64;
    color: white;
}

.icon-health {
    background: #ff7875;
    color: white;
}

.app-icon:hover .icon-wrapper {
    box-shadow: 0 4px 12px rgba(19, 194, 194, 0.3);
}

.icon-coming-soon {
    background: linear-gradient(135deg, #d9d9d9 0%, #bfbfbf 100%);
    color: #8c8c8c;
    cursor: not-allowed;
    opacity: 0.7;
}

.icon-coming-soon:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.icon-coming-soon:hover .icon-wrapper {
    transform: scale(1.05);
    animation: none;
}

.coming-soon-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #13c2c2;
    color: white;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 10px;
    font-weight: 500;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(19, 194, 194, 0.3);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2em;
    }

    .header p {
        font-size: 1em;
    }

    .app-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 20px;
        padding: 15px;
    }

    .app-icon {
        width: 110px;
        height: 110px;
        border-radius: 22px;
    }

    .icon-wrapper {
        width: 55px;
        height: 55px;
        font-size: 28px;
        margin-bottom: 10px;
    }

    .app-name {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 30px 15px 20px;
    }

    .header h1 {
        font-size: 1.6em;
    }

    .app-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        padding: 10px;
    }

    .app-icon {
        width: 100px;
        height: 100px;
        border-radius: 20px;
    }

    .icon-wrapper {
        width: 50px;
        height: 50px;
        font-size: 24px;
        margin-bottom: 8px;
    }

    .app-name {
        font-size: 11px;
    }
}

@media (max-width: 360px) {
    .app-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
